Posted: Mon Oct 27, 2014 11:28 am Post subject: DFSORT extract CSV file and exclude comma for certain data
Hi,
I am trying to remove the comma between double codes alone first and then parse each column in specific postion. Each colum is divided by comma character.
I am struck with following things. Please advice
1. Remove " "
2. Replace , with spaces between " "
3. Parse the file base on , character
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Mon Oct 27, 2014 1:12 pm Post subject:
Magesh_J,
Try this JCL. The trick here is to differentiate the records with double quotes around the name. So we use Findrep to modify that to different character and then perform the parsing. If you want to see how the processing is done, run the job with 1 IFTHEN statement at a time and see the results.
The Input has some spaces too between commas, so initially we changed it to "|" and We used the PAIR=QUOTE which is excluding comma between double codes, I.e. comma between double code will be there in output.
Changing rest of the comma with ~ symbol, and replaced the double codes with null and replaced pipe symbol back to spaces.
Later we are writing another step to parse data using "~" symbol.
Btw if you can send me your input file and desired output file as text file, I may try to come up with a different solution. _________________ Kolusu
www.linkedin.com/in/kolusu
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