Agent - Interaction Between Automation Engine and NSK

The NSK agent allows you to process Jobs, execute File Transfers, or to execute calls through CallAPIs.

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:

The AE broadly supports HP NonStop systems. The following types of commands are available:

  • Guardian - TACL commands
  • OSS - UNIX commands (osh Shell)
  • NetBatch - NBEXEC scripts

As these commands differ from each other, Automic Automation provides three NSK job subtypes. You select the type of Job object on the Guardian/NSK page. You can read this page using the GET_ATT script function.

Important! NBEXEC scripting lines and AE scripting start with a colon. Therefore, make sure to insert an empty space at the beginning of each -NBEXEC-processing line.

In the AE, you can start jobs either manually or through workflows, or schedules. An executable job is generated and transferred to the NSK agent through a file transfer in such a case. For more information, see Execution Stages.

Jobs are processed with the login information (group name, user name) that is specified in the Login object you select in the Attributes Page.

The following User ID settings of agents may require passwords to be defined in the Login object:

  • GROUP.USER
    A password is required if the job runs with a different group name.username
  • GROUP.255
    A password is required if the job runs with a different group name
  • 255.255 
    No password is required

Recommended Configuration

  • Start the NSK agent with the User ID. Usually, you do not require the SUPER.SUPER user. However, adjust your user settings according to your requirements.
  • Define the groupname.user name in your Login objects.
  • Set the logon=1 parameter in the INI file of the NSK agent
  • Set the default user ERP_LOGIN in the client 0. Use a valid User ID/password combination, and make sure that you select a user who has few rights. This user only serves to equip TACL processes that are intended for reuse with as few rights as possible. These TACL processes are then safe and less error-prone.

Headers and Trailers

Each job notifies the agent about the start and end of its execution. The agent then passes this information on to the Automation Engine. Accessing the return code of the job is possible in the AE through Headers and Trailers.

Header and Trailer contents are automatically added to the script that is defined in the job. The RETCODE variable is defined in NSK-specific Headers. The content of this variable is transferred to the Automation Engine when the job ends. This value is referred to as the return code of the job. You can use it to define dependencies between individual jobs in a workflow.

If a syntax error occurs in the script, you can use the following user-defined Headers and Trailers to set the RETCODE to 1: HEADER.NSK.USER.HEAD, TRAILER.NSK.USER.HEAD and RESTART.NSK.

Agent Variables

If specified in the object, the agent creates files for job reports and the jobs on the computer. Their names are structured as follows:

  • <UC_EX_PATH_TEMP>J<RunID>
    Agent variable for the job file

  • <UC_EX_PATH_JOBREPORT>O<RunID>
    Agent variable for the job-report file

See also List of Agent Variables

Tip: The RunID is a string that consists of 7-10 digits. You can use it for the statistics search. Together with the ALPHA2RUNNR script function to convert the name of the job report to the RunID for further processing. For more information, see ALPHA2RUNNR

Executing File Transfers

In the AE, file transfers are defined and maintained as objects that have various pages. File transfers are executed with their defined character conversion, such as UC_CODE.

You can specify extra attributes for the target file in the File Transfer object (target - attributes) or take over the attributes of the source file (Keep original file attributes option). The original attributes can be overwritten with extra definitions in the File Transfer object. The following NSK file attributes are supported:

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

    • <10>
      Refresh EOF
      The file label is immediately written to the hard disk
    • <11>
      Index compression
      Entries in the index block of key sequenced files are compressed. Value 0 is required for other file types.
    • <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 are 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. If this option is not 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 current size of the file
    • 1
      for files below 2GB
    • 2
      for all other files
  • FILECODE
    Irrelevant if only text files and binary files are transferred
  • FILETYPE
    Irrelevant if only text files and binary files are transferred
    • 0
      unstructured
    • 1
      relative
    • 2
      entry sequenced
    • 3
      key sequenced
  • KEY_LEN
    Irrelevant if only text files and binary files are transferred
  • KEY_OFFS
    Irrelevant if only text files and binary files are transferred
  • MAXEXT
    Maximum number of extents for the file
  • PEXT
    Number of 2k pages for the primary extent
  • RECLEN
    Irrelevant if only text files and binary files are transferred
  • SEXT
    Number of 2k pages for secondary extents.

For more detailed information, see File Transfers (JOBF)

Call Interface (CallAPI)

A CallAPI allows you to execute calls in the AE from your own programs. You can even use it with a utility that you call from the command line of your operating system, from a script, or a job. No programming is required in this case.

For more details, see CallAPI for NSK