pass field values to parameter
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
pass field values to parameter
i have a job where Oralce statge, its output is fed to output of Transformer and its output is fed to Sequential file. lets say transformer has a field and its derviation field is pulled direclty from its input i .e the derivation field will a column value (direct pull from oracle stage). Now i have to use this column value as my sequenctial filename. If i can pass this derivation field value as a value to parameter, and then use that parameter as sequential file. Is this possible. Can i pass values from job to job parameters.
Replies will be appreciated.
Replies will be appreciated.
Re: pass field values to parameter
No, not in the same job. However, what you can do is run a separate job where you get the filename and then set the user status using Basic routine(setuserstatus) from within the job and pass out the filename to a sequence which can then call your actual job and pass the filename as a parameter.
Alternative to setting user status is to write the filename to a file and read it in the sequence again using Basic routine.
Alternative to setting user status is to write the filename to a file and read it in the sequence again using Basic routine.
Last edited by sud on Thu Feb 14, 2008 3:12 pm, edited 1 time in total.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
Re: pass field values to parameter
where can i find this basic routine. I have checked all the routines available and didnt find the setuserstatus routine. Please explain me in detail if you dont mind.. And i didnt understand how can i pass a transformer field value to a sequencer.sud wrote:No, not in the same job. However, what you can do is run a separate job where you get the filename and then set the user status using Basic routine(setuserstatus) from within the job and pass out the filename to a sequence which can then call your actual job and pass the filename as a parameter.
Alternative to setting user status is to write the filename to a file and read it in the sequence again using Basic routine.
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
How can i pass a transformer field value to the subroutine SetUserStatus. We cannot view the transformer field value (this is dynamic, changes for every job) in the after job subroutine. please help. I am totally confused.chulett wrote:No. You'll need to have the value before the job starts and pass it in as a Job Parameter to use it in the filename.
Ultimate question is Can we pass the Transformer field value (only one record but changes for every job) of a job name xxx to the parameter list of the next job name yyy. This yyy has a flat file stage. Its name should include the transformer field value of previuos stage. If i can get that field value as a parameter, job is done. Is this possible with datastage. Please help. Totally confused on this issue.
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
How can i pass a transformer field value to the subroutine SetUserStatus. We cannot view the transformer field value (this is dynamic, changes for every job) in the after job subroutine. please help. I am totally confused.chulett wrote:No. You'll need to have the value before the job starts and pass it in as a Job Parameter to use it in the filename.
Ultimate question is Can we pass the Transformer field value (only one record but changes for every job) of a job name xxx to the parameter list of the next job name yyy. This yyy has a flat file stage. Its name should include the transformer field value of previuos stage. If i can get that field value as a parameter, job is done. Is this possible with datastage. Please help. Totally confused on this issue.
You'll need to create your own "interlude" to the DSSetUserStatus function. It's been discussed a number of times, for example here:
viewtopic.php?t=105450
viewtopic.php?t=105450
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Are you using sequences ? If so, you could always create a sequential file in one job containing just the file name. Then in the sequence, you use the 'execute command' to perform a unix cat on that file to retrieve the contents. The next job in the sequence can pick up the output from the cat command as a parameter using the 'Field' command on the output of the execute command. Use this as your filename.
Therefore, you have a sequence
JOB1 -----> XCMD ----> JOB2
Therefore, you have a sequence
JOB1 -----> XCMD ----> JOB2
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Just rename the file. Load your data into a Temp file and at the same time write the filename into another temp file. When the job finishes, pick the filename from the Temp file you stored it and rename your main file.
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>