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

Agent - Interaction Between Automation Engine and NSK

The NSK agent 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 job is generated and transferred to the NSK agent via file transfer. 
See:
Inside AE Guide - Executing Objects

Jobs are processed with the login information (group name.user nameName of the Automation Engine user.) specified in the Login object 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 Engine. The job's return code can be accessed in AE via Headers and Trailers.

Header and Trailer contents are automatically added to the script defined in the job. The variable "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 code. It can be used to define dependencies between individual jobs in a workflow.

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<RunID>

Job-report 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 statistics search or converted to the appropriate number using the script function 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