I have a below requirement , Need your help on the below.
My input file has records like this.
Code:
ABC-2
MAIN 1
ABC-1
MAIN 2
ABC-3
ABC-6
MAIN 3
My OUTPUT file should be in this way
Code:
ABC-2 MAIN 1
ABC-1 MAIN 2
ABC-3 000000
ABC-6 MAIN 3
Here.. the OUTPUT file was formatted in such way that ..MAIN is being clubbed with ABC .. if MAIN
is found immediately after the ABC . IF MAIN was not there immediately after any ABC .. that particular ABC should be clubbed with zeroes or can be left blanks
Joined: 03 Feb 2007 Posts: 175 Location: PUNE(INDIA)
Hi anish.ibm,
You haven't give LRECL of file, length of key, but still I have tried to provide you the soln with ceratin assumptions.
Here is your SORT JCL
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
anish,
Here's a more efficient way to do what you asked for. It only takes one SORT pass (for SPLICE) as opposed to Parag's way which takes one SORT pass (for SPLICE) and two COPY passes. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use INREC with SPLICE. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see: