The output of a UDB Stage is a date (CREATE_D). I need to use this date to select data from a different database.
A possible approach ? : Store the CREATE_D in a sequential file. Write a basic routine to read this value and invoke a job which takes the CREATE_D as a parameter.
Select A,B,C from DB2PROD.ALPHA where SOME_DATE > <JOB-PARAMETER>
i) Can one do this in a Parallel Job ? If so, how ?
ii) If not, how can one do it in a Server Job ?
Can anyone suggest a neater and cleaner method ?
Forming a Dynamic Query in UDB
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 88
- Joined: Tue Jan 13, 2004 3:07 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Neater and cleaner: do it in a job sequence, or in a "roll your own" job control routine. This can pass the date to the main job (parallel or server) as a parameter value.
Another way is to extract the date into a text file, as you indicated, then load an environment variable with the date.
You can then use the environment variable to supply the value to the job parameter.
Another way is to extract the date into a text file, as you indicated, then load an environment variable with the date.
Code: Select all
CREATEDATE=`head -1 filename`; export CREATEDATE
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.