Saturday, March 10, 2012

COPY cmd in FILE-AID

Copy dataset - one to one Code:

//STEPCOPY EXEC PGM=FILEAID
//DD01     DD DSN=G1SG00AT.INPUT1,DISP=SHR
//DD01O    DD DSN=G1SG00AT.OUTPUT1,DISP=OLD
//DD02     DD DSN=G1SG00AT.INPUT2,DISP=SHR
//DD02O    DD DSN=G1SG00AT.OUTPUT2,DISP=OLD
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST  DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSIN    DD DUMMY      or code COPY as instream
Here by default SYSIN parameter is 'COPY'. Copy is done from DD01 to DD01O although DD02 and DD02O are coded.


Copy dataset - many to many Code:

//STEPCOPY EXEC PGM=FILEAID
//DD01     DD DSN=G1SG00AT.INPUT1,DISP=SHR
//DD01O    DD DSN=G1SG00AT.OUTPUT1,DISP=OLD
//DD02     DD DSN=G1SG00AT.INPUT2,DISP=SHR
//DD02O    DD DSN=G1SG00AT.OUTPUT2,DISP=OLD
//SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIST  DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSIN    DD *
$$DD01 COPY
$$DD02 COPY
/*

Here DD01 is copied to DD01O and DD02 is copied to DD02O 

No comments:

Post a Comment