delimited flat-file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
nitin376
Charter Member
Charter Member
Posts: 40
Joined: Tue Apr 11, 2006 9:38 am

delimited flat-file

Post by nitin376 »

How to turn spread sheet (xls) into a delimited flat-file ?
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Re: delimited flat-file

Post by mctny »

nitin376 wrote:How to turn spread sheet (xls) into a delimited flat-file ?
you can save the file as csv ( coma delimited) or tab delimited or unicode text.
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
nitin376
Charter Member
Charter Member
Posts: 40
Joined: Tue Apr 11, 2006 9:38 am

Re: delimited flat-file

Post by nitin376 »

mctny wrote:
nitin376 wrote:How to turn spread sheet (xls) into a delimited flat-file ?
you can save the file as csv ( coma delimited) or tab delimited or unicode text.
Thanks for the promt reply.
See I am new to datastage , I have been told to convert spred sheet file to delimited flat file using datastge.
What i did is saved that files as cvs and then i loaded into seq stage and used the transformer just to map and then out put into seq stage with extenstion .dat. Also in the format tab i clicked first row is column.
The programs runs but when I see the output of the seq stage file , it shows same data format as input.
Please help me with concepts, i may be doing a sily mistake.

thanks
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

what do you want to do ?
you don't need DataStage to convert an excel spreadsheet to a flat file.

just save the spreadsheet as a csv, if you want a different delimiter other than comma, open the csv file in notepad or wordpad and replace all commas with your desired delimiter.

after that you can save that file in dat extension as well. see you don't need datastage at all to do all of this.
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If you have to use DataStage to do this, then search the forum for the many posts on using ODBC to read the .xls file directly. You'll see mention of setting up a DSN, reading 'system tables', handling worksheets, etc - this only works on a Windows server, by the way.

Well, not 'only', but for UNIX you need to purchase specific ODBC drivers, whereas Windows comes with what you need. You can certainly do it, but it's much simpler to save it as a .csv or some other format directly from Excel... or look into macros or other means to automate it.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply