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 first published in August 2001

Dig deeper on Performance

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchEnterpriseLinux

SearchDataCenter

Close