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
 
Subset of a File

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

New User


Joined: 16 May 2005
Posts: 54

PostPosted: Tue Jun 02, 2009 11:35 am    Post subject: Subset of a File
Reply with quote

I have a dataset which is FB and Lrecl is 20. The input datasets looks as below

ZZS1234567890
0987654321000
0102030405060
1111111111111
2222222222222
ZZL1234567890
0000000000000
1111111111111
...
...
...

My requirement is to select all the records after ZZS (including ZZS) till ZZL encounters.

The ZZS or ZZL present in first three position and is not present in that position thru out the dataset again.
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Jun 02, 2009 8:50 pm    Post subject: Reply to: Subset of a File
Reply with quote

suzeet,

Using the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) you can easily get the desired results like this:

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                 
ZZS1234567890                                                   
0987654321000                                                   
0102030405060                                                   
1111111111111                                                   
2222222222222                                                   
ZZL1234567890                                                   
0000000000000                                                   
1111111111111                                                   
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                 
  SORT FIELDS=COPY                                               
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,2,CH,EQ,C'ZZ'),PUSH=(21:1,3))
  OUTFIL BUILD=(1,20),INCLUDE=(21,3,CH,EQ,C'ZZS')               
/*


If you don't have the July, 2008 PTF installed, ask your System Programmer to install it (it's free).

For complete details on the new WHEN=GROUP and the other new functions available with PTF UK90013, see:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
suzeet

New User


Joined: 16 May 2005
Posts: 54

PostPosted: Wed Jun 03, 2009 10:06 am    Post subject:
Reply with quote

Yes we have the latest ptf installed!!!and it works like charm...Thanks...
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

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