Compiling PF's

Compile physical files in bulk.

Sometimes there is a need to compile physical files in bulk. There are two ways to do that, either create a file...

containing all source member names (member list) and write a CL to read that file, or make a user option, which works on one member at a time with validations, such as existence of the object, if it is in error then write the name of the member to a physical file. First of all, you create a user option, CP in this case as follows:

CALL PGM(*LIBL/CMPPF) PARM(&l &f &n). The program will create a physical file of all members, which are not compiled, and optionally copy those members to a specified source physical file, from where the option can be executed again.

 	
PGM     PARM(&SLIB &SRC &TLIB +
             &FILNAM &TSRC)    
DCL     &SLIB   *CHAR 10       
DCL     &TLIB   *CHAR 10       
DCL     &SRC    *CHAR 10       
DCL     &TSRC   *CHAR 10       
DCL     &FILNAM *CHAR 10       

CHKOBJ   *LIBL/&FILNAM  *FILE
MONMSG   CPF9801  EXEC(DO)   
/*The parameters of CRTPF can be changed as required */
CRTPF   &TLIB/&FILNAM  &SLIB/&SRC
MONMSG  CPF7302 EXEC(CPYSRCF + 
   FROMFILE(&SLIB/&SRC) +      
TOFILE(*LIBL/&TSRC) FROMMBR(&FILNAM))
ENDDO 
EXIT: ENDPGM 

This was last published in August 2001

Dig Deeper on Performance

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close