Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script runs at CLI but not through admin schedule

Status
Not open for further replies.

umbletech

IS-IT--Management
Jan 29, 2006
196
Hi All

I'm sure I'm missing a typo somewhere but I just can't see it.

I'm running the following script via an admin schedule which fires fine. As the first step it creates a list of expired exchange data tapes for our IT Operators to return to the library.

The creation of the list is the bit that isn't working. The first bit of the script is:

/* runs from an admin schedule in TSM */
/* process the following serially */
SERIAL
/* Creates the list of Exchange tapes to be returned by IT Ops */
q media stg=tp_exch_* wherestate=mountablenotinlib wherestatus=empty > "E:\LOGS_REPORTS\TAPE Reports\ExchangeRetrieveTapes.txt"


When I copy the q media command into the CLI I get my list of tapes in the correct place. If I preview the script it says it succeeded. But when it runs via admin schedule I get:

ANR2017I Administrator ADMIN issued command: RUN returnexchtapes
ANR2017I Administrator ADMIN issued command: QUERY MEDIA stg=tp_exch_*
wherestate=mountablenotinlib wherestatus=empty >= E:\LOGS_REPORTS\TAPE
Reports\ExchangeRetrieveTapes.txt=
ANR2004E Missing value for keyword parameter - >.
ANR1463E RUN: Command script RETURNEXCHTAPES completed in error.
ANR2753I (CHECKINEXCHANGETAPES):ANR2004E Missing value for keyword
ANR2753I (CHECKINEXCHANGETAPES)arameter - >.
ANR2753I (CHECKINEXCHANGETAPES):ANR1463E RUN: Command script
ANR2753I (CHECKINEXCHANGETAPES):RETURNEXCHTAPES completed in error.
ANR2752E Scheduled command CHECKINEXCHANGETAPES failed.

Any ideas on how to troubleshoot this?
 
Hi there.. .looks like from this output:

ANR2017I Administrator ADMIN issued command: QUERY MEDIA stg=tp_exch_*
wherestate=mountablenotinlib wherestatus=empty >= E:\LOGS_REPORTS\TAPE
Reports\ExchangeRetrieveTapes.txt=
ANR2004E Missing value for keyword parameter - >.


Looks like it isn't recognizing your quotes... maybe try putting single quotes around the double-quotes?

Just a guess...
 
Hi

Please post the output from the following:

query script $script_name format=detail

where $script_name is the name of the script as you defined it.

Matthew
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top