Sequential file creation

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
marco.mir
Participant
Posts: 16
Joined: Wed Jul 28, 2010 1:30 am
Location: Italy

Sequential file creation

Post by marco.mir »

Hello,

I need to write a sequential file. This file has to show column names and rows. In rows I have different datatypes (date, varchar, decimal).

I immagine that column names have to be varchar, for example:

Date Name Age
21.02.2011 Tom 25

Some people suggested to make 2 jobs. First job will create the file and will write the header with column names (Date, Name, Age), second job will insert my rows using Append to existing file. Source of first job is a Oracle Stage that create column names with a query from dual, the second with a query on database.

Is it possible to make this? My doubt is that in first job my file will have datatypes varchar and if I append other datatypes this could give some problems.

I can use DS 7.5, only server jobs. Please no solutions using routines.

Thanks in advance.
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

Try with "First Line is Column Name" Option at Format tab of Target Sequential file.
Cheers
Ravi K
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So, a problem similar to this? Column names in the output file use the associated field name from the job, so your issue is only an issue if there are spaces in the column name. Otherwise, as noted, simply checking the option noted should suffice, regardless of type since sequential files have no data types - other than string, of course..
-craig

"You can never have too many knives" -- Logan Nine Fingers
marco.mir
Participant
Posts: 16
Joined: Wed Jul 28, 2010 1:30 am
Location: Italy

Post by marco.mir »

Ravi.K wrote:Try with "First Line is Column Name" Option at Format tab of Target Sequential file.
It works, thanks :wink:
Post Reply