tvinodkumar7 New User Joined: 06 Jan 2015 Posts: 19 Location: Hyderabad, INDIA
I have requirement to retrieve records with current date.
step1 : Retrieved date from my date file using easytrieve as below
//TODAYDT EXEC EZTPCLGO
//DATEIN DD DSN=DATEFILE,DISP=SHR
//DATEOUT DD DSN=TODAY.DATE.PSFILE,DISP=(NEW,CATLG,DELETE),
//SYSIN DD *
FILE DATEIN VS
D-TODAY 16 5 P
OUT-TODAY-DT 1 5 P
OUT-TODAY-DT = D-TODAY
now the file TODAY.DATE.PSFILE of length 5 is have current date.
//STEP001 EXEC PGM=SORT
//SORTIN DD DSN=TODAY.DATE.PSFILE,DISP=SHR
//SYMNAMES DD *
I have to use the above value TODAYDT in the below sort step(WHEN) to build my records with current date.
How can I use the SYMNAMES? Please suggest.
Smita.t2 New User Joined: 17 Apr 2012 Posts: 26 Location: Bangalore
Is the check always going to be Current Date?
If so, you can eliminate the eztrieve program and just have one sort step to extract the records using DATE Operand.
I cannot test it right now, please try and let us know if it works.
Bill Woodger DFSORT Moderator Joined: 09 Mar 2011 Posts: 7312
No. It is a sensible system which uses a date file, not relying on the system date which, daily, changes at the most inopportune moments.
Probably the easiest thing to do would be to format the symbol in the Easytrieve Plus program. LRECL 80, REFCM FB.
All times are GMT + 6 Hours