Page 1 of 1

inserting stastic and dynamic data in txt file

Posted: Wed Jun 30, 2010 2:46 am
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.

Posted: Wed Jun 30, 2010 4:21 am
by Sainath.Srinivasan
Have constant files for header and trailer.

You can concatenate them as part of the after-job command.

Posted: Wed Jun 30, 2010 4:22 am
by ray.wurlod
Agreed. As a before-job activity you may need to extract and preserve the header and trailer portions.