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
 

 

Sorting based on Keywords

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

New User


Joined: 24 Sep 2013
Posts: 5
Location: India

PostPosted: Tue Nov 19, 2013 12:22 pm    Post subject: Sorting based on Keywords
Reply with quote

Hi All,

I have a requirement which has a file of 80 bytes in length and needs to be sorted based on a few characters and moved to 3 different output files. For e.g., the file needs to be sorted on the basis of the first few characters of the jobname (8 chars) i.e., PV* should be put into File-1, PWAR* into File-2 and the rest into File-3.

Below is the format of the file.

PVMSDF81|FTP DEALER TREND REPORT |CD \SET\DCSRPTS
PVPSDF01 |FTP GET PROD/OPTS FILES |cwd jmi
PWARM110|MONTHLY JM&A NOMAD |CD \drfitsfp1_drf_ft
PCBDMO01|ACH DEALER RESERVE FTP PROCESS|

Please suggest. Thanks in advance.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7251

PostPosted: Tue Nov 19, 2013 1:00 pm    Post subject: Reply to: Sorting based on Keywords
Reply with quote

OUTFIL is used for specifying particular output. OUTFIL has INCLUDE=/OMIT=. OUTFIL has SAVE. Use three OUTFILs, two with INCLUDE= and one with SAVE.

You have access to manuals, are there are examples here.
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 270
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue Nov 19, 2013 1:07 pm    Post subject:
Reply with quote

Try this job:
Code:
//STEP01   EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SORTIN   DD *                                   
PVMSDF81|FTP DEALER TREND REPORT |CD \SET\DCSRPTS
PWARM110|MONTHLY JM&A NOMAD |CD \DRFITSFP1_DRF_FT
PCBDMO01|ACH DEALER RESERVE FTP PROCESS|         
//OUT01    DD SYSOUT=*                           
//OUT02    DD SYSOUT=*                           
//OUT03    DD SYSOUT=*                           
//SYSIN    DD *                                   
   OPTION COPY                                   
   OUTFIL FNAMES=OUT01,INCLUDE=(1,2,CH,EQ,C'PV') 
   OUTFIL FNAMES=OUT02,INCLUDE=(1,4,CH,EQ,C'PWAR')
   OUTFIL FNAMES=OUT03,SAVE                       
Back to top
View user's profile Send private message
Ramya Ganesan

New User


Joined: 24 Sep 2013
Posts: 5
Location: India

PostPosted: Tue Nov 19, 2013 1:33 pm    Post subject:
Reply with quote

Thanks a ton Mistah and Bill. It worked.
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
This topic is locked: you cannot edit posts or make replies. Job to wait and continue based on reply yugendran COBOL Programming 5 Wed Oct 05, 2016 1:46 pm


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