Reputation: 11
I have a requirement to get today's transactions into a separate file through JCL SORT. The date format that I have is in DDMMYYYY format.
Upvotes: 1
Views: 1828
Reputation: 41
INCLUDE COND=(20,10,CH,EQ,DATE1), Will not work because DATE1 returns the date in C'yyyymmdd'format
Try reformatting the date in input file and then compare it with DATE1. Refer below SORT CARD
----+----1----+----2----+----3----+----4----+-
//SORTIN DD *
DATA1 01102020
DATA2 07102020
DATA3 07102020
DATA4 01092020
DATA5 01102010
DATA6 01102019
/*
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC BUILD=(1,28,X,25,4,23,2,21,2)
OUTFIL REMOVECC,
BUILD=(1,28),INCLUDE=(30,08,CH,EQ,DATE1)
/*
Output will be:
DATE2 07102020
DATE3 07102020
Upvotes: 1