PKB
New User
Joined: 06 Jul 2008 Posts: 10 Location: hyd
|
|
|
|
I have a requirement like, I need to Copy data from VSAM file to seq file for the data Current date - 60 days. and sort that seq file based on item number.
Item number and current date are fields in the vsam file. I need to write this in JCL(No COBOL, no DB2 Query). The JCL runs weekly.
How can I write this condition using sort? Please help me
We use SORT usually, but I have no idea about the version, Can i use the date logic in the sort step?
the current date format is CCYYMMDD.
Sample input
item# Retail Date
10004 20080401
10005 20080501
10006 20080601
10007 20080701
Output should be retail date = current date - 60 days
item# Retail Date
10006 20080601
10007 20080701
This is the sample code I used for retail date = current date
//SRT1 EXEC PGM=SORT
//SORTOUT DD DISP=(,CATLG,DELETE),DSN=TEST.DIST.SOURCED.D1009,
// UNIT=(3390,3),SPACE=(TRK,(10,100),RLSE),
// RECFM=FB,LRECL=157
//SORTIN DD DISP=SHR,DSN=DC.DIST.SOURCED.DALYBKUP.G2346V00
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(66,4,PD,EQ,'20080706')
/* |
|