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
 
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: 7315

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: 287
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 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 Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm

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