Multiple choice technology programming languages

Which of the following is true on CPYF and CRTDUPOBJ when a logical file needs to be copied?

  1. CPYF copies the records of one logical file to another but changes the file attribute to PF.

  2. CRTDUPOBJ copies the records of one logical file to another but retains the file attribute as LF.

  3. All of the above

  4. None of the above.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

CRTDUPOBJ creates an exact duplicate of an object, preserving all original attributes including the LF (Logical File) designation. CPYF, however, copies the data but creates a new Physical File (PF) rather than maintaining the logical file structure. Option B correctly identifies that CRTDUPOBJ retains the file attribute as LF when duplicating a logical file.