SYSEXT Utility - Natural Application Programming Interfaces

The utility SYSEXT is used to locate and test Natural Application Programming Interfaces (APIs) contained in the current system library SYSEXT.

A Natural API is a Natural subprogram (cataloged object) that is used for accessing and possibly modifying data or performing services that are not accessible by Natural statements. Natural APIs refer to Natural, a subcomponent or a subproduct.

The SYSEXT Utility - Natural Application Programming Interfaces documentation covers the following topics:

Related Topics:


Introduction to SYSEXT

For each Natural API, the utility SYSEXT provides a functional description, one example program, one category and API-specific keywords.

The following diagram is an overview of the Natural objects and major features SYSEXT provides:

graphics/sysext.png

Objects Provided for Natural APIs

The types of Natural object typically provided for each Natural API are listed in the following section. Additional objects that might exist for a particular API are not covered.

All API-related objects are contained in the library SYSEXT on the system file FNAT.

In the following table, nnnn denotes the 4-digit number to identify the API as well as the corresponding example program and text object.

Object Name Explanation
USRnnnnN The API subprogram (cataloged object) that performs the designated function.
USRnnnnP

An example program (source object) that can be used to test the effect of the API.

The example program invokes the corresponding subprogram USRnnnnN.

USRnnnnT

A text object listing a short and a long description, and information on usage, keywords, category and interface versions.

You can display a text object by using the line command T as described in Line Commands .

Invoking and Terminating SYSEXT

The SYSEXT utility is invoked by the system command SYSEXT which is described by the following syntax diagram:

SYSEXT

../graphics/sbo2.gif

ALL

../graphics/sbc2.gif

../graphics/sbo2.gif

FIRST

../graphics/sbc2.gif

../graphics/sbo2.gif

DESCENDING

../graphics/sbc2.gif

CURRENT SECOND ASCENDING

The table below gives a description of the parameters:

Parameter Description
ALL List all APIs (default).
CURRENT List only current APIs, that is all unique APIs and the current version of APIs with interface versions (with keyword +CURRENT-VERSION). See Interface Versions.
FIRST Display first menu with product code items (default), see below for an example.
SECOND Display second menu with category items, see below for an example.
ASCENDING Display APIs in ascending order (default).
DESCENDING Display APIs in descending order.

Start of instruction set To invoke SYSEXT

  • Enter the following system command:

    SYSEXT

    A menu similar to the example below appears with a list of all available Natural APIs displayed according to the first menu:

     07:43:19              ***** NATURAL SYSEXT UTILITY *****             2010-09-15
     User SAG                            - Menu -                   Library SYSEXT
    
     Cmd Interface Description                                                  Prod
     --- USR*____  _____________________________________________________________ *__
      _  USR0010N  Get SYSPROF information                                       NAT
      _  USR0011N  Get information on logical file                               NAT
      _  USR0020N  Read any error message from FNAT or FUSER                     NAT
      _  USR0040N  Get type of last error                                        NAT
      _  USR0050N  Get SYSPROD information                                       NAT
      _  USR0060N  Copy LFILE definition from FNAT to FUSER                      NAT
      _  USR0070P  Define editor default profile 'SYSTEM'                        NAT
      _  USR0080N  Get or set type and name of editor contents                   NAT
      _  USR0100N  Maintain record length of VSAM datasets                       NVS
      _  USR0120N  Read Natural short error message                              NAT
      _  USR0210N  Save, catalog or stow Natural object                          NAT
      _  USR0220N  Read Natural long error message                               NAT
      _  USR0320N  Read user short error message from FNAT or FUSER              NAT
    
      Category .. ______________________________  Keyword .. ____________________
    
     Command ===>
     Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
           Help  Reset Exit  Desc  Curr  --    -     +     ++          >     Canc   

You can invoke SYSEXT with any parameters, for example to display the second menu at startup:

SYSEXT SECOND

This results in a menu similar to the one below:

 07:43:19              ***** NATURAL SYSEXT UTILITY *****             2010-09-15
 User SAG                            - Menu -                   Library SYSEXT

 Cmd Interface Description                        Category
 --- USR*____  __________________________________ *_____________________________
  _  USR0010N  Get SYSPROF information            SYSTEM COMMANDS
  _  USR0011N  Get information on logical file    SYSTEM FILES
  _  USR0020N  Read any error message from FNAT o ERROR MESSAGES
  _  USR0040N  Get type of last error             ERROR HANDLING
  _  USR0050N  Get SYSPROD information            SYSTEM COMMANDS
  _  USR0060N  Copy LFILE definition from FNAT to SYSTEM FILES
  _  USR0070P  Define editor default profile 'SYS EDITOR
  _  USR0080N  Get or set type and name of editor EDITOR
  _  USR0100N  Maintain record length of VSAM dat VSAM
  _  USR0120N  Read Natural short error message   ERROR MESSAGES
  _  USR0210N  Save, catalog or stow Natural obje NATURAL OBJECTS
  _  USR0220N  Read Natural long error message    ERROR MESSAGES
  _  USR0320N  Read user short error message from ERROR MESSAGES

  Category .. ______________________________  Keyword .. ____________________

 Command ===>
 Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
       Help  Reset Exit  Desc  Curr  --    -     +     ++    <           Canc   

As an alternative, you can invoke SYSEXT without parameters and then adjust the resulting menu, see PF Keys.

Start of instruction set To terminate SYSEXT

  • On the SYSEXT utility menu, press PF3 or PF12.

    Or:
    In the command line, enter a period (.) or enter EXIT.

Using the SYSEXT Utility

This section covers the following topics:

Elements of the SYSEXT Utility Menu

The SYSEXT utility menu provides a list of APIs. For each API, there is an API name (Interface), a description (Description), and, depending on the menu chosen, a classification according to product code (Prod) or category (Category). Except for the leftmost column (Cmd), each column is headed by a selection field that allows you to enter selection criteria.

You can also use the search field Category at the bottom of the menu to search for available categories.

The input field Keywords can either be used as search field to retrieve available keywords, or as selection field to retrieve APIs.

You can also specify selection criteria on multiple selection fields. For example, you can select in one step APIs beginning with USR4, and with keyword PF-KEY and category NATURAL ENVIRONMENT.

A detailed description of all menu elements and their usage is given below:

Element Explanation Usage
Cmd The input field for a line command to be executed on a text object or an example program: see Line Commands. Enter a line command, example:
K List all keywords relevant to the specified API.
Interface The name of the API subprogram. APIs with interface versions are displayed intensified. Enter an asterisk (*) , or a prefix to be delimited by an asterisk, example:
USR4* List all APIs with prefix USR4.
Description A brief description of the purpose of the API. Enter a string, example:
default List all APIs with a description containing the string default or Default.
* List all APIs with a description that contains the string *.
Prod

The product code of Natural (NAT) or a Natural add-on product affected by the API.

Available product codes: NAT = Natural, NCI = Natural for CICS, NDB = Natural for DB2, NVS = Natural for VSAM, , NDV = Natural Development Server, PRD = Predict, RPC = Natural RPC (Remote Procedure Call).

Product codes other than NAT are displayed intensified.

Only visible on the first menu.

Enter a name, or a prefix to be delimited by an asterisk (*), example:
N* List all APIs with a product code beginning with N.
Category (selection field)

The category by which the API is classified according to its functional area or purpose.

An API can only have one category.

Only visible on the second menu and positioned above the list of APIs.

Enter a name, or a prefix to be delimited by an asterisk (*), example:
NATURAL OBJECTS List all APIs with category NATURAL OBJECTS.
Category (search field )

List all categories.

Positioned below the list of APIs.

See Category Search.
Keyword List all keywords or enter a keyword as selection criterion. See Keyword Search or Keyword Selection.
Command Command line to enter utility commands. Enter a utility command. See Utility Commands.

Start of instruction setCategory Search

  • Enter an asterisk (*), or a prefix in the category search field optionally delimited by an asterisk, for example:

    N*

    As a result, a menu similar to the example below appears:

             Search for Categories
    
      Mark Category
      ---- N*____________________________
        _  NATURAL ENVIRONMENT
        _  NATURAL OBJECTS

    To select a specific category as selection criterion, enter any character in the Mark column. As a result, a list of all APIs with this selection criterion is displayed.

Start of instruction setKeyword Search

  • Enter an asterisk (*), or a prefix delimited by an asterisk, for example:

    PF*

    A menu similar to the example below appears with a separate window displaying keywords starting with PF.

             Search for Keywords
    
      Mark Keyword
      ---- PF*_________________
        _  PF-KEY
        _  PF-KEY LINE

    To select a specific keyword as selection criterion, enter any character in the Mark column. As a result, a list of all APIs with this selection criterion is displayed.

Start of instruction setKeyword Selection

  • Enter a keyword in full, for example:

    PF-KEY

    As a result, a list of all APIs with keyword PF-KEY is displayed.

    Note:
    A non-trailing asterisk is interpreted literally, for example entering *LANGUAGE results in a list of APIs with keyword *LANGUAGE.

PF Keys

You can use the following PF keys:

PF Key Name Function
PF1 Help Display context-sensitive help. There is a specific help text for each input field. In other contexts, for example the command line, a general help text is displayed.
PF2 Reset Clear all selection fields and readjust the list of APIs.
PF3 Exit Exit the SYSEXT utility, or the current menu or window.
PF4 Asc/Desc Toggle between ascending (Asc) and descending (Desc) order of APIs.
PF5 All/Curr Toggle between menus displaying all APIs (All) and menus displaying only current APIs (Curr). See Interface Versions.
PF6 -- Scroll to the beginning of the list.
PF7 - Scroll one page up.
PF8 + Scroll one page down.
PF9 ++ Scroll to the end of the list.
PF10 < Shift to first menu.
PF11 > Shift to second menu.
PF12 Canc Exit the SYSEXT utility or the current menu or window.

Line Commands

Line commands are used to perform object operations. You can enter a line command in the Cmd column next to the API required. For a list of valid line commands, enter a question mark (?) or press PF1.

The following line commands are available:

Line Command Function
K List keywords relevant to the specified API.
T

List text object USRnnnnT for a description of the corresponding API.

The description comprises purpose, function and calling conventions of the API, relevant keywords and its category.

L List example program USRnnnnP.
E Edit example program USRnnnnP.
R Run example program USRnnnnP.
X Execute example program USRnnnnP.
. Exit the SYSEXT utility.

Utility Commands

This section covers the following utility commands to be entered in the command line:

  • EXIT
    Exit the SYSEXT utility.

  • REFRESH
    Update API information using data from the objects contained in the current library SYSEXT. The REFRESH command is only required if an API description or a keyword has been modified or if a text object has been added or removed.

    Upon successful completion, there is a confirmation that the text modules EXT-XML1 and EXT-XML2 have been generated in library SYSEXT.

    Note:
    Do not modify the source objects EXT-XML1 and EXT-XML2. They are required for configuring the SYSEXT utility and intended for Software AG internal use only.

Interface Versions

Interface versions can be seen as a collection of APIs with (almost) the same functionality but with differently extended parameter specifications. Thus, they cover a development cycle to be kept explicit for sake of compatibility (of later versions with earlier versions).

If an API has interface versions, they are displayed in the corresponding text object USRnnnnT. Interface versions are ordered within a list according to the version they belong to. The rightmost element belongs to the current version. This status is expressed by the reserved keyword +CURRENT-VERSION. All other elements belong to a previous version and are marked with the reserved keyword +PREVIOUS-VERSION. APIs without interface versions are called unique.

APIs with interface versions are displayed intensified on the menu.

The list of all current APIs (see PF5) consists of all unique APIs and the current version of APIs with interface versions (with keyword +CURRENT-VERSION).

Reserved Keywords

Reserved keywords refer to meta information on APIs, for example the Natural version in which an API has been added. Reserved keywords always start with a plus sign (+). See the table below for a description:

Reserved Keyword Description
+CURRENT-VERSION The current version of an API with interface versions (see Interface Versions).
+PREVIOUS-VERSION A previous version of an API with interface versions (see Interface Versions).
+NEW-PROD-version An API that has been added to a specific product in a specific version. For example, +NEW-NAT-4.2.7 refers to an API that has been added to the product Natural in version 4.2.7.
+MOD-PROD-version An API that belongs to a specific product and has been modified in a specific version. For example, +MOD-NAT-8.2.1 refers to an API that belongs to product Natural and has been modified in version 8.2.1.

Using a Natural API

If you want to use a Natural API contained in the system library SYSEXT, perform one of the following steps:

  • Define the system library SYSEXT in the system file FNAT as a steplib library for the user library that contains the Natural objects that use this API. Thus, no API-specific actions are required when upgrading your Natural version.

  • Copy the required API to the system library SYSTEM in the system file FNAT. Thus, you only need to check a single library for APIs when upgrading your Natural version.

  • Copy the required API to the system library SYSTEM in the system file FUSER (not recommended).

  • Copy the required API to the user library (or one of its steplibs) in the system file FUSER which contains the Natural objects that use this API (not recommended).

An API can only be used in the Natural version with which it is delivered. It is strongly recommended to store the APIs only in the FNAT system file. This will ensure that the right version is always executed.

Start of instruction setTo make use of an interface

  1. In the calling program, use the DEFINE DATA statement to specify the parameters listed in the text object USRnnnnT of that API. In the example program USRnnnnP, the parameters are defined within the DEFINE DATA LOCAL statement. Alternatively, you can specify the parameters outside the calling program in a separate LDA (Local Data Area) or PDA (Parameter Data Area), with a DEFINE DATA LOCAL USING statement referencing that data area.

  2. Enter the following statement:

    CALLNAT 'USRnnnnN' parameters

    For further information, see the CALLNAT statement in the Statements documentation.

Note:
Non-standard usage is always documented in the respective text object USRnnnnT.

List of Natural APIs

The following table gives an overview of available APIs and their function.

Notes:

  1. Because there can be situations where a newly added API is not yet covered by the current documentation, we recommend to rely on the list of APIs in the SYSEXT utility in cases where being up-to-date is vital.
  2. For detailed information on the use of APIs that apply to Natural Remote Procedure Call (RPC), refer to section Application Programming Interfaces for Use with Natural RPC in the Natural RPC (Remote Procedure Call) documentation.
  3. APIs with product code PRD are listed and documented separately in the section Application Programming Interface in the administration part of the Predict documentation.
Interface Description Product
USR0010N Get SYSPROF information NAT
USR0011N Get information on logical file NAT
USR0020N Read any error message from FNAT or FUSER NAT
USR0040N Get type of last error NAT
USR0050N Get SYSPROD information NAT
USR0060N Copy LFILE definition from FNAT to FUSER NAT
USR0070P Define editor default profile 'SYSTEM' NAT
USR0080N Get or set type and name of editor contents NAT
USR0100N Maintain record length of VSAM datasets NVS
USR0120N Read Natural short error message NAT
USR0210N Save, catalog or stow Natural object NAT
USR0220N Read Natural long error message NAT
USR0320N Read user short error message from FNAT or FUSER NAT
USR0330N Read Natural object directory NAT
USR0340N Maintain Natural buffer pool NAT
USR0341N Maintain garbage collection in Natural buffer pool NAT
USR0350N Read current Recording flags NAT
USR0360N Modify user short error message on FNAT or FUSER NAT
USR0400N Get number of rows affected by searched UPDATE (SQL) NDB
USR0420N Read user long error message from FUSER NAT
USR0421N Maintain user long error message on FUSER NAT
USR0500N Define title of window NAT
USR0600N Get program level information NAT
USR0610N Get error information on last database call NAT
USR0620N Convert string into ASCII or EBCDIC code NAT
USR0622N Reset error counter in ON ERROR statement block NAT
USR1002N Save or restore Natural environment parameters NAT
USR1005N Get information on certain Natural session parameters NAT
USR1007N Get SYSFILE information NAT
USR1009N Convert system variable *TIMESTMP into numeric variable NAT
USR1011N Check name for wildcard or asterisk notation NAT
USR1012N Get dynamic error message parts from the last error NAT
USR1013N Display current character set NAT
USR1014N Use line calculator NAT
USR1016N Get error level for error in nested copycodes NAT
USR1017N Add CATALL call to CATALL control list NAT
USR1018N Maintain dynamic OPEN for VSAM NVS
USR1019N Get BUS information NAT
USR1020N Add user short error message to FUSER NAT
USR1021N Check name for wildcard or asterisk notation NAT
USR1022N Get type of database NAT
USR1023N Convert date and time format NAT
USR1024N Read results of CATALL NAT
USR1025N Maintain definition of multiple steplibs NAT
USR1026N Get information on RETURN data NAT
USR1027N Search user short error message on FNAT or FUSER NAT
USR1028N Convert bits and bytes NAT
USR1029N Get type of Natural object NAT
USR1030N Convert language code NAT
USR1031N Check Natural object name NAT
USR1032N List cataloged Natural objects with type NAT
USR1033N Find DBID and FNR of a cataloged DDM NAT
USR1034N Get NTTF file table with translated DBID and FNR NAT
USR1035N Maintain objects using the Software AG editor engine NAT
USR1036N Maintain user profile of the Software AG editor NAT
USR1037N Get information on Natural ABEND data NAT
USR1038N Get platform-specific information NAT
USR1040N Get or set profile parameter UDB NAT
USR1041N Install error transaction program (*ERROR-TA) NAT
USR1042N Get or set value of UPDATE command NAT
USR1043N Perform Adabas direct calls NAT
USR1047N Set new file name for next database call NVS
USR1048N Modify PF-key labels NAT
USR1050N Get or set work file name NAT
USR1051N Maintain Predict data PRD
USR1054N List libraries NAT
USR1055N List objects in a library NAT
USR1056N List DDMs on the FDIC file or in a library NAT
USR1057N Read a Natural source code into an array NAT
USR1058N Read a DDM source code into an array NAT
USR1066N Enable or disable the Natural message 'Executing ...' NAT
USR1067N Check Natural library name NAT
USR1068N Maintain the number of DBMS calls, MAXCL and MADIO parameters NAT
USR1070N Maintain operator commands for Entire Net-Work NAT
USR1071N Set credentials for RPC server RPC
USR1072N Get command ID of a retain set NAT
USR2001N Get information on last error NAT
USR2002P Default text strings for Help Key function NAT
USR2003P Define default settings for Main Menu NAT
USR2004N Get information on logical file NAT
USR2005N Read internal file translation table NAT
USR2006N Get information from error message collector NAT
USR2007N Get or set data for RPC default server RPC
USR2008N Perform dynamic OPEN for VSAM/ISAM datasets NVS
USR2009N Get dynamic error message parts from the last error NAT
USR2010N Get error information on last database call NAT
USR2011N Get or set work file name NAT
USR2012N Get system variable *NET-USER NAT
USR2013N Get SYSPROF information NAT
USR2014N Maintain objects using the Software AG editor engine NAT
USR2016N Copy map profile from FNAT to FUSER NAT
USR2017N Choose FNAT or FUSER for map profile handling NAT
USR2018N Read Natural object directory NAT
USR2019N Read or save Natural source code from/to the source area NAT
USR2020N Get information on the Adabas version NAT
USR2021N Perform dynamic dataset allocation NAT
USR2023N Get type of database NAT
USR2026N Get TECH information NAT
USR2027N Define wait interval for current session NAT
USR2028N Get the Natural version NAT
USR2029N Perform dynamic file allocation (BS2000/OSD) NAT
USR2030N Get dynamic error message parts from the last error NAT
USR2031N Get SYSPROD information NAT
USR2032N Support commit for CLOSE CONVERSATION RPC
USR2033N Get information on Predict List Xref Sets PRD
USR2034N Read any error message from FNAT or FUSER NAT
USR2035N Get or set parameters for SSL support RPC
USR2036N Convert system variable *TIMESTMP into numeric variable NAT
USR2071N Support EntireX Security on client side RPC
USR2072N Support EntireX Security on server side RPC
USR2073N Ping or terminate an RPC server RPC
USR2074N Set new password for Natural Security user in RPC context RPC
USR2075N Terminate EntireX Broker service RPC
USR2076N Get or set RPC TIMEOUT value RPC
USR3001N List Roll Server directory entries NAT
USR3002N Delete Roll Server directory entries NAT
USR3003N Initialize logical file table or set FDIC file NAT
USR3004N Clear internal Fast Locate Table NAT
USR3005N Process Predict documentation objects PRD
USR3013N Get SYSPROF information NAT
USR3025N Maintain definition of multiple steplibs NAT
USR3320N Find user short error message (including steplibs search) NAT
USR4001N Set profile parameter PROGRAM NAT
USR4002N Get variables of the current system NAT
USR4003N Get Natural stack information NAT
USR4004N Get dynamic Natural profile parameters at session start NAT
USR4005N Read all current PF-key settings NAT
USR4006N Select or cancel Natural sessions under CICS NCI
USR4007N Get or set profile parameter SYNERR NAT
USR4008N Set library for RPC execution RPC
USR4009N Set parameters for EntireX RPC
USR4010N Get runtime settings of RPC server RPC
USR4011N Create A20 hash value for variable input NAT
USR4012N Set application error on RPC server RPC
USR4013N Maintain Predict List Xref Sets PRD
USR4025N Maintain definition of multiple steplibs in Natural Security NAT
USR4101N Get information on Predict XRef data PRD
USR4201N Maintain data area sources NAT
USR4202N Get information on code page table NAT
USR4203N Check for object locking, lock or unlock Natural object NAT
USR4204N Set or reset CICS container name NCI
USR4206N List objects in a library NAT
USR4207N Get machine data NAT
USR4208N Read or write a Natural resource NAT
USR4209N Get short name of subroutine NAT
USR4210N Perform base64 conversion of alphanumeric and binary bytes NAT
USR4211N Get DBCS characters NAT
USR4212N Analyze data area NAT
USR4213N Maintain string handling for DBCS support NAT
USR4214N Get program level information NAT
USR4215N Get list of resources in a Natural library NAT
USR4216N List objects in a library with extended selection NAT
USR4217N Send data to Optimize for Infrastructure NAT
USR4218N Get information on Natural Development Server NDV
USR4220N Perform base64 conversion of alphanumeric and binary bytes NAT
USR4340N List contents of buffer pool or buffer pool cache NAT
USR4341N Maintain blacklists of Natural buffer pools NAT
USR4342N Maintain Natural message pool NAT
USR4371N Set credentials for RPC server RPC
USR6002N Get the current values of internal counters NAT
USR6008N Get data of object in source area NAT
USR6204N Set profile parameter PROGRAM NAT
USR6303N Get Natural stack information NAT
USR6304N Get or set reliable state for RPC execution RPC
USR6305N Commit or rollback reliable RPC messages RPC
USR6306N Get status of UOWs of current EntireX Broker user RPC
USR8201N Get the Natural version NAT
USR8202N Get enhanced error information on error NAT3145 NAT
USR8203N Get profile parameters from the Natural parameter module NAT
USR8204N Perform ZIIP command NAT
USR8205N Get called subprograms with parameters NAT
USR8206N Read variable definitions from a cataloged Natural object NAT
USR8207N Maintain the number of DBMS calls, MAXCL and MADIO parameters NAT
USR8208N Terminate EntireX Broker service RPC
USR8210N Maintain Natural Profiler monitoring NAT
USR8211N Get database type and options NAT
USR8212N Switch to conversational mode under CICS NCI
USR8213N Shut down a server on an EntireX Broker node RPC
USR8214N Get or set ACBUSER token for Adabas calls NAT