I have a job parameter called input_file.
In my job control code I try to open the file with the following code
OPENSEQ "#input_file#" TO FILE THEN
The job control parameter has a default value.
I added some logging statements to see what is happening and it appears that the job parameter is not being expanded.
When are job parameters evaluated by datastage?
Can job parameters be used in the before-job and after-job subroutines?
job parameters in job control code
Moderators: chulett, rschirm, roy
The syntax in the Job Control code should read:
You do not need to specify the # hash marks in Job Control code to use parameters, and the quotes you used are also extraneous.
Happy coding...
Code: Select all
OPENSEQ input_file TO FILE THEN {...}
Happy coding...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you want to make it pellucid, specify DSGetParamInfo() explicitly.
You should always specify a LOCKED clause with OpenSeq. Since OpenSeq sets an update lock, you need to be certain that the lock is not already owned by some other process.
Code: Select all
InputFileName = DSGetParamInfo(DSJ.ME, "input_file", DSJ.PARAMVALUE)
OpenSeq InputFileName To FileVariable...
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.