ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Moving a large number of objects to the transport case

book

Article ID: 88389

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

There are different methods of putting a large number of objects into the Transport Case.

  • If they are in one folder, select all objects and right click them.

  • You can also use the search function, if they have e.g. a common name pattern:

 

  • However, the search is limited. What if you e.g. move all Linux jobs to the Transport Case that have -bash as Shell-attribute.

Environment

Release: AOATAM99000-9.0-Automic-One Automation Tools-Application Manager
Component:

Resolution

In such a case, you can use SQL-commands:
  • To find the list of objects, create an according select. For the example (Linux jobs that have -bash as Shell-attribute):
SELECT OH.OH_Name
  , JBA.JBA_Rest
FROM JBA, OH
  WHERE OH.OH_Idnr   = JBA.JBA_OH_Idnr
    AND JBA.JBA_Rest LIKE '%M=''-bash''%'
    AND OH.OH_Name   LIKE 'JS.UN%'
    AND OH.OH_Client = 1977;
  • The received list can be used to move the objects to the Transport Case. This is done by setting the value of the export flag (OH_ExpFlag) to 1 for these objects. Using the select as sub-select in the where-clause of the update command looks like in the example below: 
UPDATE OH
  SET OH_ExpFlag = 1
  WHERE OH_Name IN (SELECT OH.OH_Name
      FROM JBA, OH
      WHERE OH.OH_Idnr = JBA.JBA_OH_Idnr
        AND JBA.JBA_Rest LIKE '%M=''''%'
        AND OH.OH_Name LIKE 'JS.UN%'
        AND OH.OH_Client = 1977
        AND OH_Deleteflag = 0
        AND OH_Otype NOT IN ('FOLD', 'CLNT', 'HOST', 'SERV'));
 
Important:
  • OH_Deleteflag = 0 must be in the where-clause or version-objects and objects in the trash bin will also be transported
  • OH_Otype NOT IN ('FOLD', 'CLNT', 'HOST', 'SERV') because these object-types must not be transported
This can be adapted to any kind of search. Please always make backups of your DB before doing such changes and test especially the select-criteria thoroughly.

Attachments