inserting stastic and dynamic data in txt 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
harryhome
Participant
Posts: 112
Joined: Wed Oct 18, 2006 7:10 am

inserting stastic and dynamic data in txt file

Post by harryhome »

Hi

I need to enter following data in seqeuncial file.


Name
Address
Timestamp
abc|123|456
edc|567|789
piu|345|567
EndofFile
Endofchar


Here first 3 rows and last 2 rows are static and rest of the rows are retrived from database table.

I was trying to do this in 3 jobs, 1st job write first static part in file then in 2nd job append dynamic part into same file by reading database then in 3rd job append remaining dyanminc part in same file.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Have constant files for header and trailer.

You can concatenate them as part of the after-job command.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Agreed. As a before-job activity you may need to extract and preserve the header and trailer portions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply