With Return Response
An application can issue OPEN and CLOSE commands for a specific MUF or URT. In response, the application receives a standard CA Datacom/DB return code indicating the results of the command. Details on using a CICS link with a communication area are provided following.
When you need to know the results of a CONNECT, DISCONNECT, IMMEDIATE, LOAD, DELETE, RESTART, DEFER, AUTO, OPEN or CLOSE, use a CICS link to DCCOCPR with a communication area (DFHCOMMAREA). This method accepts only one MUF or URT ID per request and returns the CA Datacom/DB return code for that MUF or URT.
Procedure
Complete the DFHCOMMAREA as follows:
Column |
Contents |
---|---|
1—4 |
DBLC—(Required) No other format is accepted. |
6—80 |
Code either CONNECT=muf, DISCONNECT=muf, LOAD=urt, DELETE=urt, RESTART=urt, DEFER=urt, AUTO=urt, OPEN=urt or CLOSE=urt. No other commands are accepted. Express the URT ID as a 4-digit number, for example, use 0001 for URT 1. Each transaction opens or closes one and only one URT. Express the MUF ID as a 2-digit number relative to the order of the DBCSID macros in the DBCVTPR, for example, use 01 for MUF 1 (the default MUF). Each transaction disconnects, connects, or disconnects immediate one and only one MUF. You cannot use a wildcard or delimiter character. |
81—82 |
Blank. Upon completion, CA Datacom CICS Services places a standard CA Datacom/DB return code here. |
Example
DFHCOMMAREA
Before executing the link, complete the 82-byte communication area as shown following. Each field is position dependent. Place blanks in the Return Code field (positions 81-82).
----+----1----+----2----+----3----+----4----+----5 . . . +----8-- DBLC OPEN=0001 . . . | | Return Code Field
After Link
After the command is completed, control returns to the linking program and the DFHCOMMAREA is changed. CA Datacom CICS Services places a message (if any) in positions 1-80 and the standard CA Datacom/DB return code in positions 81-82. CA Datacom CICS Services messages and return codes are documented in the CA Datacom/DB Message Reference Guide. For multiple calls to CA Datacom CICS Services, the program must reestablish the communication area before each call.
----+----1----+----2----+----3----+----4----+----5 . . . +----8-- DC00177E URT 0001 OPEN ERROR, RC=25 . . . 25 | | | | CA Datacom CICS Services Return Error Message Code
Return Codes
Interpret this return code as follows:
Return Code |
Meaning |
---|---|
blank |
The command processed successfully. |
nonblank |
For an explanation of the meaning and action, see the CA Datacom/DBMessage Reference Guide. |
Sample COBOL Program
The following sample program demonstrates how the communication area is completed to command CA Datacom CICS Services to OPEN URT 0001.
Note: For an assembler example, the delivered DCCALPR sample program provides examples of the various DBLC commands and can be modified to test different functions.
IDENTIFICATION DIVISION. .. ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. .. 01 COMM-AREA. 02 COMM-AREA-ID PIC X(05) VALUE SPACES. 02 COMM-AREA-COMMAND PIC X(75) VALUE SPACES. 02 COMM-AREA-RTNCDE PIC X(02) VALUE SPACES. .. .. PROCEDURE DIVISION. .. .. MOVE 'DBLC ' TO COMM-AREA-ID. MOVE 'OPEN=0001' TO COMM-AREA-COMMAND. EXEC CICS LINK PROGRAM('DCCOCPR') COMMAREA(COMM-AREA) LENGTH(82) END-EXEC. IF COMM-AREA-RTNCDE EQUAL TO SPACES GO TO NO-ERR. MOVE COMM-AREA-COMMAND TO WORKCMDO. MOVE COMM-AREA-RTNCDE TO WORKCDEO. EXEC CICS SEND MAP('XXXXXXX') MAPSET('XXXXXX') ERASE END-EXEC. NO-ERR. ..
Copyright © 2015 CA Technologies.
All rights reserved.
|
|