TRANSFER Programming Manual
COBOL STRING and UNSTRING Operations
Designing and Writing a Client
9–16 069138, Update 1 to 040970 Tandem Computers Incorporated
3. In the Working-Storage Section of the Data Division, include definitions for:
Data fields that your application will use for computing the size of the fixed-
length and variable-length data to be returned by the GET-ITEM-REC UOW.
For example:
WORKING-STORAGE SECTION.
01 fixed-part-size PIC 9(4) COMP.
01 PIC 9 COMP VALUE 0.
88 eof VALUE 1
88 not-eof VALUE 0.
01 header-size PIC 9(4) COMP.
01 ptr PIC 9(4) COMP.
01 rec-size PIC 9(4) COMP.
01 temp-nbr PIC S9(4) COMP.
01 temp-str PIC X(300).
01 variable-part-size PIC 9(4) COMP.
Data fields to be transmitted to TISERV by the GET-ITEM-REC UOW and
returned in the TISERV response. As with the UOW header, you can either
copy these definitions into your program from the GCOB file or use the UOW
description in this manual to construct them yourself. In the response, notice
that the structure of the RECS-RETURNED array depends on the values of
NUM-REQUESTED and MAX-DATASIZE that will be sent in the request. The
size of that array also depends on the value of NUM-RETURNED.
01 get-item-rec-uow.
02 hdr.
03 self-ident PIC AA VALUE "UW".
03 uow-code NATIVE-2 VALUE 125.
02 starting-key.
03 item-id.
04 dummy PIC X(12).
03 rec-type PIC S9(4) COMP.
03 rec-seq-num PIC S9(4) COMP.
02 options.
03 skip-exact PIC X.
03 any-rec-type PIC X.
03 any-seq-num PIC X.
03 reserved-3 PIC X VALUE "N".
02 num-requested NATIVE-2 VALUE 20.
02 max-datasize NATIVE-2.
02 pad-char PIC X.
02 PIC X.
01 get-item-rec-rsp GLOBAL.
02 hdr.
03 self-ident PIC AA "UW".
03 uow-code NATIVE-2 VALUE 125.
02 retn-code NATIVE-2.
02 retn-code-detail NATIVE-2.