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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 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