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
 

 

JCL to write records satisfying a particular condition

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
karthick anandaraman

New User


Joined: 05 Jan 2010
Posts: 6
Location: chennai

PostPosted: Wed Jan 06, 2010 12:21 am    Post subject: JCL to write records satisfying a particular condition
Reply with quote

I have a file in which sales done for the whole year is present. The sales date is there in the fomat (DDMMYY).

Now I want to create a output file, which has the sales date only after 010909. Can you please suggest me a easy way to do this .

EXAMPLE I/P file :
xxxxxxxxxx yyyyyyyy 010109 zzzzzz...
xxxxxxxxxx yyyyyyyy 010209 zzzzzz...
xxxxxxxxxx yyyyyyyy 010909 zzzzzz...
xxxxxxxxxx yyyyyyyy 011009 zzzzzz...

REquired O/P file :

xxxxxxxxxx yyyyyyyy 010909 zzzzzz...
xxxxxxxxxx yyyyyyyy 011009 zzzzzz...
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Wed Jan 06, 2010 1:55 am    Post subject:
Reply with quote

You can use a DFSORT job like the following to what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes.

Code:

//S1    EXEC  PGM=SORT                                   
//SYSOUT    DD  SYSOUT=*                                 
//SORTIN DD *                                             
xxxxxxxxxx yyyyyyyy 010109 zzzzzz...                     
xxxxxxxxxx yyyyyyyy 010209 zzzzzz...                     
xxxxxxxxxx yyyyyyyy 010909 zzzzzz...                     
xxxxxxxxxx yyyyyyyy 011009 zzzzzz...                     
//SORTOUT DD SYSOUT=*                                     
//SYSIN    DD    *                                       
  OPTION COPY                                             
  INREC OVERLAY=(81:25,2,23,2,21,2)                       
  OUTFIL INCLUDE=(81,6,CH,GE,C'090901'),BUILD=(1,80)     
/*
Back to top
View user's profile Send private message
lee_issc

New User


Joined: 11 Dec 2008
Posts: 33
Location: China

PostPosted: Tue Jan 12, 2010 7:29 pm    Post subject: Reply to: JCL to write records satisfying a particular condi
Reply with quote

What will the record length of output file be?
Back to top
View user's profile Send private message
karthick anandaraman

New User


Joined: 05 Jan 2010
Posts: 6
Location: chennai

PostPosted: Tue Jan 12, 2010 7:33 pm    Post subject: Reply to: JCL to write records satisfying a particular condi
Reply with quote

it will be same as that of the input file.. I just want to filter the records.
Back to top
View user's profile Send private message
karthick anandaraman

New User


Joined: 05 Jan 2010
Posts: 6
Location: chennai

PostPosted: Tue Jan 12, 2010 7:35 pm    Post subject:
Reply with quote

Thank you Frank.. your JCL worked wonderful for me..
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am


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