If you have ever had to move, you know exactly how painful it can be, for sure.
Carefully packing all of your belongings, each of them in the right boxes, is the first mandatory step.
Keeping track of all the boxes, and all the stuff in each box is hard but necessary: you don’t want to lose your favorite mug or teddy bear.
Moving tens or hundreds of boxes requires a huge effort, maybe a moving van and an extra pair of hands to help.
You need someone you can trust, who will take care of your most valuable items during the transfer, just like you would do yourself. After all, most of those items have a long-standing history behind them, that only you know.
And upon arrival at the destination, you will need to place each box in the right room.
And finally, unpacking and finding just the right spot for your beloved belongings in their new home..
No one should have to go through this all alone. Even Woody in the first Toy Story movie warns you about that: “Has everyone picked a moving buddy? […] I don't want any toys left behind. A moving buddy—if you don't have one, get one!”
For your Workload Automation migration toward folders, everything has been taken care of!
The composer rename will be your perfect moving buddy. Let’s see how it can help you to move all your workload definitions in a few steps to the final destination.
If you have hundreds of jobs, job streams, workstations, resources and so on, that you have meticulously arranged according to a specific naming convention, you will need to create the folders and subfolder structure to match that organization.
This is the first step and you can perform it from the Dynamic Workload Console or from the composer command line.
Once you have created all the destination folders, you can start the actual moving.
All of your soldiers can be moved at one time directly under their commander SARGE, that of course, is part of the original TOY_STORY.
You just need to run
composer rename jd @#TS1_SAR_BOS@ @#/TOY_STORY/SARGE/BUCKET_O_SOLDIERS@;preview
This will let you check how your soldiers will be moved into their bucket without actually moving them.
Now that you have checked that the wildcard you are using matches the right object selection, and the results are what you expect, you can run the command again without the ;preview option and let your moving buddy do the job and rename your definitions with a longer and more user-friendly name.
Remember: If you want to be sure you don’t leave any definitions behind… “A moving buddy—if you don't have one, get one!”.
Let’s go deeper into the command syntax:
Let’s see how the matching rule works:
You can use either the @ or ? wildcard to match the exact names and they will be considered in positional order.
So, in the previous example, the order of the two @ will be respected after the rename:
You can use the composer rename command to move all the following objects by using the long or short keyword
For example, in case you need to move your workstations AAA_BBB_WKS1 and AAA_BBB_WKS2 to the folder /AAA/BBB and rename them at the same time with a more user-friendly name (workstation_1 instead of WKS1 and so on).
Here’s what you need to do:
Note that now that you can move part of the naming convention used in the workload definition names into folder names, you save space and free up characters in the workload definition names.
Remember that, if you are using a Db2 database, in case of massive changes on your workload definitions, it’s recommended to run a dbreorg and dbrunstats. You can find these scripts under the <installation_dir>/TWS/dbtools/db2/script directory.
For a complete reference see the “Organizing scheduling objects into folders” topic in the User’s Guide and Reference.