APINSTT

#### Search Results

Search

# APINSTT

API Routine: | APINSTT
Parameters: | UGNLPARM, UPILSTT

This API lets obtain data from a PAC status, create a new status, and modify an existing one.

APINAPP can be invoked with:

    CALLNAT 'APINSTT' API-PARM API-STT-PARM

A definition of API-PARM is provided in LDA UGNLPARM in library SYSPACUS.

Set API-PARM.API-MAIN-FUNC to:

A | To add a status.
D | To obtain data from a status.
M | To modify a status.

This document covers the following topics:

- Local Data Area UPILSTT

- API Return Codes

## Local Data Area UPILSTT

A definition of API-STT-PARM is provided in LDA UPILSTT in library SYSPACUS.

Field Name | Format | Description
--- | --- | ---
API-STT-PARM |  |
STATUS-TYPE | A2 | in/out
STATUS | A32 | in
NOTES | A60 (1:3) | in/out
NEIGHBOUR-APPL | A32 | in/out
FUSER-DBNR | N5 | in/out
FUSER-FNR | N5 | in/out
FDIC-DBNR | N5 | in/out
FDIC-FNR | N5 | in/out
FPAA-DBNR | N5 | in/out
FPAA-FNR | N5 | in/out
XREF | A1 | in/out
ADD-TIME | T | out
ADD-BY | A8 | out
ADD-TID | A8 | out
MOD-TIME | T | out
MOD-BY | A8 | out
MOD-TID | A8 | out

Whenever APINSTT is called: API-STT-PARM.STATUS should carry the name of the status.

If [API-PARM.API-MAIN-FUNC] = 'D' and the status is found, APINSTT returns in the remaining parameter fields the status data, ignoring any values put by the user in the "in/out" fields.

If [API-PARM.API-MAIN-FUNC] = 'A' and the status is not found, APINSTT tries to add a NATURAL status with the characteristics specified in the "in/out" fields.

If [API-PARM.API-MAIN-FUNC] = 'M' and the status is found, APINSTT tries to modify the status endowing it with the characteristics specified in the "in/out" fields.

The meaningful values of the "in/out" fields are enumerated in the following table:

At application addition or modification user-specified values of the "in/out" fields may be translated.

Embedded spaces are replaced with '_' in user-specified values of PREFIX and LEVEL.

A meaningless value of PRD-APPL specified for the addition or modification of a Natural application causes the function to be abandoned. Other meaningless values of the "in/out" fields are treated as follows:

Field Name | Format | Possible Values
--- | --- | ---
STATUS-TYPE | A2 | A, D, I, M, N, P, R, T
NOTES | A60 (1:3) | Any
NEIGHBOUR-APPL | A32 | The name of a Natural or Predict application or blank.
FUSER-DBNR | N5 | [0..254,256..65534]
FUSER-FNR | N5 | [0..5000]
FDIC-DBNR | N5 | [0..254,256..65534]
FDIC-FNR | N5 | [0..5000]
FPAA-DBNR | N5 | [0..254,256..65534]
FPAA-FNR | N5 | [0..5000]
XREF | A1 | N, R, or blank

With any of the three meaningful values of API-PARM.API-MAIN-FUNC the significance of the values of the API-STT-PARM fields is the same as that of their menu system counterparts.

At status addition or modification user-specified values of the "in/out" fields may be translated.

If NEIGHBOUR-APPL does not carry the name of a Natural or Predict application, it is reset.

A meaningless value of a -DBNR or -FNR field is translated to 0.

A meaningless or inappropriately specified value of XREF is translated to 'N' or space.

## API Return Codes

APINSTT returns the following [API-PARM.API-MSG-NO]:

1011 | if an [API-PARM.API-MAIN-FUNC] distinct from 'A', 'D', and 'M' has been specified.
7201 | if an ACF control record has been found defective.
7205 | if the "initialisation" has failed, ie, logical files 210 and 211 have not been found set at a pair of matching ACF and PCF.
7250 | if the status has been found.
7251 | if an status has not been found.
7253 | if the status has been added.
7254 | if the status has been modified.
7257 | if the status has not been added.
7259 | if the status has not been modified.
7541 | if the status (to be modified) is locked.

Other values of API-PARM.API-MSG-NO may be received in more unusual situations.

### On this page

- Local Data Area UPILSTT
- API Return Codes