Previous Topic: Executing IN25SYMC as a Standalone Program

Next Topic: IN25COB2

Adding IN25SYMC to Your OS/VS COBOL Procedure

To automatically update the symbolic information in your PROTSYM file whenever a OS/VS COBOL program is compiled, you can add a postprocessor step directly to the JCL procedure that you use to compile your programs.

Note: These same steps also apply to your CA Optimizer procedure.

Follow these steps to update your existing compile procedure:

  1. Ensure that your compile step specifies all of the required OS/VS COBOL options.
  2. Change the DD statement so that a temporary disk file is created for your listing, if the SYSPRINT output from your compile step is written to SYSOUT.
  3. Add a new IN25PARM step following your compile step to generate the parameter statement for the postprocessor.
  4. Add a new IN25SYMC step to postprocess the listing from the compile step. The INPUT DD on this step refers to the same file as the SYSPRINT DD from the compile step.
  5. Add a new IEBGENER step to print the compiler listing only if the compiler detects errors.

The following example shows modifications to a compile procedure:

//COB      EXEC PGM=IKFCBL00,REGION=4M,  
//  PARM='SOURCE,DMAP,SXREF,PMAP,VERB,NONUM,&OPTIONS'    <= 1  

     (Your existing DD statements for OS/VS COBOL)

//SYSPRINT DD DSN=&&LST,DISP=(NEW,PASS),                 <= 2
//            UNIT=SYSDA,SPACE=(CYL,(1,2))    
//*
//*   GENERATE THE PARAMETER STATEMENT FOR IN25SYMC
//*
//CARDS   EXEC PGM=IN25PARM,REGION=1M,COND=(4,LT),       <= 3              
//   PARM='&MEMBER,LISTER=ALL'                             
//STEPLIB  DD DSN=CAI.CAVHLOAD,DISP=SHR                                     
//CARDS    DD DSN=&&CARDS,DISP=(NEW,PASS),                             
//            UNIT=SYSDA,SPACE=(TRK,(1,1))                               
//*
//*    POST-PROCESS THE COMPILER LISTING
//*
//SYM      EXEC PGM=IN25SYMC,REGION=4M,COND=(4,LT)       <= 4              
//STEPLIB  DD DSN=CAI.CAVHLOAD,DISP=SHR                                     
//PROTSYM  DD DSN=USER.PROTSYM,DISP=SHR                                    
//OUTPUT   DD SYSOUT=*,
//            DCB=(LRECL=121,BLKSIZE=2420,RECFM=FBA)          
//INPUT    DD DSN=&&LST,DISP=(OLD,PASS)                      (See Note 1)
//CARDS    DD DSN=&&CARDS,DISP=(OLD,DELETE)                  (See Note 2)
//MESSAGE  DD SYSOUT=*                                                 
//*
//PRINT    EXEC PGM=IEBGENER,COND=(5,GT,COB)     	 <= 5
//SYSUT1   DD DSN=&&LST,DISP=(OLD,DELETE)                              
//SYSUT2   DD SYSOUT=*                                                 
//SYSPRINT DD DUMMY                                                    
//SYSIN    DD DUMMY                                                    

Notes:

  1. If the SYSPRINT DD on your compile step refers to a permanent data set, the INPUT DD for IN25SYMC must point to the same data set.
  2. If you prefer to pass your parameter statement as an override in the invoking JCL, delete the CARDS step, delete this DD statement, and add SYM.CARDS DD to your invoking JCL member.