View previous topic :: View next topic |
Author |
Message |
geetha001 Beginner
Joined: 22 Jun 2005 Posts: 41 Topics: 14
|
Posted: Wed Aug 06, 2008 10:24 am Post subject: Text fields in CSV file |
|
|
I have to convert a file to a CSV file using easytrieve.
In order to keep the text fields/aviod zero suppression, I had a to use a special character
For eg: the output fields are defined as
Code: |
O-QUOTL1 = '"'
O-SPCLCHAR = ''''
O-NUM1 = IN-NUM
O-QUOTR2 = '"'
O-COMMA = ','
if IN-NUM is equal to 0022424, then this will appear in the excel file as
"'0022424"
|
IN-NUM comes from the input file and can have values starting with a zero.
My question is how can I use the equal sign and enclose the value in double quotes when the value is taken from an input file (input field) like the way it is mentioned in the following link
http://www.mvsforums.com/helpboards/viewtopic.php?p=41430#41430
Somehow I am not able to correlate the information given in this link with my requirement. Please let me know if you have solution.
I don't think I can rewrite
O-NUM1 = '="IN-NUM"', easytrieve may not recognize this right?
Thanks. |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed Aug 06, 2008 12:15 pm Post subject: |
|
|
Why not try it?
But why not define IN-NUM as a charcter field and then it would not drop the leading zeros. _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
geetha001 Beginner
Joined: 22 Jun 2005 Posts: 41 Topics: 14
|
Posted: Wed Aug 06, 2008 2:15 pm Post subject: |
|
|
I could have thought better before posting this topic, the answer was right there in Kolusu's email.
I finally tried and it worked. This forum has helped me a lot when I needed.
Thanks |
|
Back to top |
|
 |
geetha001 Beginner
Joined: 22 Jun 2005 Posts: 41 Topics: 14
|
Posted: Thu Aug 28, 2008 10:12 am Post subject: |
|
|
I had to re-open this thread. Because, although I used the solution
Code: |
O-QUOTL1 = '='
O-SPCLCHAR = '"'
O-NUM1 = IN-NUM
O-QUOTR2 = '"'
O-COMMA = ','
if IN-NUM is equal to 0022424, then this appears in the excel file as
="0022424"
|
Although as soon as we see the CSV file, the numeric fields look like text fields, when I click on any cell which then in the column it comes as ="01 " and this requirement is not acceptable to my client. They do not want to see these equal and quote signs, so that they are able to use the normal excel sorting etc.,
Is the only solution to use a quote character infront of the numeric field value or could there be any other solution for this ? Please let me know.
Code: |
O-QUOTL1 = '"'
O-SPCLCHAR = ''''
O-NUM1 = IN-NUM
O-QUOTR2 = '"'
O-COMMA = ','
if IN-NUM is equal to 0022424, then this appears in the excel file as
="0022424"
|
Thanks |
|
Back to top |
|
 |
|
|