How can I do it?

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
Angel
Participant
Posts: 18
Joined: Thu May 29, 2003 8:46 am
Location: Spain

How can I do it?

Post by Angel »

I have a job that does the convertion from a sequential file to a table.
The structure of the secuential file is:
PRIMARY KEY | BILL NUMBER | TELEPHON NUMBER | DATE
00001 999999 8765443 01/01/2003
The structure of the table is:
PRIMARY KEY | BILL NUMBER | TELEPHON NUMBER | DATE
00001 999999 8765443 01/01/2003

The process will consist in saving, every record of the sequential file that is read, in the table mentioned above and in another
one associated with it, (For every record of the sequential file it generates one record in the first tabla and three in the second one)in order to obtain:
PRIMARY KEY | CODIGO | VALOR
00001 01 999999
00001 02 8765443
00001 03 01/01/2003

Where 01 is BILL NUMBER
02 is TELEPHON NUMBER
03 is DATE



At the moment the job's design would be: SecFileStage-->TransformerStage-->ODBCStage
How should this be done and what would the job's design be?
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

It's easy to do in DataStage. You can do this by having four outputs from your transformer, one to the first table and three to your second table. Once you have created the output links you will see four sets of outputs within your tranformer, just drag the fields into those four outputs. If your telephone number is optional you can add a constraint to ensure it is only written out when it is set.

Vincent McBurney
Data Integration Services
www.intramatix.com
Angel
Participant
Posts: 18
Joined: Thu May 29, 2003 8:46 am
Location: Spain

Post by Angel »

Thank you very much Vincent.
Post Reply