Passing Query Output as parameter
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 284
- Joined: Fri Oct 13, 2006 4:31 am
Passing Query Output as parameter
How can I pass output of a SQL query as parameter in a job
In a Server-Job You can use a Server-Routine to overwrite the UserStatus-variable. The resulting string can be used for succeeding jobs within a sequence. If the query returns several columns You have to format these as a single delimited string.
There is no direct way to pass the result of an SQL-query to a job as a parameter.
There is no direct way to pass the result of an SQL-query to a job as a parameter.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
There are the grateful those are happy." Francis Bacon
-
- Participant
- Posts: 152
- Joined: Mon Mar 07, 2011 6:16 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Is this a query that is guaranteed to return precisely one row? If so, what you seek can be done by using a server job to execute the SQL statement and load its output into the job's user status area whence it can be retrieved downstream in the controlling sequence via the Job activity's $UserStatus activity variable.
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.
Re: Passing Query Output as parameter
It would help if you clarified what exactly it is that you are asking. This SQL output and 'parameter' - are you speaking of the same job that is running the sql? Or another, downstream job?abhilashnair wrote:How can I pass output of a SQL query as parameter in a job
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers