The following document includes information and notes required for using the CallAPIA programming interface that processes a script in the Automation Engine system. It can be called directly from within the program itself or from a different program. for BS2000.
The CodeTable to be used is specified in the BS2000 CallAPI's INI file. Enter the name of the CodeTable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task in the parameter codetable= of the section [GLOBAL].
![]() |
1. |
CallAPI and own program |
---|
The AE CallAPI can be called from your own programs. This requires sound knowledge of the programming language in which this program was written.
All the required parameters are assigned within the program. The program using the CallAPI must only include or dynamically reload the large module UCCALL at runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start)..
![]() |
2. |
CallAPI and utility |
---|
The supplied packageA Package is an instance (a version, a revision, a tag, …) of your application and defines the content which you want to deploy. Here you decide, if you want to deploy the entire application or just a few specified components. includes the utility UCXBB2?C and is applicable in BS2000 procedures or "Enter" jobs.
The utility reads the data required for logging on to the Automation EngineThis component drives an Automation Engine system and consists of different types of server processes. via SYSDTA. The AE Script to be executed can either derive from a file or directly from SYSDTA. If a file is used, it must be assigned before the program is called using the file-catenation name UCSCRIPT.
In the first example, the file-catenation name UCSCRIPT is not assigned. The AE Script to be executed is read until it reaches the SYSDTA command /EOF.
/FILE UCXBB22C.INI,LINK=INI
/EXEC UCXBB22C
04,RS,PROG,PASSWORD
:SET &RUNNR = ACTIVATE_UC_OBJECT(JOBS,EXAMPLE1)
:IF &RUNNR = '0000000'
: SET &ERROR = SYS_LAST_ERR_NR
: SET &ERROR = SYS_LAST_ERR_NR
: STOP MSG,51,'ACTIVATION ERROR: &ERROR'
:ELSE
: STOP NOMSG,50,'THE JOB WAS STARTED WITH RunID &RUNNR'
:ENDIF
/EOF
The scriptA particular Automation Engine object type. to be executed is available in the file MY.SCRIPT.FILE:
/FILE UCXBB22C.INI,LINK=INI
/FILE MY.SCRIPT.FILE,LINK=UCSCRIPT
/EXEC UCXBB22C
04,RS,PROG,PASSWORD
The following example returns the RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component ., the error code and the error message from the CallAPI. These three values will be written in a JV (jobAn Automation Engine object type for a process that runs on a target system. variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type.).
/CREATE-JV JV-NAME=#UC.RETCODE
/SET-JV-LINK LINK-NAME=UCRETC,JV-NAME=#UC.RETCODE
/CREATE-JV JV-NAME=#UC.RETTEXT
/SET-JV-LINK LINK-NAME=UCRETT,JV-NAME=#UC.RETTEXT
/CREATE-JV JV-NAME=#UC.RUNID
/SET-JV-LINK LINK-NAME=UCRUNID,JV-NAME=#UC.RUNID
/EXEC UCXBB23C
*INI
:SEND_MSG RS,DEV,'MESSAGE FROM THE BS2000 CALL INTERFACE &NAME.'
/EOF
/SHOW-JV JV-CONTENTS=*LINK(LINK-NAME=UCRUNNR)
/STEP
/SHOW-JV JV-CONTENTS=*LINK(LINK-NAME=UCRETC)
/SHOW-JV JV-CONTENTS=*LINK(LINK-NAME=UCRETT)
See also:
About the CallAPI
Using the CallAPI
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |