How to find text in (Pre/Post) Scripts of Automic Jobs

book

Article ID: 198416

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic Workload Automation - Automation Engine

Issue/Introduction

Sometimes you need to find out if a certain group of jobs contains a standard string like an INCLUDE (for instance the string ":INC MY.INCLUDE").
 
If this concerns only one job it is easy to find out with AWI, but if there are more this can be time consuming.

Environment

Release : v12.2 / v12.3

Component : AUTOMATION ENGINE

Resolution

You can find the list of of all jobs that have a certain content with the following fields:

- OT_Type= (with 0 for Script, 1 for Prescript and 2 for Postprocess)
- OT_Content for the string you are looking for.

This will give something like this, when look for string ":INC POSTSCRIPT.INCLUDE" in a Postscripts:

select OH_name from OH,OT where OH_idnr=OT_OH_idnr and OT_type=2 and OT_Content=':INC POSTSCRIPT.INCLUDE'

Unfortunately, it is more complicated to find those jobs that don't have the string, because you have to factor in that each line of the Postscript has its own OT_Lnr (line number).

Of course you can also add filters for object type, like OH_Otype=JOBS or OH_Otype=SCRI etc.