Copying scripts from old TSM to new TSM server

John22439

ADSM.ORG Member
Joined
Jan 3, 2007
Messages
60
Reaction score
0
Points
0
Website
Visit site
Hi all,

I am splitting off my TSM server into two entities, and I would like to find a simple way to copy over my scripts from the old server to the new.

The old server is on MVS (5.4.4.0) and we are going with the latest and greatest MVS version (which also appears to be the last) of 5.5.x.x

Is there an easier way to copy the scripts over - other than manually typing each and every one? (I have several hundred lines of code)

Here is what I've tried...

I created a windows bat file that uses the dsmadmc and runs great until I have to use aliases... see below


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO off

echo *
echo Creating Scripts
echo *
echo Please stand by...
echo *

dsmadmc -id=admin -password=xxxxxx "DEFINE SCRIPT TEST_CREATE_2 DESCRIPTION='Display all clientnodes per platform'"

dsmadmc -id=admin -password=xxxxxx "UPDATE SCRIPT TEST_CREATE_2 'select platform_name,count(*) from nodes group by platform_name'"

:END
PAUSE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This works fine, but if I add an alias, it drops the quotes and the script fails...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ECHO off

echo *
echo Creating Scripts
echo *
echo Please stand by...
echo *

dsmadmc -id=admin -password=xxxxxx "DEFINE SCRIPT TEST_CREATE_2 DESCRIPTION='Display all clientnodes per platform'"

dsmadmc -id=admin -password=xxxxxx "UPDATE SCRIPT TEST_CREATE_2 'select platform_name,count(*) as "Number of nodes" from nodes group by platform_name'"

:END
PAUSE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I've tried single quotes and double quotes... perhaps there is a much easier way?

Cheers,
j
 
John,

You may be interrested by following approach :

On old server :

dsmadmc -id=xxx -password=xxx query script name_of_the_script f=m > /tmp/some_filename.mac

Once done, copy the some_filename.mac file to your new server, then issue :

dsmadmc -id=xxx -password=xxx macro some_filename.mac

You're done ... !

Cheers.

Arnaud
 
John,

You may be interrested by following approach :

On old server :

dsmadmc -id=xxx -password=xxx query script name_of_the_script f=m > /tmp/some_filemane.mac

Once done, copy the some_filename.mac file to your new server, then issue :

dsmadmc -id=xxx -password=xxx macro some_filemane.mac

You're done ... !

Cheers.

Arnaud

OOOoOOOoo!!!

I like this!

The "f=m" is to format the output?

Can I then do this as a large batch...


dsmadmc -id=xxx -password=xxx query script * f=m > /tmp/all-scripts_filemane.mac


Then run it?
 
Yes f=m means format=macro, and I believe that it should be possible to get them all in a single step ...
 
Yes f=m means format=macro, and I believe that it should be possible to get them all in a single step ...

I'll give it a try once we get the server up - and I will be certain to update this thread!

Gros merci Arnaud!

j
 
Just a quick reply...

I did a test, and yes I can collect all the scripts.

dsmadmc -id=xxx -password=xxx query script *f=m

Once the .MAC file was created - I had to edit it and delete all of the extranuous data so that only the "DEFINE" and "UPDATE" commands were left. Then I ran the macro and voilà!

Other than editing the .MAC file it worked!!

Thanks again!

j
 
Just a tip for another way how to do it.

I prefer to have the script in a file on the file system. When I want to change the script on the TSM server, I do following:
1 - update what's needed in the file
2 - delete the script in TSM server
3 - define the script again (def scr %scriptname% file=%path_to_the_file%)

The file works as a backup too, in case someone corrupts or deletes the script in TSM. Well this doesn't happen, but you never know.
Also it's easy to copy it to another server or whatever.
 
  • Like
Reactions: BBB
UPDATE...

Thanks all, works great!

Now another related quick question:

Are there any other "tables" that can be converted to a MACRO in order to facilitate moving stuff around?

I realize I need to EXPORT my POLICY sets etc...

Just curious.

j
 
Not that I am aware of. But for exporting policy sets and so on you can use the "export policy" command. You need of course establish S2S first.

Below is the extract from the Admin Guide:
The server exports policy information, such as:
v Policy domain definitions
v Policy set definitions, including the active policy set
v Management class definitions, including the default management class
v Backup copy group and archive copy group definitions
v Schedule definitions for each policy domain
v Client node associations, if the client node exists on the target server

Regards. Wim.
 
Back
Top