Knowledge Base > Automation Engine and Target Systems > NSK > Agent - Combining the AE and NSK

Agent - Interaction Between Automation Engine and NSK

The NSK agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host works together with the AE system via a TCP/IP interface.

The NSK agent provides the following functions:

Processing Jobs

In AE, jobs are defined and maintained in the form of objects which include various tabs. Commands and statements are stored in the Process tab. It can be provided with a complex logic using the AE Script elements. 
See:
User Guide - Job and Job Execution

Depending on the type of command (Guardian, NetBatch and OSS), several sub-types are available for NSK jobs.

In AE, jobs can start either manually or via control mechanisms such as workflows or schedules. Thus, an executable jobAn Automation Engine object type for a process that runs on a target system. is generated and transferred to the NSK agent via file transferTransfers files from one computer to another. A particular Automation Engine object type (FileTransfer object).. 
See:
Inside AE Guide - Executing Objects

Jobs are processed with the loginAn Automation Engine object type that stores account credentials used by agents on target systems. information (groupAn Automation Engine object type that integrates tasks so that they can be processed together. name.user nameName of the Automation Engine user.) specified in the Login objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task which can be selected in the Attributes tab.

The table below lists passwordA secret combination of characters for a Automation Engine user. requirements for the Login object.

Agent's User ID

Entry in Login object

GROUP.USER

A password is required if the job runs under another group name.user name

GROUP.255

A password is required if the job runs under another group name

255.255 

No password is required

Recommended Configuration:

Each job notifies the agent about the beginning and end of an execution. The agent then passes this information on to the Automation EngineThis component drives an Automation Engine system and consists of different types of server processes.. The job's return code can be accessed in AE via Headers and Trailers.

Header and Trailer contents are automatically added to the scriptA particular Automation Engine object type. defined in the job. The variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. "RETCODE" is defined in an NSK-specific Header. The content of this variable is transferred to the Automation Engine when the job ends. This value is the job's return codeThe value that represents the result of tasks and script functions.. It can be used to define dependencies between individual jobs in a workflowAn object of the Automation Engine that can include several executable objects and which runs them in a specified order. [Formerly called "ProcessFlow" and "JobPlan."].

The following user-defined Header and Trailer can be used to set the "RETCODE" to "1" if a syntax error occurs in the script: HEADER.NSK.USER.HEAD, TRAILER.NSK.USER.HEAD and RESTART.NSK

The agent creates files for job reports (if specified at the object) and the jobs on the computer. Their names are structured as shown in the table below:

 

Description

Job file

<UC_EX_PATH_TEMP>J<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 .>

Job-reportA report provides more detailed information about a task's execution or a component. file

<UC_EX_PATH_JOBREPORT>O<RunID>

UC_EX_PATH_TEMP and UC_EX_PATH_JOBREPORT are agent variables. The RunID is a string consisting of 7 to 10 digits which can be used in the statisticsThis is a list of a task's previous runs. search or converted to the appropriate number using the script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… ALPHA2RUNNR.

Execution of File Transfers

In AE, file transfers are defined and maintained in the form of objects which include various tabs. They are executed with their defined character conversion (e.g. "UC_CODE").

Peculiarities: The NSK agent handles each file transfer order with an extra process if the new file transfer protocol is used. The agent has an additional listener port to provide this function. This port has the next higher number when compared to the agent port.

You can specify additional attributes for the target file in the FileTransfer object (target - attributes) or assume the source file's attributes (option "Keep original file attributes"). The original attributes can be overwritten with additional definitions in the FileTransfer object. The following NSK file attributes are supported:

Attribut Description
CREATE_OPTS

Options for file creation, bit mask (<15> is the lowest bit of a 2-byte word):

<10>Refresh EOF - has the effect that the file label is immediately written to the hard disk.
<11> Index compression - entries in the index block of key sequenced files are compressed. For other file types, use the value 0.
<12> Data compression - keys of entries in the data blocks of key sequenced files are compressed. Value 0 is required for other file types.
<13> Audit compression - data of audited files is compressed.
<14> Audited - checks the file in the Transaction Management Facility (TMF) subsystem. Systems without TMF require value 0.
<15> Odd unstructured - number of I/O transfers of unstructured files. With this option not being set, the transfers are rounded to an even byte limit. Other file types require the value 0.

File format

This attribute is automatically set, based on the file's current size.

1 - for files below 2GB, 2 - for all other files

FILECODE Not relevant if only text and binary files are transferred.
FILETYPE

0 - unstructured
1 - relative
2 - entry sequenced
3 - key sequenced

Not relevant if only text and binary files are transferred.

KEY_LEN Not relevant if only text and binary files are transferred.
KEY_OFFS Not relevant if only text and binary files are transferred.
MAXEXT Maximum number of extents for the file.
PEXT Number of 2k pages for the primary extent.
RECLEN Not relevant if only text and binary files are transferred.
SEXT Number of 2k pages for secondary extents.

See: User Guide - File Transfer 

Call Interface

The CallAPI enables you to execute calls in AE from your own programs. You can also use a CallAPI without any programming being required if you use a utility which you can call from the command line of the OS or from an executable file, for example.

 

See also:

User Guide - CallAPI
Inside AE - Architecture of the
AE agents for the HP NonStop Server

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH