Generic DB2 SQLCODE handle for cobol



IBM's flagship relational database management system

Re: Generic DB2 SQLCODE handle for cobol

Postby mandor » Tue Apr 17, 2012 12:13 am

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.
mandor
 
Posts: 28
Joined: Wed Feb 23, 2011 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Generic DB2 SQLCODE handle for cobol

Postby dick scherrer » Tue Apr 17, 2012 12:50 am

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?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Generic DB2 SQLCODE handle for cobol

Postby mandor » Tue Apr 17, 2012 12:38 pm

:-). 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.
mandor
 
Posts: 28
Joined: Wed Feb 23, 2011 4:19 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Generic DB2 SQLCODE handle for cobol

Postby dick scherrer » Tue Apr 17, 2012 10:55 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Previous

Return to DB2

 


  • Related topics
    Replies
    Views
    Last post