View previous topic :: View next topic
Author
Message
karthik3883 New User Joined: 19 Oct 2007Posts: 37 Location: chennai
Hi I have requirement my input file and output file look like this in attachment
could you please help how can i achieve ths in sort
Input:
Code:
/GTSCACOEST ,152025,0.,0000000000,/GTSCACO
/GTSCACOEUR ,152025,0.,0000000000,/GTSCACO
/GTSCACOUSD ,152025,0.,0000000000,/GTSCACO
/GTSOTC USD ,152025,152025000.,1116359313,/GTSOTC
Output:
Code:
/GTSCACOEST , 152025 , 0. , 0000000000 , /GTSCACO
/GTSCACOEUR , 152025 , 0. , 0000000000 , /GTSCACO
/GTSCACOUSD , 152025 , 0. , 0000000000 , /GTSCACO
/GTSOTC USD , 152025 , 152025000. , 1116359313 , /GTSOTC
Inlined, Code'd, reversed to avoid further confusion (so input comes first, like everyone else).
Back to top
Gnanas N Active Member Joined: 06 Sep 2007Posts: 792 Location: Chennai, India
Hi,
Please use CODE tags to present the data instead of an attachemnt.
Do you want to squeeze out the spaces? If so, what are the rules for the same? Also, provide RECFM, LRECL of input and output data sets.
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
If you just want variable-positioned fields to become fixed-positoned fields, look at PARSE.
Back to top
karthik3883 New User Joined: 19 Oct 2007Posts: 37 Location: chennai
Hi Gnanas,
I dont want to eliminate spaces,the output file should contain leading and trailing spaces for each column as explained in output screen shot and it is fixed.
and there is no limitiation with file size
Back to top
Bill Woodger Moderator Emeritus Joined: 09 Mar 2011Posts: 7309 Location: Inside the Matrix
Don't complain when it was you who confused Gnanas by putting the output file first.
Rather than answering their Gnanas's quesion, why did you feel the need to mention file size?
Look at PARSE. Use it. Requirement satisfied.
Back to top
karthik3883 New User Joined: 19 Oct 2007Posts: 37 Location: chennai
Hi Bill,
I am not complaining,I just explained my requirement.
anyway thanks for your help will check PARSE
Regards
Karthik
Back to top
Please enable JavaScript!