Previous Topic: SyntaxNext Topic: INLIM


Parameters

INFORMAT only requires the character string 'JCL'.

Example 1

This is an example of how JCL statements are broken and continued on a new line when the change causes the statement to go beyond column 71. When DSN=CUSTOMER is changed to DSN=CUSTOMER.UPDATE, the UNIT=SYSDA parameter is continued on the next line.

COPY,
  INFORMAT(JCL),
  CHANGE(1,0,EQ,C'DSN=CUSTOMER.',C'DSN=CUSTOMER.UPDATE.MSTR.')

from

//DATAOUT  DD  DSN=CUSTOMER.FILE,DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,
//             SPACE=(CYL,(1,1)),                                   
//             DCB=(RECFM=VB,LRECL=110,BLKSIZE=11400)

to

//DATAOUT  DD  DSN=CUSTOMER.UPDATE.MSTR.FILE,DISP=(NEW,CATLG,DELETE), 
//             UNIT=SYSDA,                                       
//             SPACE=(CYL,(1,1)),                                
//             DCB=(RECFM=VB,LRECL=110,BLKSIZE=11400)

Example 2

This is an example of how the IF statement lets you evaluate a complete JCL statement. In this example, when a field on the first JCL statement is evaluated to a true condition, data is changed on a subsequent JCL statement within the complete JCL statement. When DSN=CUSTOMER.FILE is found, the CHANGE command is applied to UNIT=SYSDA parameter on the 2nd JCL statement and UNIT=SYSDA is changed to UNIT=VIO.

COPY,
  INFORMAT(JCL),
  IF(1,0,EQ,C'DSN=CUSTOMER.FILE'),  
    CHANGE(1,0,EQ,C'UNIT=SYSDA',C'UNIT=VIO')

from

//DATAOUT  DD  DSN=CUSTOMER.FILE,DISP=(,DELETE),  
//             UNIT=SYSDA,                                 
//             SPACE=(CYL,(1,1)),                          
//             DCB=(RECFM=VB,LRECL=110,BLKSIZE=11400)      

to

//DATAOUT  DD  DSN=CUSTOMER.FILE,DISP=(,DELETE),        
//             UNIT=VIO,                                         
//             SPACE=(CYL,(1,1)),                                
//             DCB=(RECFM=VB,LRECL=110,BLKSIZE=11400)