Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CSV file , to display numeric data with leading zeroes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Fri Nov 21, 2014 12:50 pm    Post subject: CSV file , to display numeric data with leading zeroes
Reply with quote

I am creating a CSV file from a mainframe job, and the file contains some numeric data such as client ID which is having leading zeroes in my mainframe PS file. The same value in CSV file also should display the leading zeroes.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri Nov 21, 2014 1:26 pm    Post subject: Reply to: CSV file , to display numeric data with leading z
Reply with quote

Well, that's excellent. Thanks for letting us know. However, this type of thing is probably better for Twitter. Leave this site free for problems that you are having, and put the daily milestones of excitement elsewhere.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Nov 21, 2014 2:39 pm    Post subject: Reply to: CSV file , to display numeric data with leading z
Reply with quote

the wording could not have been worse ...
the TS probably complains that after

having done some processing
having created a csv dataset
having transferred it to the PC
having opened it with EXCEL

what he thinks should be treated as an ALPHANUMERICS is displayed as a number
( I.E. without leading zeroes )
Back to top
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 175
Location: UK

PostPosted: Fri Nov 21, 2014 3:29 pm    Post subject:
Reply with quote

If Enrico's assumption as to what the TS wants is correct, then I may have the solution as I had the exact same issue myself a couple of weeks back.

But I'll wait for confirmation from the TS that this is the issue first. As Bill has pointed out, we don't actually know if he even has a problem.
Back to top
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Fri Nov 21, 2014 4:19 pm    Post subject: what he thinks should be treated as an ALPHANUMERICS is disp
Reply with quote

Sorry for the confusion, My requirement is that the CSV file should convert the numeric data as Alphanumeric so that the Leading Zeroes are displayed in specific columns.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Fri Nov 21, 2014 4:35 pm    Post subject: Reply to: CSV file , to display numeric data with leading z
Reply with quote

tbe CSV file will not convert anything ...
CSV means only Comma Separated Values

what application are You talking about ?

since we spend time trying to help You
GOOD MANNERS dictate that You should spend more of Your time in trying to post a good description of Your requirement
Back to top
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Fri Nov 21, 2014 5:24 pm    Post subject: CSV file
Reply with quote

My Mainframe Job is creating a Reprot and i did a File transfer of the report as a CSV file. when i am opening the CSV file i am losing the leading zeroes in certain fields as teh cSV file is treating those fields as numeric and removing teh padded zeroes from left. I want to retain the leading zeroes in my CSV file.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 21, 2014 5:38 pm    Post subject:
Reply with quote

I would suggest that the problem is with microsoft excel or whatever you use to open the csv file with rather than a mainframe related problem.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri Nov 21, 2014 6:34 pm    Post subject: Reply to: CSV file , to display numeric data with leading z
Reply with quote

Look at your file and confirm the leading zeros are there.

Then look at the cell formatting capabilities in Excel. Choose a non-numeric format, or a numeric format which does not suppress leading zeros.
Back to top
View user's profile Send private message
Deepthy Jose P

New User


Joined: 07 Mar 2007
Posts: 40
Location: India

PostPosted: Mon Nov 24, 2014 10:37 am    Post subject: CSV file , to display numeric data with leading zeroes
Reply with quote

Thanks Bill, the PS file created from the program had the leading zeroes. The CSV report is created on a monthly basis and so manually changing the format of the excel column to Text is not feasible. A sort step was added which will add a =" to the front and " to the end of the required columns. i.e EMP_ID column was changed to ="EMP-ID" and the CSV file generated the columns in text format retaining the leading Zeroes.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Mon Nov 24, 2014 8:19 pm    Post subject:
Reply with quote

Quote:
daily milestones of excitement

I like that. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us