I have one input file which have unique ID.
Requirement: every 4th and 5th line having 0255 record should remove from there and should be added after 6th line. Means first three 0255 records should be together. Last two 0255 records should kept as it is.
ID: Position 1-4
REC-CD: POS 6-9
one more field is there position 11 to 14. Value for this field is 0100 for first three 0255 records, rest of the first 3 0255 records the value is 9900.
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
Quote:
I have one input file which have unique ID.
The data you posted does not show any unique ID as every record has duplicated fields.
Quote:
every 4th and 5th line having 0255 record
Your posted input shows the 3rd and 4th lines have 0255, not the 4th and 5th.
Since you cannot even properly state your problem, exactly how do you expect us to help you?
And terminology is critical in IT, where similar terms may mean very different things. On the mainframe, there are data sets (not files) which have records (not lines). Your title mentions "rows", which is a term very specifically used for data bases (such as DB2) and not for data sets. So by your misuse of terminology you have completely muddled what you have here -- data set? data base? Who knows?
Also, use the Code button when posting data as it preserves spacing, which can be very important at times.