After purusing The Friendly Manuals, reading boards, and searching our system, I give up.. well almost :=)
Anyway, being a db2 dba and having minimal rexx coding exposure I'm faced with a need to learn as I burn in an effort to convert rexx/db2 access via a third-party to generic rexx.
I've created an exec that will be used to do standard db2 commands ie display util(*), term util(*), eitc. Got it working fine, but in an effort to try to built a better mousetrap (my mistake!), I decided to pull a verification piece of the code out that could be useful for other execs and for ease of maintenance.
Excepts of code are:
...
<from calling exec>
call 'CHKSSID' argSSID
if ValidInput = 'n' then do
say 'ssid: ' argSSID ' is invalid'
return
end
<from called exec>
CHKssid: arg argSSID
call CheckValidSSID /* validate ssid */
if ValidInput = 'n' then do
say 'ssid: ' argSSID ' is invalid'
return
end
EXIT
CheckValidSSID:
/*!!!*/
ValidInput = 'y'
select
when argSSID = 'DSN' then NOP
when argSSID = 'DB2O' then NOP
when argSSID = 'DB2P' then NOP
when argSSID = 'DB2Q' then NOP
when argSSID = 'DB2T' then NOP
when argSSID = 'DB2V' then NOP
when argSSID = ' ' then do
ValidInput = 'n'
end
otherwise do
ValidInput = 'n'
end
end
return
The call works fine, but passing the result back is not, nor has various attempts been fruitful. Any assistance is greatly appreciated.
Anyway, being a db2 dba and having minimal rexx coding exposure I'm faced with a need to learn as I burn in an effort to convert rexx/db2 access via a third-party to generic rexx.
I've created an exec that will be used to do standard db2 commands ie display util(*), term util(*), eitc. Got it working fine, but in an effort to try to built a better mousetrap (my mistake!), I decided to pull a verification piece of the code out that could be useful for other execs and for ease of maintenance.
Excepts of code are:
...
<from calling exec>
call 'CHKSSID' argSSID
if ValidInput = 'n' then do
say 'ssid: ' argSSID ' is invalid'
return
end
<from called exec>
CHKssid: arg argSSID
call CheckValidSSID /* validate ssid */
if ValidInput = 'n' then do
say 'ssid: ' argSSID ' is invalid'
return
end
EXIT
CheckValidSSID:
/*!!!*/
ValidInput = 'y'
select
when argSSID = 'DSN' then NOP
when argSSID = 'DB2O' then NOP
when argSSID = 'DB2P' then NOP
when argSSID = 'DB2Q' then NOP
when argSSID = 'DB2T' then NOP
when argSSID = 'DB2V' then NOP
when argSSID = ' ' then do
ValidInput = 'n'
end
otherwise do
ValidInput = 'n'
end
end
return
The call works fine, but passing the result back is not, nor has various attempts been fruitful. Any assistance is greatly appreciated.