Downloading a dataset as .CSV format

TSO Programming, ISPF, SDF, SDSF and PDF, FTP, TCP/IP Concepts, SNA & SNA/IP etc...
sankar.guna
Posts: 11
Joined: Wed Apr 02, 2008 5:05 pm
Skillset: COBOL,CICS,DB2,IMS,VSAM,JCL
Referer: Friend

Downloading a dataset as .CSV format

Postby sankar.guna » Thu Apr 03, 2008 5:07 pm

Hi,

Can anyone tell me how to download a dataset into a .CSV format file ?
Thanks a lot.,

arunprasad.k
Posts: 110
Joined: Thu Dec 27, 2007 5:18 pm
Skillset: Known little stuffs to answer a few queries!!
Referer: Google
Contact:

Re: Downloading a dataset as .CSV format

Postby arunprasad.k » Thu Apr 03, 2008 5:44 pm

Just download the comma demilited file and rename it as SOME_NAME.CSV :D

Here are the few points to remember about comma demilited file.

#1 Each field should be seperated with a comma (you can use any symbol other symbol too). For example,

Code: Select all

Emp_ID,Emp_Name,Emp_Dept
12345,Sam,Healthcare
23456,Ram,Insurance
34567,Kumar,Retail


#2 If one of your fields already has ',' in it, then you have to be little careful and have to add double quotes to differentiate the delimiter. For example,

Code: Select all

"Emp_ID","Emp_Name","Emp_Dept"
"12345","Sam","Healthcare"
"23456","Ram","Insurance"
"34567","Kumar","Retail"


If this is not what you want, then post the requirements clearly.

Arun.

User avatar
dick scherrer
Global moderator
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am

Re: Downloading a dataset as .CSV format

Postby dick scherrer » Fri Apr 04, 2008 2:02 am

Hello,

Can anyone tell me how to download a dataset into a .CSV format file ?
Downloading the file should not be a problem. Keep in mind that the download will not make csv data from plain text data - the mainframe process that creates the file must also create the delimiters.

If there is any chance that the data might contain commas as data, i'd suggest using a different delimiter. The tab character (x'05') works well. It you might have commas in the data and must use commas as the delimiters, then do as suggested and wrap each field in double quotes.
Hope this helps,
d.sch.


  • Similar Topics
    Replies
    Views
    Last post