MAINFRAME - TIP OF THE DAY :
Q. If there is a situation, where we need to code more than 255 steps in a JOB?
A. We need to split jcl into two jcls , at the end of the first jcl check the condition code and initiate the second jcl.
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Tue Jan 30, 2007 7:14 pm Post subject: Update for
Hi, i got a problem, I'm declaring a cursor indexing 2 tables with a select *, ending with a update for.
After the fetch of the cursor, i need to update one camp from table 1 with another from table 2 and im doin' it like :
SET camp 1 = camp 2
WHERE CURRENT OF CRS1
Note: camp 1 and camp 2 are not the real variables
The problem here is that the views of both tables are not indexed to the table, without having the pointer to the table it assums that the camp 2 (from table 2) is from table one, giving error.
Your CURSOR selected camp-2, the FETCH placed the value of camp-2 into a host variable. modify your SET in the UPDATE SQL to have the source field the host variable, not the table column. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum