How to call a value from Text 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
skumar
Participant
Posts: 88
Joined: Thu May 25, 2006 5:11 am
Location: Hyderabad

How to call a value from Text file?

Post by skumar »

Hi all,

I have a requirement for incremental load in such a way that i have to pass the records from the particular timestamp and i am passing that particular timestamp to a sequential file and in the job when i am picking the data from the source table i want the data greater than the time stamp that i have stored in the sequentail file.I am confused with how to call the timestamp in the sequential file when we are using the source stage(i am using user defind sql) .............


Thanks in advance...............

Regards,
Skumar.
thebird
Participant
Posts: 254
Joined: Thu Jan 06, 2005 12:11 am
Location: India
Contact:

Post by thebird »

You can define the timestamp as a job parameter in your job and then use it in the user SQL query inside the source stage.

You can write a BASIC routine (to be used in the sequence) which will parse the sequential file and then pass the Timestamp inside as a parameter to the extract job.

If you do a search in this forum, you'll get more details on the routine.

Aneesh
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You appear to be confused. At least you've confused me. You are using user-defined SQL to interrogate a text file? Is this perhaps via an ODBC stage referring through an ODBC driver for text files?

A smarter mechanism would be to read the entire file into your job using a Sequential File stage, then use a constraint expression in a Transformer stage to filter the required records. The timestamp can be a job parameter reference or even hard coded in the constraint expression.
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