The JOB illustrated how a temporary VSAM ESDS file can be created directly via Job Control. Note that the first attempt used DSN=&&TEMPESDS and resulted in a S0C4 abend so the non-VSAM data set name rules for temporary data sets do not apply.

//OPSSTU1T JOB  ,'T-R-S',CLASS=A,NOTIFY=OPSSTU1 
//LOG      OUTPUT DEFAULT=YES,CLASS=X,JESDS=ALL            
//S0010    EXEC PGM=EX1                                    
//STEPLIB  DD   DSN=OPSSTU1.TRS.LOAD,DISP=SHR             
//SYSPRINT DD   SYSOUT=(,)                                 
//SYSUDUMP DD   SYSOUT=(,)                                 
//DDSEQ1R  DD   DSN=OPSSTU1.VSAM.CNTL(SAMPDATA),DISP=SHR  
//DDSEQ2W  DD   DSN=TEMPESDS,DISP=(,PASS),UNIT=SYSDA,        
//           RECORG=ES,SPACE=(80,(10,10)),AVGREC=U,LRECL=50
//         IF   (¬ABEND AND RC = 0) THEN                   
//S0020    EXEC PGM=IDCAMS                                 
//SYSPRINT DD   SYSOUT=(,)                                 
//INESDS   DD   DSN=*.S0010.DDSEQ2W,DISP=(OLD,DELETE)      
//SYSIN    DD   *                                          
 PRINT   INFILE(INESDS) COUNT(5)                           
//         ENDIF

This job was created and run on a z/OS V1.R3 system in April 2003.

Copyright © KMS-IT Limited 2003