View previous topic :: View next topic
|
Author |
Message |
jzhardy
Active User
Joined: 31 Oct 2006 Posts: 139 Location: brisbane
|
|
|
|
Does anyone know if the last issued host command gets captured in a (special) variable?
eg, if i have :
address DSNREXX "EXECSQL DECLARE C1 CURSOR FOR S1"
it would be useful to have access to the last host command, eg, for error reporting. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2589 Location: Silicon Valley
|
|
|
|
I do not think the host commands are saved anywhere.
Try something like this:
Code: |
last_host_command = "EXECSQL DECLARE C1 CURSOR FOR S1"
address DSNREXX last_host_command
|
Though, I am pretty sure that rexx will normally stop on a DB2 error. And it will tell you on what rexx statement the error occurred. |
|
Back to top |
|
|
jzhardy
Active User
Joined: 31 Oct 2006 Posts: 139 Location: brisbane
|
|
|
|
yes, that is what I ended up doing - i couldn't find any other way. It's a bit inelegant as I have a large number of separate cursor statements to deal with, but it does the job. |
|
Back to top |
|
|
|