CBL XOPTS * *
CBL * ** inquiry message to a number of queries, the * * ------------------------------------------------------------- * IDENTIFICATIONDIVISION. * ------------------------------------------------------------- * PROGRAM-ID. CSQ4CVB2 * CICS Transaction Name : MVB2 * *REMARKS ***************************************************************** * @START_COPYRIGHT@ * * Statement: Licensed Materials - Property of IBM * * * * 5695-137 * * (C) Copyright IBM Corporation. 1993, 1997 * * * * Status: Version 1 Release 2 * * @END_COPYRIGHT@ * * * * Module Name : CSQ4CVB2 * * * * Environment : CICS/ESA Version 3.3; COBOL II * * * * CICS Transaction Name : MVB2 * * * * Description : Sample program to show the decomposition of an * * inquiry message to a number of queries, the * * replies from the queries are received and * * when all are available a response is built and * * sent to the reply to queue of the inquiry. * * Part completed inquiries are recovered after * * the application terminates or after system * * failure. * * * * Function : This program provides the credit application * * manager function for the credit check sample * * See IBM MQSeries for MVS/ESA Application * * Programming Reference for details. * * * * ************************************************************* *
EJECT * open reply queue (name from mqtm-userdata) * * ************************************************************* * * * * Program logic * * ------------- * * * *START. * * check the program is started with data. * * if no go to invalid-start-routine * * end-if * * get storage for signal processing. * * retrieve trigger data. * * if userdata (amount) passed to program * * update threshold amount * * end-if * * open inquiry queue. * * if msg on inquiry queue * * open reply queue (loop through names until o.k.) * * else * * open reply queue (name from mqtm-userdata) * * end-if * * open waiting queue. * * open checking account queue. * * open distribution queue. (change name!) * * get browse first msg from waiting queue. * * perform until compcode not = ok * * evaluate msgtype * * when inquiry msg * * perform irt-add-entry * * when response or propagation msg * * perform irt-update-entry * * if match not found * * perform irt-rebuild-no-match * * end-if * * when other * * perform irt-rebuild-unknown-msg * * end-evaluate * * get browse next msg from waiting queue * * end-perform. * * if unexpected compcode * * exit program. * * perform main-process until stop-process. * * close all queues. * * return to cics. * * * * ************************************************************* * *MAIN-PROCESS. * * evaluate * * when irt table full and inquiryq open * * close inquiry queue * * when irt table not full and inquiryq close * * open inquiry queue * * end-evaluate. * * if irt full * * getwait on reply queue * * evaluate return-codes * * when msg got * * perform process-reply-queue * * when no msg * * set flag to stop main-process * * when other * * report error * * set flag to call-error * * end-evaluate * * else * * getwait with signal on inquiry queue * * evaluate return-codes * * when msg got * * perform process-inquiry-queue * * when signal accepted or outstanding * * perform process-signal-accepted * * when other * * report error * * set flag to call-error * * end-evaluate * * end-if. * * evaluate * * when calls ok and msg complete * * perform send-answer * * if error occured * * rollback uow * * set flag to stop main-process * * end-if * * when calls ok * * syncpoint * * when other * * rollback uow * * set flag to stop main-process * * end-evaluate. * * ************************************************************* * *IRT-ADD-ENTRY. * * search irt-table * * at end * * set reply queue trigger control to off * * when empty entry * * fill entry with data from inquiry msg * * end-search. * * if current entries = limit * * set table status to full * * end-if . * * * * ************************************************************* * *IRT-UPDATE-ENTRY. * * set update status to ok * * search irt-table * * at end * * set update status to match not found * * when entry msgid = mqmd-correlid * * evaluate * * when propagation msg * * add/subtract entry counters * * when response msg * * add/subtract entry counters * * end-evaluate * * if msg complete * * set msg complete flag to true * * end-if * * * * ************************************************************* * * * *IRT-REBUILD-UNKNOWN-MSG. * * report error. * * get msg under cursor. * * if error occured * * report error * * exit this section * * end-if. * * perform forward-msg-to-dlq. * * restore gmo options to browse next * * * * ************************************************************* * *IRT-DELETE-ENTRY. * * initialise irt table entry. * * subtract 1 from current entries count. * * set irt status to not full. * * * * ************************************************************* * *IRT-REBUILD-NO-MATCH. * * report error. * * get msg under cursor. * * if error occured * * report error * * exit this section * * end-if. * * perform forward-msg-to-dlq. * * restore gmo options to browse next * * * * ************************************************************* * *IRT-NO-MATCH. * * report error. * * * * ************************************************************* * *FORWARD-MSG-TO-DLQ. * * mqput1 msg received to dlq. * * evaluate return codes * * when ok * * report that msg has been put to dlq * * when other * * report error * * end-evaluate. * * * * ************************************************************* * *PROCESS-SIGNAL-ACCEPTED. * * perform replyq-getsignal. * * evaluate return codes * * when ok * * perform process-replyq-msg * * when signal accepted or outstanding * * perform external-wait * * when other * * report error * * set call-error flag * * end-evaluate. * * * * ************************************************************* * *EXTERNAL-WAIT. * * execute cics wait on the two ecbs * * if inquiryq ecb posted * * perform test-inquiryq-ecb * * else * * perform test-replyq-ecb * * end-if. * * * * ************************************************************* * *TEST-INQUIRYQ-ECB. * * evaluate inquiryq ecb * * when msg arrived * * reset ecb * * perform inquiryq-get * * evaluate return codes * * when ok * * perform process-inquiryq-msg * * when no msg * * continue * * when other * * report error * * set call-error flag * * end-evaluate * * when wait interval expired * * set flag to stop main-process * * when wait cancelled * * set flag to stop main-process * * when other * * report error * * set call-error flag * * end-evaluate * * * * ************************************************************* * *TEST-REPLYQ-ECB. * * evaluate replyq ecb * * when msg arrived * * reset ecb * * perform replyq-get * * evaluate return codes * * when ok * * perform process-replyq-msg * * when other * * report error * * set call-error flag * * end-evaluate * * when wait interval expired * * set flag to stop main-process * * when wait cancelled * * set flag to stop main-process * * when other * * report error * * set call-error flag * * end-evaluate * * * * ************************************************************* * *INQUIRYQ-GET. * * mqget msg * * * * ************************************************************* * *REPLYQ-GET. * * mqget msg * * * * ************************************************************* * *REPLYQ-GETWAIT. * * mqget wait msg * * * * ************************************************************* * *PROCESS-REPLYQ-MSG. * * evaluate * * when response or propagation * * perform irt-update-table * * if no match * * perform irt-no-match * * perform replyq-unknown-msg * * end-if * * when other * * perform replyq-unknown-msg * * exit this section * * end-evaluate. * * mqput msg to waiting queue * * if error occured * * report error * * set call-error flag * * end-if. * * * * ************************************************************* * * end-if. * * if not inquiry msg * * perform iquiryq-unknown-msg * * exit this section * * end-if. * * perform irt-add-entry * * mqput msg to waiting queue * * if error occured * * report error * * set call-error flag * * exit this section * * end-if. * * mqput msg to checking account queue * * if error occured * * report error * * set call-error flag * * exit this section * * end-if. * * if loan figure > threshold amount * * mqput to distribution queue * * if error occured * * report error * * set call-error flag * * exit this section * * end-if * * * * ************************************************************* * *INQUIRYQ-GETSIGNAL. * * mqget with signal * * * * ************************************************************* * *REPLYQ-GETSIGNAL. * * mqget with signal * * * * ************************************************************* * *REPLYQ-UNKNOWN-MSG. * * report error * * perform forward-msg-to-dlq. * * * * ************************************************************* * *INQUIRYQ-UNKNOWN-MSG. * * report error * * perform forward-msg-to-dlq. * * * * ************************************************************* * *WAITQ-UNKNOWN-MSG. * * report error * * perform forward-msg-to-dlq. * * * * ************************************************************* * *SEND-ANSWER. * * perform until all messages retreived or compcode not = ok * * get msg from waiting queue with correlid. * * evaluate msgtype * * when inquiry msg * * move data to output msg * * when response msg * * move data to output msg * * when propagation msg * * continue * * when other * * perform waitq-unknown-msg * * end-evaluate * * end-perform. * * if error * * report error * * set call-error flag * * exit this section * * end-if. * * reset msg complete flag * * mqput1 answer msg to replytoq * * if error occured * * report error * * set call-error flag * * exit this section * * end-if. * * * * ************************************************************* * *SET-REPLYQ-TC-OFF. * * mqset tc off * * if error occured * * report error * * set call-error flag * * exit this section * * end-if. * * * * ************************************************************* * * ************************************************************* * * build error message * * send message * * return to cics. * * * * ************************************************************* * * ************************************************************* * * ------------------------------------------------------------- * ENVIRONMENT * ------------------------------------------------------------- * * ------------------------------------------------------------- *
. * ------------------------------------------------------------- * * ------------------------------------------------------------- * WORKING-STORAGESECTION. * ------------------------------------------------------------- * * ------------------------------------------------------------- * * * W00 - General work fields *
01 W00-MESSAGE PIC X(70).
0 PIC(2.
01 W00-WAIT-INTERVAL PIC S9 ------------------------------------------------------------- *
01 W00-INPUT-MSG-PRIORITY PIC S9(09) 01 W00-INPUT-MSG-PRIORITY PIC S9(09) BINARY * ------------------------------------------------------------- *
0W00-SUB(0)BINARY
01 PIC(09)BINARY * * W01 - Amount *
01 W01-AMOUNT * * * Queue names *
01 W02-QUEUE-NAMES.
05 W02-INQUIRY-QNAME X(48 VALUE 'CSQ4SAMP.B2.INQUIRY '. * * The .N in the reply/waiting queue signifies a one digit * number 1 to 5. * This will be changed in the program. *
05 W02-REPLY-QNAME PIC X(48) VALUE(9 'CSQ4SAMP *
0REDEFINES
1 5REDEFINES.
10 W02-REPLY-QNAME-NUM * Queue names
10 PICPICjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
05 W02-WAITING-QNAME PICPIC(9)BINARYVALUE
5W02-DEAD-QNAME PIC (8 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
05 REDEFINES W02-WAITING-QNAME 5W02-CHECKACCNT-QNAME X(8 VALUE0 W03-HOBJ-WAITQ PIC(9).
10 PIC
1 W02-WAITING-QNAME-NUM 90). PIC) *
5 PIC4)VALUE 'CSQ4SAMP.DEAD.QUEUE '. *
05 W02-CHECKACCNT-QNAME PIC X(48) VALUE 'CSQ4SAMP.B2.OUTPUT.ALIAS '. *
0 PIC48 ' 1 PIC S9(9) VALUE . *
0 0 XVALUE
W02-ANSWER-QMGRNAME X4)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
05 W02-USERIDENTIFIER PIC 0 . * * W03 - MQM API fields *
0 W03-SELECTORCOUNT S9CSQ4VB1 *
0PICS9 VALUE.
01 W03-CHARATTRS CSQ4VB5
01 W03-HCONN PIC S9(9) BINARYVALUE0 0-.
01 W03-OPTIONS PIC (9) BINARY.
01 W03-HOBJ-REPLYQ PIC S9 *
01 W03-HOBJ-INQUIRYQ PIC S9 PICS99 OCCURS. *
0 W03-HOBJ-CHECKQ S9 .
01 W03-HOBJ-DISTQ PIC S9(9) BINARY.
01 W03-COMPCODE CMQODV
0 W03-REASON 9) BINARY
01 W03-SELECTORS-TABLE.
05 W03-SELECTORS CMQMDV
01 W03-INTATTRS-TABLE5W03-CSQ4BQRM PIC(BINARY 2 .
01 W03-DATALEN PIC S9(90MQM-GET-MESSAGE-OPTIONS.
01C CMQGMOV *
01 W03-GET-BUFFER.
0 W03-CSQ4BQRM
COPY * *
05 W03-CSQ4BIIM CSQ4VB5.
COPY CSQ4VB1. *
05 05W03-CSQ4BAM
COPY. *
01 W03-PUT-BUFFER.
05 W03-CSQ4BAM.
COPY. *
05 * API control blocks
COPY * main process flags * * API control blocks *
01 MQM-OBJECT-DESCRIPTOR.
COPY CMQODV.
01 MQM-MESSAGE-DESCRIPTOR.
COPY CMQMDV
01 MQM-PUT-MESSAGE-OPTIONS.
CMQPMOV
01 MQM-GET-MESSAGE-OPTIONS.
COPY CMQGMOV.
01 MQM-TRIGGER-MESSAGE.
COPY * Fields for ECB handling * * Fields for ECB handling *
1 W04-INITIMG VALUE
.
01 W04-INITIMG PIC X VALUE LOW-VALUES. * * CICS ts queue fields *
01 W05-TD-MESSAGE-LENGTH PIC S9(4) BINARY.
01 W05-TS-MESSAGE-LENGTH PIC S9(4) BINARY.
01 W05-ABSTIME PIC S9(15) COMP-3. * * main process flags *
01 W06-MAIN-PROCESS-FLAG PIC 9 VALUE 0.
88 END-PROCESS VALUE 1.
END-PROCESS 9 VALUE 1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 *
01 W06-INQUIRYQ-STATUS PIC*
8 VALUE'
INQUIRYQ-CLOSED0IRT-TABLE-SET-NOT-FULL(9 VALUE *
01 8 VALUE
88CALLS-OK
01 W06-CALL-ERROR java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 7 *
01 W06-MSG-STATUS *
8 VALUE
88 MSG-NOT-COMPLETE VALUE MSG-COMPLETE 1. * * CSQ4VB8 contains error messages used in this program * * * * Inquiry Record Table definition and associated fields *
01 IRT-SUB java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
01 IRT-STATUS-OK * attention identifiers
01 IRT-STATUS-NO-MATCH PIC DFHAID.
01 IRT-UPDATE-STATUS * ------------------------------------------------------------- *
88 IRT-UPDATE-NO-MATCH VALUE 1.
0 IRT-MAX-ENTRIES S9.
01 IRT-CURRENT-ENTRIES PIC S9(9) BINARYVALUE ZEROS.
0 RT-TABLE-SET-FULL(9) BINARY 1.
0 PIC()BINARY ALUE
01 IRT-TABLE-STATUS 01 IRT-TABLE-SET-NOT-FULL S9(9 BINARYVALUE.
8 IRT-TABLE-FULL 1. * * Size of IRT-TABLE is set here - to 10 initially *
01 IRT-TABLE.
05 IRT-TABLE-ELEMENT OCCURS 10 INDEXEDBY IRT-INDEX1.
EJECT
15 IRT-MSGID PICPROCEDURE . * ------------------------------------------------------------- *
15 IRT-REPLYEXP PIC S9(9) BINARY.
15 IRT-REPLYREC PIC S9(9) BINARY. * * MQV contains constants (for filling in the control blocks) * and return codes (for testing the result of a call) *
01 W99-MQV.
COPY * and return codes (for testing the result of a call) * * DFHAID contains the constants used for checking for * attention identifiers *
COPY * * * ------------------------------------------------------------- * LINKAGESECTION. * ------------------------------------------------------------- *
0 .
05 L01-ECB-ADDR1 POINTER.
05 L01-ECB-ADDR2 POINTER. * EXECjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
05 L02-INQUIRY-ECB1 PIC* get addressability to storage
0 PIC(0)BINARY
01 REDEFINES L02-ECBS.
05 PIC X(SETW04-ECB-PTR)
05 L02-INQUIRY-ECB1-CC PIC S9(W04-INITIMG
05 PIC X(02).
05 L02-REPLY-ECB2-CC PIC S9(005L01-ECB-ADDR1. *
EJECT * ------------------------------------------------------------- * PROCEDUREDIVISION. * ------------------------------------------------------------- * * ------------------------------------------------------------- *
A-MAIN SECTION. * ------------------------------------------------------------- * * * * * * ------------------------------------------------------------- * * * * Initialize IRT and compute number of entries in table * * Get the amount, if one is passed COMPUTE IRT-MAX-ENTRIES = LENGTHOF MQTM-USERDATA DIVISIONjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 * * Check that the program has been started with data * EXECCICSASSIGN
STARTCODE(W00-STARTCODE) END-EXEC. * IF W00-STARTCODE NOT =SETTO PERFORM INVALID-START-ROUTINE * No return from INVALID-START-ROUTINE END-IF. * * Getmain storage for possible external wait on ecbs * EXECCICS GETMAIN SET(W04-ECB-ADDR-LIST-PTR *
FLENGTH(8) END-EXEC. * * get addressability to storage * SETADDRESSOF L01-ECB-ADDR-LIST TO W04-ECB-ADDR-LIST-PTR. * EXECCICS GETMAIN SET(W04-ECB-PTR)
FLENGTH(8)
INITIMG MQTM-QNAME W02-REPLY-QNAME EXEC GETMAIN * * get addressability to storage * SETADDRESSOF L02-ECBS TO. * * store address's of ebcs into list *
L01-ECB-ADDR1 ADDRESSOF. SET L01-ECB-ADDR2 TOADDRESSOF L02-REPLY-ECB2. * * Retrieve the trigger data this transaction was started with * EXECCICS RETRIEVE INTO(MQTM) END-EXEC* * * Get the amount, if one is passed * IF MQTM-USERDATA NOT = SPACE MOVE MQTM-USERDATA TO W01-AMOUNT END-IF. * * Open the inquiry queue * PERFORM OPEN-INQUIRYQ * * * Test the output from the open. * If not ok write record the error an exit from the program * IFIF W03-COMPCODE =MQCC-OK GOTO A-MAIN-EXIT ELSE
INQUIRYQ-OPENTO END-IF * * At this point the data retrieved determines the open * queue processing. * * If the inquiry-queue has been triggered then * loop trying to open a reply-queue * * If a reply-queue has been triggered then open that * particular reply-queue * IF MQTM-QNAME = W02-INQUIRY-QNAME PERFORM OPEN-UNNAMED-REPLY-QUEUE IF W03-COMPCODE NOT = MQCC-OK GOTO A-MAIN-EXIT END-IF ELSE PERFORM OPEN-NAMED-REPLY-QUEUE IF W03-COMPCODE NOT = MQCC-OK TO ELSE MOVE MQTM-QNAME TO W02-REPLY-QNAME END-IF END-IF. * * Open the Waiting Queue * Use the number from the reply queue - matching pairs * MOVE MQOT-Q TO MQOD-OBJECTTYPE= THEN OPEN-NAMED-REPLY-QUEUE MOVETO. MOVE W02-WAITING-QNAME TO MQOD-OBJECTNAME. * * Initialize W03-OPTIONS to open the queue for input * exclusive, browse and output * COMPUTE W03-OPTIONS = MOVETO W02-REPLY-QNAME
MQOO-BROWSE +
MQOO-PASS-IDENTITY-CONTEXT +
MQOO-SAVE-ALL-CONTEXT +
MQOO-OUTPUT. * * Open the queue * ''USING
MQOD
W03-OPTIONS MOVETO.
W03-COMPCODE
W03-REASON. * * Test the output from the open. * If not ok then exit program * IF W03-COMPCODE NOT = MQCC-OK THEN MOVE' MOVE . PERFORM RECORD-CALL-ERROR GOTO A-MAIN-EXIT. * * Open the Checking Account Queue * MOVEMQOT-Q MQOD-OBJECTTYPE MOVE W02-CHECKACCNT-QNAME TOW03-HOBJ-WAITQ * * Initialize W03-OPTIONS to open the queue for output * COMPUTE W03-OPTIONS = MQOO-OUTPUT +
MQOO-PASS-IDENTITY-CONTEXT. * * Open the queue * CALL'MQOPEN'USING W03-HCONN
MQODMOVEMQOPEN M02-OPERATION
W03-OPTIONS
W03-HOBJ-CHECKQ RECORD-CALL-ERROR
W03-COMPCODE
W03-REASON. * * Test the output from the open. * If not ok then exit program * IFNOT=MQCC-OK MOVEMQOPEN M02-OPERATION MOVE MQOD-OBJECTNAME TO M02-OBJECTNAME
RECORD-CALL-ERROR
* * Open the Distribution Queue * *
BJECTTYPE MOVE W02-DIST-QNAME TO MQOD-OBJECTNAMEMQOD * * Initialize W03-OPTIONS to open the queue for output * COMPUTE W03-OPTIONS = MQOO-OUTPUT +
. * * Open the queue *
W03-COMPCODE
MQODW03-REASON
W03-OPTIONS
W03-HOBJ-DISTQ
W03-COMPCODE
W03-REASON. * * Test the output from the open. * If not ok then exit program * IF* 'MQOPEN 'TO M02-OPERATION
W02-DIST-QNAME MQOD-OBJECTNAME
PERFORM TESTBEFORE GO A-MAIN-EXIT * ***************************************************************** * Rebuild the IRT (Inquiry Record Table) ***************************************************************** * * Initialize the Get Message Options (MQGMO) control block. * (The copy book initializes the remaining fields) * COMPUTE
MQGMO-BROWSE-FIRST. MOVELENGTHOF W03-GET-BUFFER * * Make the first MQGET call outside the loop * using the BROWSE-FIRST option * CALL'MQGET'USING W03-HCONN
W03-HOBJ-WAITQW03-GET-BUFFER
MQMD
MQGMO
W03-BUFFLEN
W03-GET-BUFFER
W03-DATALEN
W03-COMPCODE
W03-REASON. * * Test the output of the MQGET call using the PERFORM loop * that follows. * * Change the MQGMO Options field to BROWSE-NEXT * COMPUTE* Test the output of the MQGET call. If the call failed,
MQGMO-BROWSE-NEXT. * * Loop from here to END-PERFORM until the MQGET call fails * PERFORMWITHTESTBEFORE UNTIL W03-COMPCODE NOT = MQCC-OK * * Perform relevant add/update IRT entry dependent upon * message. If message unknown then put it to deadq * EVALUATETRUE WHEN INITIAL-INQUIRY-MESSAGE ' BROWSE'TO
T1-IRT-ADD-ENTRY WHENOR PERFORM T2-IRT-UPDATE-ENTRY A-MAIN-EXIT IF IRT-UPDATE-NO-MATCH PERFORM T5-IRT-REBUILD-NO-MATCH * END-IF WHENOTHER PERFORM T3-IRT-REBUILD-UNKNOWN-MSG *
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 26 * * Clear MQMD-MSGID and MQMD-CORRELID before the next * MQGET call to ensure that all messages are retrieved *
MOVEjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 7 * * Get the next message * *
W03-HOBJ-WAITQ
MQMD
MQGMO
W03-BUFFLEN
W03-GET-BUFFER * *
W03-DATALEN
W03-COMPCODE
W03-REASON * * Test the output of the MQGET call at the top of the loop. * Exit the loop if an error occurs * END-PERFORM. * * Test the output of the MQGET call. If the call failed, * print an error message showing the completion code and * reason code, unless the reason code is NO-MSG-AVAILABLE. * * Note: When the loop reaches the end of the file, the * completion code is MQCC-FAILED and the reason code * is MQRC-NO-MSG-AVAILABLE * MOVE' M02-OPERATION
(W03-REASONMOVE W02-WAITING-QNAME M02-OBJECTNAME
PERF RECORD-CALL-ERROR MOVE W02-WAITING-QNAME TO M02-OBJECTNAME PERFORM* GOTO A-MAIN-EXIT. * * * Loop until wait expired on either or both inquire and * reply queue depending on IRT status. Achieved by setting * flag * PERFORM MAIN-PROCESSW03-REASON. UNTIL* * PERFORM CLOSE-QUEUES. *
A-MAIN-EXIT. * * * Return to CICS * EXECCICSRETURN END-EXEC. * GOBACK.
JECT * * ------------------------------------------------------------- *
CLOSE-QUEUES SECTION. * ------------------------------------------------------------- * * * * This section closes the queues. * * * * ------------------------------------------------------------ * * IF problems instances the PERFORM* * * Close waiting and reply queues, waiting before reply * to avoid problems if multiple instances of the program * are triggered * CALL*
W03-COMPCODE
MQCO-NONE
W03-COMPCODEMOVE W02-WAITING-QNAME TO M02-OBJECTNAME
W03-REASON. * NOTMQCC-OK MOVEjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 MOVE W02-WAITING-QNAME TO M02-OBJECTNAME
RECORD-CALL-ERROR END-IF. * CALL'MQCLOSE'USING RECORD-CALL-ERROR * Return to performing section
W03-HOBJ-REPLYQ
MQCO-NONE CALL'*
W03-HOBJ-CHECKQ * IF W03-COMPCODE NOT = MQCC-OK MOVE' * * MOVE* This section closes the inquiry queue * PERFORM RECORD-CALL-ERROR END-IF. * * Close the output queues * CALL MQCLOSE W03-HCONN
W03-HOBJ-CHECKQMQCO-NONE
W03-REASO * CALL'' USING IFW03-COMPCODE NOT = MQCC-OK * IF W03-COMPCODE NOT = MQCC-OK MOVE'MQCLOSE'TO M02-OPERATION MOVE W02-CHECKACCNT-QNAME TO M02-OBJECTNAME 'W03-REASON. PERFORM W02-INQUIRY-QNAME M02-OBJECTNAME END-IF. * CALL'MQCLOSE'USING MQCLOSE.
W03-HOBJ-DISTQ
MQCO-NONE
W03-COMPCODE
W03-REASON. * IF W03-COMPCODE NOT* MOVE'MQCLOSE'TO M02-OPERATION MOVEEXIT. PERFORM RECORD-CALL-ERROR END-IF. *
CLOSE-QUEUES-EXIT. MAIN-PROCESS SECTION. * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
CLOSE-INQUIRYQ SECTION. * ------------------------------------------------------------- * * * * This section closes the inquiry queue * * * * ------------------------------------------------------------ * * CALL'MQCLOSE'USING W03-HCONN
java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 PERFORMANDjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
W03-COMPCODE. W03-COMPCODE
. * IF W03-COMPCODE NOT = MQCC-OK 'MQCLOSE' MAIN-PROCESS java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 MOVE W02-INQUIRY-QNAME TO M02-OBJECTNAME PERFORM*
(NOT IRT-TABLE-FULL ) *
CLOSE-INQUIRYQ-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
MAIN-PROCESS SECTION. * ------------------------------------------------------------- * * * * This section performs the main message handling of the * * program. It is called from a loop in MAIN. * * * * The program gets and handles messages, depending on the * * status of the IRT. When a message is complete, an answer * * is sent. If an error occurs, it is recorded and END-PROCESS * * is set. * * * * ------------------------------------------------------------ * * * Ensure the inquiry queue is open when there is space in * the IRT for a new inquiry and closed when the IRT is full * *
(IRT-TABLE-FULL) PERFORM CLOSE-INQUIRYQ IF W03-COMPCODE = MQCC-OK SET INQUIRYQ-CLOSED TOW03-REASON ) ELSE MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAG WHEN END-IF * WHEN (NOT IRT-TABLE-FULL AND INQUIRYQ-CLOSED) PERFORM OPEN-INQUIRYQ. IF W03-COMPCODE = MQCC-OK SET INQUIRYQ-OPEN * only, using get wait ELSE MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAG GOTO MAIN-PROCESS-EXIT *
(W03-COMPCODE WHEN (W03-COMPCODE = MQCC-OK END-EVALUATE. * * If the IRT is full, get messages from the reply queue * only, using get wait * IF PERFORM REPLYQ-GETWAIT) EVALUATE WHEN* OTHER PERFORM PROCESS-REPLYQ-MESSAGE * MOVE W06-CALL-STATUS
W03-REASON = MQRC-NO-MSG-AVAILABLE) MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAG * WHENOTHER MOVE'MQGET WAIT 'TO M02-OPERATION PROCESS-SIGNAL-ACCEPTED * PERFORM RECORD-CALL-ERROR MOVE W06-CALL-ERROR TO W06-CALL-STATUS * END-EVALUATE * * Else the IRT isn't full, get messages from both * inquiry and reply queues, using get signal * ELSE
EVALUATETRUE WHEN (W03-COMPCODE = MQCC-OK AND
W03-REASONMQRC-NONE PERFORM PROCESS-INQUIRYQ-MESSAGE * WHEN (W03-COMPCODE = MQCC-WARNING AND
W03-REASON) OR
(W03-COMPCODE = MQCC-FAILED AND
W03-REASONMQRC-SIGNAL-OUTSTANDING) PERFORM* problems have occurred * OTHER MOVE ( AND MSG-COMPLETE MOVETO PERFORM
W06-CALL-ERROR * END-EVALUATE END-IF. * * Check whether an inquiry is complete, or whether * problems have occurred * EVALUATETRUE WHEN( AND MSG-COMPLETE PERFORM IF W03-COMPCODEIFNOTWOTHER MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAG EXECCICS SYNCPOINT ROLLBACK END-EXEC GOTO MAIN-PROCESS-EXIT END-IF EXECEXEC SYNCPOINT END-EXEC SET MSG-NOT-COMPLETE TOTRUE PERFORMSECTION * WHEN CALLS-OK EXECCICS SYNCPOINT END-EXEC * WHENOTHER MOVEandobject fields completed* EXECCICS SYNCPOINT * message are completed by this routine * END-EVALUATE. * * * EXIT.
EJECT * * ------------------------------------------------------------- *
RECORD-CALL-ERROR * ------------------------------------------------------------- * * * * This section writes an error message to the CICS td queue * * 'CSML' and the CICS ts queue 'CSQ4SAMP'. * * The failing operation and object name fields are completed * * by the calling application. The remaining fields of the * * message are completed by this routine * * * * ------------------------------------------------------------ * * EXECCICS ASKTIME
ABSTIME(W05-ABSTIME) END-EXEC. CICSM02-DATE
ABSTIME(W05-ABSTIME) DATEEXEC TS TIME)TIMESEP END-EXEC. *
(M02-CALL-ERROR-MSG
. MOVE EIBTASKN TO M02-TASK-NUMBER LENGTHLENGTH MOVE W03-COMPCODETOW05-TS-MESSAGE-LENGTH MOVETO * MOVE M02-TIME TO M03-TIME. LENGTH M02-CALL-ERROR-MSG
W05-TS-MESSAGE-LENGTH * * EXEC TD *
QUEUE'java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
QUEUE('CSQ4SAMP') FROM (M02-CALL-ERROR-MSG) LENGTH(W05-TS-MESSAGE-LENGTH) END-EXEC. * EXECCICS WRITEQ *
QUEUE . FROM (M03-CSML-ERROR-MSGA*java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 LENGTH(W05-TD-MESSAGE-LENGTH) END-EXEC. *
RECORD-CALL-ERROR-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
T1-IRT-ADD-ENTRY SECTION. * ------------------------------------------------------------- * * * * This section adds a new entry into the in memory inquiry * * record table. If the new entry fills the table, table full * * is set. If the table is already full, there is an internal * * logic error - so triggering is set off for the replyq to * * avoid repeated errors. * * * * ------------------------------------------------------------ * * SET IRT-INDEX1 TO 1. * SEARCH ATEND * table is full - therefore a logic * error has occurred. we need to set triggering off * for the replyq so that the transaction does not * get repeatedely started PERFORM SET-REPLYQ-TC-OFF EXECCICS ABEND
ABCODE('TFUL') END-EXEC *
1 * ADD 1 TO IRT-CURRENT-ENTRIES MOVE MQMD-MSGID TO IRT-MSGID(M ZEROES*java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 MOVESET 1 MOVE ZEROES IRT-REPLYREC) IF CSQ4BIIM-LOANREQ > W01-AMOUNT MOVE 1 TO IRT-PROPSOUT TO ELSE MOVE ZEROES TO IRT-PROPSOUT(IRT-INDEX1) END-IF
. *
= MOVE IRT-TABLE-SET-FULL TO IRT-TABLE-STATUS. *
T1-IRT-ADD-ENTRY-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
T2-IRT-UPDATE-ENTRY SECTION. * ------------------------------------------------------------- * * * * This IRT update entry routine can be called from the initial * * rebuild of IRT at start of program OR during the main loop. * * * * When a matched entry is found the counts are updated * * dependent on type of message. * * * * If all the replies have been received then the message * * complete flag is set to indicate this. * * * * ------------------------------------------------------------ * * SET IRT-INDEX1 MOVE IRT-STATUS-OK TO IRT-UPDATE-STATUS. TO IRT-REPLYEXP(IRT-INDEX1) SEARCH IRT-TABLE-ELEMENT VARYING IRT-INDEX1 * ATEND MOVE IRT-STATUS-NO-MATCH TO IRT-UPDATE-STATUS * WHEN IRT-MSGID( QUERY-RESPONSE-MESSAGE
* * WHEN*java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO. ADDPERFORM. TO IRT-REPLYEXP(IRT-INDEX1) SUBTRACT 1 FROM IRT-PROPSOUT(IRT-INDEX1) WHENIRT-PROPSOUT(IRT-INDEX1 ZERO ADD 1 TO IRT-REPLYREC(IRT-INDEX1) END-EVALUATE . * * Test whether all responses have been received, * if they have - set message complete * IF IRT-REPLYREC(IRT-INDEX1) =
IRT-REPLYEXPT2-IRT-UPDATE-ENTRY-EXIT
IRT-PROPSOUT(IRT-INDEX1) = ZERO PERFORM. ELSE CONTINUE END-IF END-SEARCH. *
T2-IRT-UPDATE-ENTRY-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
T3-IRT-REBUILD-UNKNOWN-MSG SECTION. * ------------------------------------------------------------- * * * * This section is called during the initial phase of the * * program when rebuilding the IRT because an 'unknown message * * has been encountered on the 'waiting' queue. * * This code will remove the message using the message * * under cursor option of MQGET and MQPUT it on the deadletter * * queue. * * * * ------------------------------------------------------------ * * MOVE'UNKNOWN MSG DETECTED ON QUEUEIF NOT = MQCC-OK MOVE W02-WAITING-QNAME TO M02-OBJECTNAME. PERFORM * put the message on the dead letter queue * PERFORM T6-IRT-REBUILD-GET-MSG. IF W03-COMPCODE NOT = MQCC-OK GOTO T3-RESTORE END-IF. * * put the message on the dead letter queue * MOVE W03-HOBJ-WAITQ TOCOMPUTEMQGMO-OPTIONS = MQGMO-NO-WAIT PERFORM FORWARD-MSG-TO-DLQ *
T3-RESTORE * * Change the MQGMO Options field back to BROWSE-NEXT * COMPUTE MQGMO-OPTIONS = MQGMO-NO-WAIT +
. *
T3-IRT-REBUILD-UNKNOWN-EXIT. * * Return to performing section * EXITjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
EJECT * * ------------------------------------------------------------- *
T4-IRT-DELETE-ENTRY SECTION. * ------------------------------------------------------------- * * * * This section deletes and entry from the IRT * * * * ------------------------------------------------------------ * * MOVE LOW-VALUES TO IRT-TABLE-ENTRY(IRT-INDEX1). SUBTRACT 1 FROM IRT-CURRENT-ENTRIES. MOVE IRT-TABLE-SET-NOT-FULL TO* Return to performing section *
T4-IRT-DELETE-ENTRY-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
T5-IRT-REBUILD-NO-MATCH SECTION* This section gets an unknown message from the waiting queue, * * ------------------------------------------------------------- * * * * This section gets an unknown message from the waiting queue, * * using T6-IRT-REBUILD-GET-MSG, records the error, and puts * * the message to the dead queue. * * * * ------------------------------------------------------------ * * MOVENOT =java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 MOVE* put the message on the dead letter queue PERFORM RECORD-CALL-ERROR * * PERFORM T6-IRT-REBUILD-GET-MSG. IF* Change the MQGMO Options field back to BROWSE-NEXT GOTO T5-RESTORE END-IF. * * put the message on the dead letter queue * MOVE W03-HOBJ-WAITQ TO MQPMO-CONTEXT. PERFORM FORWARD-MSG-TO-DLQ. *
T5-RESTORE. * * Change the MQGMO Options field back to BROWSE-NEXT * COMPUTE MQGMO-OPTIONS = MQGMO-NO-WAIT +
MQGMO-BROWSE-NEXT. *
T5-IRT-REBUILD-NO-MATCH-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
T6-IRT-REBUILD-GET-MSG SECTION. * ------------------------------------------------------------- * * *
--> --------------------
--> maximum size reached
--> --------------------
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.51Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.