Hi,All
I got a issue, I want to put the column_1which select column_1 from sysibm.syssummy1 to a varibale ,so who can you please to tell me how i do it?
How to assignment a sql to a variables
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 35
- Joined: Tue Feb 07, 2012 2:28 am
- Location: China BeiJing
How to assignment a sql to a variables
Dong Ying Ying Come on.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use a sequence.
Create a job to perform the SQL and either load the result into its user status area or write the result into a file.
Once control returns to the sequence populate a user variable from the result either using the $UserStatus activity variable from the Job activity or by using an Execute Command activity to read the file.
Create a job to perform the SQL and either load the result into its user status area or write the result into a file.
Once control returns to the sequence populate a user variable from the result either using the $UserStatus activity variable from the Job activity or by using an Execute Command activity to read the file.
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.
-
- Participant
- Posts: 35
- Joined: Tue Feb 07, 2012 2:28 am
- Location: China BeiJing
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Premium Member
- Posts: 62
- Joined: Tue Dec 07, 2004 7:41 am
- Location: Brasil
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Use a server job to perform the query. In a Transformer stage call a routine that puts the value into the job's user status area. You'll need to create the routine, which is an interlude to the subroutine DSSetUserStatus.
Code: Select all
FUNCTION SetUserStatus(Arg1)
$INCLUDE DSINCLUDE JOBCONTROL.H
Ans = 0
Call DSSetUserStatus(Arg1)
RETURN(Ans)
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.