Server Guide

IMSRequester class

To test the status of DL/I calls your program has issued, use the instance methods of the IMSRequester class. You should check the status, return, and reason codes after every IMS call; otherwise, your program might continue processing even though the last call produced an error.

Defined class methods

None.

Defined instance methods

aibReasonCode
Answers the reason code provided in the AIB when the program uses the AIBTDLI interface.

aibReturnCode
Answers the return code provided in the AIB when the program uses the AIBTDLI interface.

statusCode
The status code of the program, returned in the PCB.

See IMS/ESA Application Programming: DL/I Calls for a description of the DL/I status codes and the return and reason codes.

Example

Tests the result of a GU call.

| anAccessor aRecord
 
"Create an instance of the IMSDBRequester"
anAccessor := IMSDBRequester usingDBPCBAtPosition: 3.
aRecord := self createOrderSummaryRecord.
 
"Perform a GU call"
anAccessor getUnique: (OrderedCollection with: aRecord)
           ssaList: (OrderedCollection with: (self qualifiedSsa: aKeyValue)).
 
"Check the status of the GU call and if two blanks, continue;
otherwise display a message indicating the error code"
(anAccessor statusCode = '  ')
       ifFalse: [
                Transcript show: 'Your program ended in error.  The error
                                  code is ', anAccessor statusCode.
                ].


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]