View previous topic :: View next topic
|
Author |
Message |
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
I don't do cobol anymore.
I'll try to get a cobol test pgm when I have the time.
At least now you/I know it's not your SP. |
|
Back to top |
|
|
raj1984
New User
Joined: 28 Oct 2010 Posts: 16 Location: India
|
|
|
|
Thanks Guyc for your support. |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
extract :
Code: |
WORKING-STORAGE.
...
01 ws-misc.
05 ws-invar pic x(09).
...
PROCEDURE DIVISION.
move 'XXX' to ws-invar
display 'Befor[' ws-invar ']'
exec sql
CALL myuserid.GUYCTEST(:ws-invar)
end-exec
perform sqlstate-check
display 'After[' ws-invar ']'
goback
.
... |
returns :
Code: |
Befor[XXX ]
After[10 ] |
|
|
Back to top |
|
|
raj1984
New User
Joined: 28 Oct 2010 Posts: 16 Location: India
|
|
|
|
Thanks GuyC..
It does not run it my shop.. Did you bind WLM (store procedure environment) while registering the SP ? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
bind wlm ?
The stored procedure is native, so no extra binding steps are necessary.
I precompiled/compiled/linked/bound the calling program just like any other DB2 program. |
|
Back to top |
|
|
raj1984
New User
Joined: 28 Oct 2010 Posts: 16 Location: India
|
|
|
|
Thanks GuyC,
Infact i did the same. It is not working in my system. Instead of cobol , we tried to hit the SP from Java , it is working fine.
Seems that it is issue with COBOL program.
Thoughts? |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
not if your sqlcode is still 000.
Could be something with (descending plausiblility):
- parameter style : GENERAL WITH NULLS vs PARAMETER STYLE GENERAL
- different versions of the same SP.
- APF-authorized WLM Environments |
|
Back to top |
|
|
raj1984
New User
Joined: 28 Oct 2010 Posts: 16 Location: India
|
|
|
|
Thanks GuyC and Others.
Finally it is working now.
Thanks
Rajesh |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
thx for letting us know.
What was the final problem? |
|
Back to top |
|
|
raj1984
New User
Joined: 28 Oct 2010 Posts: 16 Location: India
|
|
|
|
Solution suggested by our DBA was to change the variable name.
I declared V_ACT_ID in SP and declared same variable in program as well.
But he wanted to change the name of variable . Basically same variable (name ) should not be used in both SP and COBOL pgm.
Seems to be strange but it is working .
Thanks
Rajesh |
|
Back to top |
|
|
|