1. Does CL check for the file declared in the program before compiling the pgm?
or will the cl pgm get compiled if the file declared in the pgm does not exists in the system?
2. Does CL check for the data area declared in the pgm before compiling the pgm
3. If i declare a physical file in cl and then chage that phyical file( add a new field) do i need to recompile the Cl?
Software/Hardware used:
ASKED:
June 21, 2012 10:34 AM
UPDATED:
June 23, 2012 7:25 AM
Are you asking because you need to deal with commands which generate file output?
1. Does CL check for the file declared in the program before compiling the pgm?
No. But the compiler checks during compilation. The declared file must exist for the compile to succeed. However, a file that the CL performs I/O on need not exist at compile-time. (The declared file might not be the same as the one that is opened for I/O.)
2. Does CL check for the data area declared in the pgm before compiling the pgm
No. Nor does the compiler check.
3. If i declare a physical file in cl and then chage that phyical file( add a new field) do i need to recompile the Cl?
The format level identifier of a declared file must match the format ID of the file when the file is opened at run-time unless the CL executes an override to ignore level checks before opening the file for I/O. If the file is never opened or an override is in effect, a recompile isn’t needed.
Tom
Homework or interview?