ADSM-L

Re: [ADSM-L] schedulde command with date suffixed log file

2014-04-01 09:10:29
Subject: Re: [ADSM-L] schedulde command with date suffixed log file
From: Rick Saylor <rsaylor AT AUSTINCC DOT EDU>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Tue, 1 Apr 2014 08:07:08 -0500
Arnaud,

The extra quotes around the log file name are only needed if you are
running the command from a script or AIX command line. Below I've
used your define schedule command on my TSM server. It fails only
because I don't have a domain named AIX.

[p7tsm:myid] /home/myhome #dsmadmc -id=xxxxx -password=***** def
sched aix
test_sched  act=command  objects='"/tmp/test.sh >/tmp/test.log.`date
'+%d.%m.%Y'` 2>&1"' durunits=minutes duration=10 startt=22:00 peru=o priority=1
IBM Tivoli Storage Manager
Command Line Administrative Interface - Version 6, Release 4, Level 0.1
(c) Copyright by IBM Corporation and other(s) 1990, 2012. All Rights Reserved.

Session established with server ADSM: AIX
  Server Version 6, Release 3, Level 4.0
  Server date/time: 04/01/14   07:46:34  Last access: 04/01/14   07:42:09

ANS8000I Server command: 'def sched aix test_sched act=command
objects="/tmp/test.sh >/tmp
/test.log.`date +%d.%m.%Y` 2>&1" durunits=minutes duration=10
startt=22:00 peru=o priority
=1'
ANR1590E DEFINE SCHEDULE: Policy domain AIX is not defined.
ANS8001I Return code 11.

ANS8002I Highest return code was 11.

If you've already started dsmadmc then don't put in the extra quotes.
Below is your define schedule command that I've run and again it
fails only because I don't have a domain named AIX.

tsm: ADSM>def sched aix
test_sched  act=command  objects="/tmp/test.sh >/tmp/test.log.`date
'+%d.%m.%Y'` 2>&1" durunits=minutes duration=10 startt=22:00 peru=o priority=1
ANR1590E DEFINE SCHEDULE: Policy domain AIX is not defined.
ANS8001I Return code 11.

I hope this helps,
Rick

At 03:05 AM 4/1/2014, you wrote:
Rick,

Thanks a lot for your feedback. Unfortunately, your solution does
not seem to be working :

>def sched aix
test_sched  act=command
objects='"/tmp/test.sh >/tmp/test.log.`date '+%d.%m.%Y'` 2>&1"'
durunits=minutes duration=10 startt=22:00 peru=o priority=1
ANR2004E Missing value for keyword parameter - +%d.%m.%Y'`.
ANS8001I Return code 3.

Cheers.

Arnaud


-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On
Behalf Of Rick Saylor
Sent: Monday, March 31, 2014 5:32 PM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: schedulde command with date suffixed log file

Arnaud,

It was unclear whether you wanted the log file on the TSM host or
client. However, I'm assuming that you want to log the output when
the script runs on the client. You'll need to put extra quotes around
the object for this to work. See below:

def sched aix
test_sched  act=command  objects='"/tmp/test.sh >/tmp/test.log.`date
'+%d.%m.%Y'` 2>&1"' durunits=minutes duration=10 startt=now peru=o priority=1

Rick

At 09:27 AM 3/31/2014, you wrote:
>Hi all,
>
>A quick one: does anyone have the proper syntax to define a client
>schedule (using admin command line, or macro) that would execute a
>command having some date-suffixed log file, like :
>
>def sched aix
>test_sched  act=command  objects="/tmp/test.sh >/tmp/test.log. `date
>'+%d.%m.%Y'` 2>&1" durunits=minutes duration=10 startt=now peru=o priority=1
>
>TSM server is 6.3.3.1 and runs under AIX .
>
>I already have tried various combinations of single and double
>quotes without success  ...
>
>TIA.
>
>Cheers.
>
>Arnaud


----------------------------------------------------------------------------
Rick Saylor                  Austin Community College   Voice: (512)223-1182
Director of System Services  9101 Tuscany Way           Fax:   (512)223-1211
Information Technology       Austin, Texas  78754

<Prev in Thread] Current Thread [Next in Thread>