Page 2 of 2

Re: Generic DB2 SQLCODE handle for cobol

PostPosted: Tue Apr 17, 2012 12:13 am
by mandor
Ah, I'm sorry. I so much wanted a positive answer that I misread your post as that you know of a method.
Only idea I had so far was to make a rexx program that would recognize variables and map them to error handling module. Just to save some time on coding.

Re: Generic DB2 SQLCODE handle for cobol

PostPosted: Tue Apr 17, 2012 12:50 am
by dick scherrer
Hello,

Only idea I had so far was to make a rexx program that would recognize variables and map them to error handling module. Just to save some time on coding.
Now, maybe i am getting lost. . .

How will some rexx code intercept the values of an already executed SQL statement while the COBOL/SQL is executing?

Re: Generic DB2 SQLCODE handle for cobol

PostPosted: Tue Apr 17, 2012 12:38 pm
by mandor
:-). The idea was to make a rexx script that would go through finished program and add move statements for dclgen variables under "IF SQLCODE < 0".
I have no better idea. We have similar scripts for checking program code for common mistakes.

Re: Generic DB2 SQLCODE handle for cobol

PostPosted: Tue Apr 17, 2012 10:55 pm
by dick scherrer
Hello,

Now i'm catching up . . . :)

That approach could work, but might not be trivial to implement. . . Keep in mind that every time a table is added or changed, the rexx script would need to be re-executed and the appropiate code changes applied and re-compiled.