Re: [ADSM-L] script help
2015-03-12 17:46:00
Jeanne,
If you were to run those command at
the DB2 level, they would work fine or possible as a shell script ran from
a TSM macro. There are limitations, as you found out, when trying to run
select statements from within TSM.
Best Regards,
_________________________________________________________
email: ron.delaware AT us.ibm DOT com
Storage
Services Offerings
From:
Jeanne Bruno <JBruno AT CENHUD DOT COM>
To:
ADSM-L AT VM.MARIST DOT EDU
Date:
03/12/15 14:36
Subject:
[ADSM-L] script
help
Sent by:
"ADSM:
Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU>
Hello. Need some help. I'm trying to create
a new script for myself and I want to get the PROCESS_NUM from the Processes
table in a variable.
def script Processes desc="get Process Number"
update script Processes 'declare process processes.PROCESS_NUM%type'
update script Processes 'START:'
update script Processes 'select PROCESS_NUM into process from processes
where PROCESS<>"Identify Duplicates"'
update script Processes 'if (rc_ok) goto ID'
update script Processes 'ID:'
update script Processes "DBMS_OUTPUT.PUT_LINE('process id=' process)"
update script Processes 'EXIT:'
update script Processes 'exit'
tsm: TSMPOK_SERVER1>update script cancelreps 'declare process processes.PROCESS_NUM%type'
ANR1469E UPDATE SCRIPT: Command script CANCELREPS, Line 1 is an INVALID
command : declare process processes.PROCESS_NUM%type.
ANS8001I Return code 3.
tsm: TSMPOK_SERVER1>update script cancelreps "DBMS_OUTPUT.PUT_LINE('process
id=' process)"
ANR2002E Missing closing quote character.
ANR1469E UPDATE SCRIPT: Command script CANCELREPS, Line 20 is an INVALID
command : DBMS_OUTPUT.PUT_LINE('process id=' process).
ANS8001I Return code 3.
And when I put the word 'process' in quotes (just to get around the quote
error above)....it's an invalid command anyway.
tsm: TSMPOK_SERVER1>update script cancelreps "DBMS_OUTPUT.PUT_LINE('process')"
ANR1469E UPDATE SCRIPT: Command script CANCELREPS, Line 20 is an INVALID
command : DBMS_OUTPUT.PUT_LINE('process').
ANS8001I Return code 3.
Are there DB2 equivalents for the 'declare' and 'DBMS_OUTPUT' commands???
I've googled and it looks you can use the commands in DB2, but maybe not
for TSM???
Any input is much appreciated.....
____________________
Jeannie Bruno
Senior Systems Analyst
jbruno AT cenhud DOT com<mailto:jbruno AT cenhud DOT com>
Central Hudson Gas & Electric
(845) 486-5780
|
|
|