Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Sun Jun 29, 2008 11:54 pm Post subject:
Well, as you have posted this in the TSO/ISPF forum as opposed to the Utilities forum I presume you are wanting to know how to reformat your data using a rexx program or clist.
By far the easiest is to use Rexx. You can use PARSE to split your input record into its constituent parts and FORMAT or RIGHT or LEFT to make those parts the correct length whilst concatenating them back into one record for rewriting. And your best bet is to use a CSV file out of Excel so that you can parse on the comma or semi-colon (whichever is used to seperate the fields). _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon Jun 30, 2008 10:26 am Post subject:
sabarisavi,
Save the excel file as .CSV (comma separated file) , FTP it and you can use DFSORT to Parse and create the file in the layout that your cobol program requires.
I'm looking for solution, but not using any technology based like Rexx / PARSE. Since, this task will handle by customer. So, they are looking for a simple solution.
Client will send the PRN file. (Which it will open by text format)
Joined: 10 Nov 2005 Posts: 36 Topics: 2 Location: Flint, MI
Posted: Mon Jun 30, 2008 10:54 am Post subject:
The problem with saving it as a PRN file is that unless each column in the spread sheet is set to left or right justify you will have problems when you have a mixture of numbers in one cell in the column and letters in another cell in the same column. Excel will left justify the letters and right justify the numbers. Koluso's solution sounds like a better idea if my Perl option will not work.
Could you please advise that how we can do thru DFSORT to Parse and create the cobol program require file? Since i read couple of Parse example but couldnt be able to build perfect SORT code.
Thanks Kolusu. We got another issue, please guide me your easiest approch. since, two days i tried but couldnt achive.
In the Input file, we are receiving blank column. That mean, the entire column of A-FIELD-8 or A-FIELD-10 are receiving spaces. In this scenario, how do we handle it? and the alignment also changing, ie.,all the zeros s are suppressed in the field-2,5,7, and 9.
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