Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
Hello Roshanii,
Is first record conatin any string like header or some string which differntiate it with other records. & Secondly on what key u want to sort the records key length & offset etc
Would you please provide sample i/p & out put for that?
But I want the first record to be skipped and to appear in the output as it is. How do I skip the first record and apply the sort only from the second record?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Roshnii,
Your description of what you want to do is quite confusing. You say you want to sort starting with the second record, but you're using OPTION COPY so you're NOT sorting, you're copying. What you really want to do is avoid changing the first record.
You were asked if there's something in the header to identify it, but you never answered that question which is an important one. You show 'header' in the header record. Is that string really there? If not, show what the header record actually looks like and indicate if there's something in the header record to identify it, or if it can only be identified as the first record.
What is the RECFM and LRECL of your input file?
What do you want for the RECFM and LRECL of your output file?
The second IFTHEN clause here identifies the "0" record and essentially does a NOP (overlays positions 1 with itself). Since we don't have HIT=NEXT for this clause, none of the other clauses will be executed for the "0" record.