ADSM-L

[ADSM-L] AW: Defining a script that references a file

2014-09-18 15:02:29
Subject: [ADSM-L] AW: Defining a script that references a file
From: Michael malitz <michael.malitz AT MM-IT DOT AT>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Thu, 18 Sep 2014 20:59:55 +0200
Hallo George,

 

i don't know, if somebody already mentioned the following:

 

why not:

 

1.)  Create your script input file
/usr/tivoli/tsm/client/ba/bin/move.data    dynamically containing the mode
date commands as you already do it  today!

 

2.)  create a macro     move_data.mac     (one time task)  which contains
the following  script commands:

 

      A:   delete script move_data  

       B:   define script move_data file=
/usr/tivoli/tsm/client/ba/bin/move.data    (remember, now the new input of
the source file move.data is included)

      C:    run move_data

 

 

Now you can do two things:  

 

1.)  execute the macro MANUALLY with a dsmadmc command:

 

dsmadmc  -itemcommit -id___   -pa____   macro
/usr/tivoli/tsm/client/ba/bin/move_data.mac   

 

 

2.)  or execute AUTOMATICALLY by creating  an ADDITIONAL SCRIPT (one time
task) which  includes  the three statements  A., B and C  from above  -
move_data_auto     and define a server schedule:

 

Define script   move_data_auto
file=/usr/tivoli/tsm/client/ba/bin/move_data.mac    

 

define schedule move_data    t=a  cmd="run move_data_auto"  active=yes
startdate=____    starttime=_____ 

 

 

Now you are done   - have a try

Rgds michael

 

Michael Malitz AT tsmpoweradmin DOT com

 

 

-----Ursprüngliche Nachricht-----
Von: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] Im Auftrag von
George Huebschman
Gesendet: Mittwoch, 17. September 2014 22:18
An: ADSM-L AT VM.MARIST DOT EDU
Betreff: Defining a script that references a file

 

Is this just the way that scripts referencing a source file work?

Do I have to delete and redefine a script each time I want to change the
source file?

 

TSM Server Version 5, Release 5, Level 1.0 Host server: AIX, 6.1.0.0

 

My question is regarding creating a script.  I wanted to make a script
referencing a file on the host server that I could run from a dsmadmc batch
command.  In this case I want to make a list of "move data" commands to run
after I log out.

I set it up on a qa server with little difficulty.

I tried it on prod and it failed and failed.

 

I was baffled because I copied most of what went into prod, straight from
qa; both in TSM and in the source file on the host.

        Both files were in the same location.

        Both files were created as root with the same permissions.

(-rw-r--r--    1 root     system          432 Sep 17 15:02 move.data)

> However, when I ran a "q script move_data f=r" for the Prod script, it

only showed the first line of the source file, which was simply a
description for the contents of the file:

 

tsm: TSM-Prod>q script move_data_f  f=r

/*  temp file for TSM move_data_f script */

 

But the source file itself contained additional (useful) lines.

root@UX-TSM-PROD:/usr/tivoli/tsm/client/ba/bin >cat move.data

/*  temp file for TSM move_data_f script */ Move Data  Volser1
reconstruct=yes  wait=y Move Data  Volser2 reconstruct=yes  wait=y Move Data
Volser3 reconstruct=yes  wait=y

 

> There was a slight difference in the two move.data files on the

different host servers:

The QA version has slightly different text in the description line, one less
space and a capital "T":

root@UX-TSM-QA:/usr/tivoli/tsm/client/ba/bin >cat move.data

/* Temp file for TSM move_data_f script */ Move Data
QVolser1reconstruct=yes  wait=y Move Data  QVolser2 reconstruct=yes  wait=y

 

I went over the differences in the way I defined the scripts and created the
source files.

For the first one, I created the source file first, completely.  Then I
defined the script.

For the second, I created the source file, but with only the description.

        Then I defined the script.

        Then I ran a select to give me a list of move data commands.

        THEN I added those commands to the source file.

It seems like the script only looks at the source file WHEN the script is
defined.  Changes made to that file later are ignored.  Is that right?

I thought I could just go and edit the source file with new data any time I
liked.

 

To fix this problem I had to delete the script and redefine it.  It worked
after that.

 

George Huebschman (George H.)

(At a sensitive but not classified location (containing no PID) that shows
up on google maps)

 

 

 

The contents of this email are the property of PNC. If it was not addressed
to you, you have no legal right to read it. If you think you received it in
error, please notify the sender. Do not forward or copy without permission
of the sender. This message may be considered a commercial electronic
message under Canadian law or this message may contain an advertisement of a
product or service and thus may constitute a commercial electronic mail
message under US law. You may unsubscribe at any time from receiving
commercial electronic messages from PNC at
<http://pages.e.pnc.com/globalunsub/> http://pages.e.pnc.com/globalunsub/

PNC, 249 Fifth Avenue, Pittsburgh, PA 15222; pnc.com