You use the PTDA (put data) call to write a block from a specified storage area to a terminalspecific long-term storage area (TLS) of an LTERM/LPAP/OSI-LPAP/Master-LPAP partner.
A program unit run of a dialog service can only write to blocks of its “own” TLS, i.e. blocks of the LTERM/LPAP/OSI-LPAP partner, via which the service was started.
A program unit run of a asynchronous service can write to the blocks of any LTERM/LPAP/OSI-LPAP/Master-LPAP partner of the UTM application.
Setting the 1st parameter (KDCS parameter area)
The table below shows the various options and the necessary entries n the KDCS parameter area.
Function of the call | Entries in the KDCS parameter area | |||
---|---|---|---|---|
KCOP | KCLA | KCRN | KCLT | |
Write to a TLS block (in the dialog program) | "PTDA" | Length | Block name | — |
Write to TLS (in the asynchronous program) | "PTDA" | Length | Block name | LTERM / LPAP / OSI-LPAP / Master-LPAP name |
Setting the 2nd parameter
Here you have to supply the address of the message area which contains the message to be written.
Setting the parameters | |
Field name in the KDCS parameter area | Contents |
"PTDA" | |
Length in bytes | |
Block name | |
Name of LTERM / LPAP / OSI-LPAP / Master-LPAP partner | |
Data |
KDCS call | |
KDCS parameter area | Message area |
C/C++ macro call | |
Parameters | |
KDCS_PTDA | (nb,kcla,kcrn,kclt) |
openUTM return information | |
---|---|
Field name in the KB return area | Contents |
Return code | |
Internal return code |
For the PTDA call you make the following entries in the KDCS parameter area:
KCOP
In the KCOP field, the "PTDA" operation code.
KCLA
In the KCLA field, the length of the data which openUTM is to write to the TLS. The length specified here becomes the new length of the TLS block.
KCRN
In the KCRN field, the name of the TLS block to which openUTM is to write the data.
KCLT
Only for asynchronous programs: in the KCLT field, the name of the LTERM/LPAP/OSI-LPAP/Master-LPAP partner containing the TLS to which openUTM is to write data (this field is not evaluated by dialog programs).
Message area
In the message area you enter the message which you want to write to the TLS
You specify the following for the KDCS call:
1st parameter
The address of the KDCS parameter area.
2nd parameter
The address of the message area from which openUTM is to read the message. You enter the address of the message area even if you have entered the length 0 in KCLA.
Macro names
The use of C/C++ calls is described in detail in the section "C/C++ macro interface".
openUTM returns:
KCRCCC
in the KCRCCC field: the KDCS return code, see below.
KCRCDC
in the KCRCDC field: the internal return code of openUTM (see the openUTM manual ”Messages, Debugging and Diagnostics”).
KDCS return codes in the KCRCCC field for the PTDA call
The following codes can be analyzed in the program:
000 | Function carried out. |
40Z | System cannot perform the operation (generation error or system error, deadlock, timeout), see KCRCDC. |
41Z | Call issued in the first segment of the sign-on service, although this is not allowed by the generation. |
43Z | Length entry in KCLA is negative or invalid. |
44Z | Name of the block in KCRN is unknown or invalid. |
46Z | LTERM/LPAP/OSI-LPAP/Master-LPAP name in KCLT is invalid (only for asynchronous programs). |
47Z | Message area missing or cannot be accessed in the specified length. |
An additional return code can be found in the dump:
71Z | No INIT issued in this program. |
Features of the PTDA calls
At the end of transaction (PEND RE/FI/FC/SP), the changes made to the TLS block are carried out and the block is unlocked. Other transactions can then make use of it again.With PEND RS/ER/FR or RSET the changes made to the TLS blocks are cancelled and the blocks are unlocked.
The lock may apply for a longer period in the following cases:
PEND KP and PGWT KP
PEND PA/PR with a task change due to TAC class control
PEND PA/PR with waiting for a DGET message
A PTDA call locks access to a TLS block until the next synchronization point. No other TLS blocks of the addressed LTERM/ LPAP/ OSI-LPAP partner are locked.
Note that the current length of a TLS block is the length in which it was written with the last PTDA call.
How UTM reacts when the desired TLS block is locked is described in the section "Action with locked storage areas (TLS, ULS and GSSB)".