Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Need to copy records from vsam file to seq file using sort

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
bompally.praveen

New User


Joined: 06 Jul 2008
Posts: 1
Location: hyd

PostPosted: Mon Jul 07, 2008 5:22 am    Post subject: Need to copy records from vsam file to seq file using sort
Reply with quote

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')
/*
Back to top
View user's profile Send private message
References
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8729
Location: 221 B Baker St

PostPosted: Mon Jul 07, 2008 7:03 am    Post subject: Reply to: Need to copy records from vsam file to seq file us
Reply with quote

Please do not post in both forums.

Please provide the requested in your original topic.

This topic is locked.

d
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1