Posted: Thu Mar 19, 2015 6:51 am Post subject: Parsing the delimter file
Hi All,
Input file is pipe delimited VB file.
and output should contain '99999' after the 9th delimiter. Please suggest how to achieve through SORT/ICETOOL utility
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Mar 19, 2015 12:56 pm Post subject:
nbdtrjk1,
Convert the delimiter '|' to a different delimiter using FINDREP 1 at a time. And then parse for the 8th delimiter and then build the desired record and use another FINDREP to replace changed delimiters back to the original delimiter.
I assumed that your first 8 fields have a length of 100 bytes. If it is greater then change the length in FIXLEN value. Also remember to add the 6 bytes to JFY length.
Change eight pipes to X'FF' (delimited data, text only, so X'FF' won't appear as real data). PARSE a field finishing at what is now the first pipe, left-justify and follow with the closing value+pipe. Change the eight high-value delimiters back to pipes.
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