View previous topic :: View next topic
|
Author |
Message |
Ziko13
New User
Joined: 19 Jul 2018 Posts: 26 Location: Greece
|
|
|
|
Hi all,
I am new to DB2 and I have the following question.
We have a requirement to get the result from a DB2 user defined function.
How do you embed the DB2 function into the cobol program?
A small example?
Please get back if my first message is vague.
Thank you in advance. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
|
|
Anything related to DB2 must be wrapped in EXEC SQL.. END-EXEC.
You can query the function on SYSIBM.SYSDUMYY1 or use a SET. |
|
Back to top |
|
|
Ziko13
New User
Joined: 19 Jul 2018 Posts: 26 Location: Greece
|
|
|
|
Thank you for the answer.
I assume the set you mention will be something like :
exec sql set :result = db2function end-exec |
|
Back to top |
|
|
Ziko13
New User
Joined: 19 Jul 2018 Posts: 26 Location: Greece
|
|
|
|
A code example would be very helpful |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3049 Location: NYC,USA
|
|
Back to top |
|
|
Ziko13
New User
Joined: 19 Jul 2018 Posts: 26 Location: Greece
|
|
|
|
program ok thank you for the valuable comments. |
|
Back to top |
|
|
|