Posted: Mon Apr 14, 2008 5:16 am Post subject: splitting a single record to 5 records.
Hi,
I have an unload file of an ims database of 10500 VB length.I have to split the contents of seg3 and seg4 record contents in to 5 records each and i have to write under the seg3 & seg4 records
For example:If Seg3 record is of 10500 length, then let first 500 bytes be in seg3 and each 2500 bytes splitted and written to a separate record with header SEG31,SEG32,seg33,seg34 and same for seg4 records under the respective parent records.I can write a pgm for it,but it seems that sort will do better than the pgm.Please let me know how to perform this using sort tool.
Input file format:
seg0 Data
seg1 Data
Seg2 Data
seg3 Data
seg4 Data
seg5 Data
seg6 Data
seg7 Data
Output file:
seg0 Data
seg1 Data
Seg2 Data
seg3 Data seg31 Data
seg32 Data
seg33 Data
seg34 Data seg4 Data
seg41 Data
seg42 Data
seg43 Data
seg44 Data
seg5 Data
seg6 Data
seg7 Data
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum