csv 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
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

csv File

Post by kab123 »

Hi,

Can I save an excel file as a csv file and use it from Sequential file..? I tried to do so..but the job failed... Pls tell me if there is any way that i can save this file as a Sequential file stage readable..?

Thanks
Thanks
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

If you can open the csv file in any editor such as notepad and if it is a csv file, you must be able to access it in DataStage.

Points to note are
1.) Properties to be set a 'comma delimited'
2.) Provide enough columns as in the file.

If you still have problems, please indicate the steps and the problem for more useful comments.
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
What error messages do you get?

How ahve you defined your input file layout?
Ketfos
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

The error says as follows, it cant open file:

DSD.SEQOpen Failed to open CORAM.TXT in directory so and so
STATUS = 2.
I have specified (,) as delimiter and quote charac as (0)...

Thanks
Thanks
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
Can you view your input file and data in DataStage before you run your job?


Ketfos
kab123
Participant
Posts: 92
Joined: Tue May 18, 2004 4:05 pm

Post by kab123 »

No, I cant even view..
The error I sent you is when i clicked on "View data"..If I run it ..It failed...
Thanks
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
Please check the the file name and path you ahve put in the File Name tab.

Is the file there when you view it in Unix/Windows Directory using ls or dir command?

Ketfos
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Kab123,

In the Sequential File Stage, can you use the ellipse (...) symbol (for the file name) to browse through the file system and locate the file you wish to view?

Also can you please cut-and-paste couple of lines from the top of the csv file to give us an idea of its layout. Maybe you can change the data - if it is protected outside your org.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you saved as CSV why are you trying to open a TXT file?

If you saved as CSV from Excel giving the name CORAM.TXT Excel would have created CORAM.TXT.CSV

Error code 2 means "file not found". That means that CORAM.TXT is not in the directory. Look there to see whether CORAM.TXT.CSV or CORAM.CSV is there. Then, if so, adjust your job design to use the correct file name. If not, check your "save as" procedure in Excel to make sure you're saving into the directory you intend.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

Also, it's not advised to just save as from Excell to .csv and then expect the file to be processed correctly.

Problems found in the past:
- People with different regional settings which affect save as
- Excell skips outputting cells at the end of a row if they don't contain data
- People filling in data where they should not be putting data in Excell

I always suggest to put a macro in the Excell sheet that explicitly outputs the correct .csv format.

Ogmios
In theory there's no difference between theory and practice. In practice there is.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I have found the most common error cause is having Windows Explorer to have the setting "hide known file extensions" set. So you think you have called a file ABC.TXT but in reality Excel has saved it as ABC.TXT.csv and when you try to access it via DS it won't find the file. I've done this, to my embarassment, several times and still haven't completely learned my lesson. I would suggest going into a CMD shell and doing a DIR or changing the explorer value.
Post Reply