Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 & VSAM
View previous topic :: :: View next topic  
Author Message
PKB

New User


Joined: 06 Jul 2008
Posts: 10
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

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

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
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us