Urgent Help Required!
I have a input file as below with 6 records (first four chars as the cust_id and the 7th char as the comm_ref <sorted on cust_id,Comm_ref>)
1221 1
1221 2
1222 1
1223 1
1223 2
1223 3
I need to create a test file with records for each of the cust_id to be repeated 3 times ( in above case there are 3 different cust_id) and the new records created to have the cust_id starting from 5001
The ouput file should have the below 18 records.
5001 1
5001 2
5002 1
5002 2
5003 1
5003 2
5004 1
5005 1
5006 1
5007 1
5007 2
5007 3
5008 1
5008 2
5008 3
5009 1
5009 2
5009 3
Is this possible using sort tool?
Thanks