I want to split input file into 2 files using key word FA030-AB.
Input file.
AUTH RECORDS-0000
UNDEFINED BODYS-000000, REDUNDANT RECS -000000
HOT JOBS ONFILE-00000, OVER PSP CUTOFF-00000
OVER SO CUTOFF-00000, DICT RECORDS-00051
1RPT # FA030-AB BDDDHFHF -HELD VEHICLES
JOB# JDFS0209 PGM# JFS020E -002 09/02/2008 18:35 SERIES 9 OPTION
S.O. SL VON BODY ENG PNT TRN TRIM MKT *************
PMDY0624912 PMDH49 ECN PXR DAV Z5DV 171 ANDY
PMDY0624913 PMDH49 ECN PXR DAV Z5DV 171 ANDY
PMDY0624914 PMDH49 ECN PXR DAV Z5DV 171 ANDY
PMDY0624915 PMDH49 ECN PXR DAV Z5DV 171 ANDY
Output file 1:
AUTH RECORDS-0000
UNDEFINED BODYS-000000, REDUNDANT RECS -000000
HOT JOBS ONFILE-00000, OVER PSP CUTOFF-00000
OVER SO CUTOFF-00000, DICT RECORDS-00051
1RPT # FA030-AB BDDDHFHF -HELD VEHICLES
Output file 2:
JOB# JDFS0209 PGM# JFS020E -002 09/02/2008 18:35 SERIES 9 OPTION
S.O. SL VON BODY ENG PNT TRN TRIM MKT *************
PMDY0624912 PMDH49 ECN PXR DAV Z5DV 171 ANDY
PMDY0624913 PMDH49 ECN PXR DAV Z5DV 171 ANDY
PMDY0624914 PMDH49 ECN PXR DAV Z5DV 171 ANDY
PMDY0624915 PMDH49 ECN PXR DAV Z5DV 171 ANDY
I want to split these input file using only keyword FA030-AB.
Could some one help me how to split using SORT.
Thanks for quick reply .. i want to use only sort utilities ...
my input is report file in that the kayword FA030-AB is constant (for example input contain 10000 record and the key word exist in record 5500 then my 1st output should contain 5500 records and 2nd output should contain 4500 record).
Please let me know is there any command to split the file using perticular key word.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
ran12,
If you have z/OS DFSORT V1R5 PTF UK90013 (July, 2008), you can use a DFSORT job like the following to do what you asked for. I assumed your input file has RECFM=FB and LRECL=80, but you can change the job appropriately for other attributes.