Download Video Performer

Wednesday, September 18, 2013

SORT - Runtime comparison of the header date in file with current date


           Below is the SORT code
   
//STEP001 EXEC PGM=SORT,PARM='CENTWIN=80,NULLOUT=RC4'
//SORTIN DD DSN=XXXX.YYYY,SISP=SHR
//SORTOUT DD SYSOUT=*
// SYSOUT DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//SYSIN DD*
  INREC FIELDS=(10,2,13,2,16,2)
  SORT FIELDS=COPY,STOPAFT=1
  OUTFIL INCLUDE=(1,6,Y2T,EQ,Y'DATE1')
/*

Sample Input file data is shown below

00HEADER 09/04/01  120009
01ABCD

- The date is  displayed in spool if the date matches, otherwise it throws maxcc 4 with blank spool
- Date formats can be changed as per requirement based on the parms like Y2T and DATE1.
              
             Output of above job is shown below
            
            090401



No comments:

Post a Comment