Automic Script and OS script commands conflicting
search cancel

Automic Script and OS script commands conflicting

book

Article ID: 90296

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Automic Script and OS script commands conflicting

Environment

Release:
Component: ARLSMG

Resolution

Symptoms

OS script and Automic script may be mixed in the Process or preprocess tabs of jobs.
Automic script statements all begin with colon (:) which is also the label identifier for MS/DOS command lines for example.
Automic variables all begin with an ampersand (&) character which is also the command separator for MS/DOS multicommand lines for example.

Is there any way, any escape character which would instruct Automic script not to consider MS/DOS label as script statements and multicommand lines as script variables?
 

 


Resolution

The :Data function is specially made for it.

:DATA Lines contain commands for processing tasks for the target system.

All lines of the script, that are not commentary lines (commentary lines start with an exclamation mark) or contain script statements (which start with a colon), are usually regarded as DATA Lines. If for any reason a DATA Line starts with a colon or an exclamation mark, conflicts could arise. In this case, it is necessary to explicitly declare this line as a DATA Line by using the :DATA statement.

You can write the statement without quotation marks. In this case, all characters to the end of the line will be recognized. The script variables in the statement are replaced by their content.

DATA lines can only be used with objects of type "Job".

Examples

The script in this example, taken from a PC Batch File, defines a branch to a label where Error Handling will be done. As labels in a PC Batch File usually start with a colon, this line has to be explicitly declared by means of the :DATA statement.

!...
GOTO ERRORMESSAGE
!...
:DATA ":ERRORMESSAGE"  
!...