View previous topic :: View next topic
|
Author |
Message |
Ramya Ganesan
New User
Joined: 24 Sep 2013 Posts: 5 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
mistah kurtz
Active User
Joined: 28 Jan 2012 Posts: 316 Location: Room: TREE(3). Hilbert's Hotel
|
|
|
|
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 |
|
|
Ramya Ganesan
New User
Joined: 24 Sep 2013 Posts: 5 Location: India
|
|
|
|
Thanks a ton Mistah and Bill. It worked. |
|
Back to top |
|
|
|