Here is the actual production files data ,
Ron,
Your original question had fixed length data in column 1 and now you show
variable length data. It is tough to provide solutions to a moving target.
Even with variable data, you can still use SEQNUM with RESTART
>>so here if we do a SORT and put a SEQNUM , is it going to work ? we see
that in the input file the length of the 1'st column is not same for all of
the rows
Why do you need SORT? Isn't the column 1 already sorted ? Since you column
1 has variable data, you simply need to PARSE out that field and put it in
a temporary place and then use SEQNUM with RESTART.
Something like this ( This will create a 4 byte sequence number followed by
a comma and your input data is copied as is. I also assumed that your
column 1 can have a maximum length of 16 bytes of variable data.
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
PARSE=(%01=(ENDBEFR=C',',FIXLEN=16)),
OVERLAY=(86:%01)),
IFTHEN=(WHEN=INIT,
BUILD=(SEQNUM,4,ZD,RESTART=(86,16),
C',',
1,80))
//*
As I said earlier you need to spend time reading the "Getting started"
manual and try out.
Thanks,
Kolusu
DFSORT Development
IBM Corporation
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN