Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us