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
 

 

Copy records into two files based on dates

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Fri Feb 20, 2009 9:29 am    Post subject: Copy records into two files based on dates
Reply with quote

Hi,
I have data in a file with some date values. like
20090105
20090117
20090125
20090206
20090215
20090224

The records which are <=1 to 15 of the month should be copied into file-1 and the records which are > 15 to (30 or 31) should be copied to file-2.
can u pls help me on this?

Thanks.
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Feb 20, 2009 9:38 am    Post subject:
Reply with quote

Hi,

try this
Code:
//S1       EXEC PGM=SORT                               
//SYSOUT   DD SYSOUT=*                                 
//SORTIN   DD *                                         
20090105                                               
20090117                                               
20090125                                               
20090206                                               
20090215                                               
20090224                                               
//OUT1     DD SYSOUT=*                                 
//OUT2     DD SYSOUT=*                                 
//SYSIN    DD *                                         
  OPTION COPY                                           
  OUTFIL FNAMES=OUT1,INCLUDE=(07,2,ZD,LE,15)           
  OUTFIL FNAMES=OUT2,SAVE                               



Gerry
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 51

PostPosted: Fri Feb 20, 2009 10:11 am    Post subject:
Reply with quote

Thanks gcicchet. My requiremnt is solved.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


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