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:

This page includes the following:

Processing Jobs

In the AE, Jobs are defined and maintained in the form of objects that include various pages. Use Automation Engine scripting language to include complex logic on the Process page of the Job.

More Information:

Note: Depending on the type of command (Guardian, NetBatch and OSS), several sub-types are available for NSK jobs. For more information, see Executing Jobs on NSK.

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. For more information, see Execution Stages.

Jobs are processed with the login information (group name.user name) specified in the Login object which can be selected in the Attributes Page.

The table below lists password 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:

For

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 List of Agent Variables. The RunID is a string consisting of 7 to 10 digits which can be used in the statistics search.

Tip: Use the ALPHA2RUNNR script function to convert the name of the job report to the RunID for further processing. For more information, see 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 (example: 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 File Transfer 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 File Transfer object. The following NSK file attributes are supported:

Attribute 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.

For more information, see File Transfers (JOBF).

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:

CallAPI for NSK
AE Agent Architecture for the HP NonStop Server