My input PS file looks like as below:-
03,0000000,,030,0,,,040,1110,,,060,0,,/
03,6000550,,030,1125414,,,040,9990,,,060,1125414,,/
03,550000,,030,0,,,040,8880,,,060,0,,/
03,7676767672,,030,0,,,040,7770,,,060,0,,/
88,072,0,,,074,0,,,100,0,0,,400,0,0,/
I need copy only bold fields into a PS file. Any pointer or any help.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Arun,
Use the code button to preserve data/code alignment.
From the data it looks like you want to propagate the date from the '01' record to all other '03' output records. Is that what you're trying to do?
How many '01' records will you have in input?
You might want to consider parsing based on the field number instead of field values (unless you're sure about it).
The idea should be to parse the variable fields to bring them to fixed positions, including the record type (01,03 etc). Then propagate the date in the first record to all the other records (use WHEN=GROUP and BEGIN when record type=01).
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Quote:
Parsing is working fine just putting the date fetched from '01' type is not concatating with each record
Arun,
Parsing does not copy field data between records. It does not work similar to a symbol substitution. Once you have successfully parsed the data fields you want, then use a 'WHEN=GROUP...PUSH' to propagate the date field from the '01' record to your '03' records. Good luck.
Your code snippet is not throwing the correct output can you please check. I was looking for only 03 level data and it is picking all records of the file. I have not mentioned other levels in the above input data example. Can you please help me to modify your code to data only from 03 level records:-
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
I doubt if anything was "thrown" - in these particular instances you should have used "giving" which has a completely different meaning. (Nothing is "thrown" on a mainframe.)
I doubt if anything was "thrown" - in these particular instances you should have used "giving" which has a completely different meaning. (Nothing is "thrown" on a mainframe.)