CBL XOPTS(ANSI85)
CBL NODYNAM,LIB,OBJECT,RENT,RES,APOST * ------------------------------------------------------------- * IDENTIFICATIONDIVISION. * ------------------------------------------------------------- * PROGRAM-ID. CSQ4CVB2. *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 * (C) Copyright IBM Corporation. 1993, 1997 ** the application terminates or after system * * ************************************************************* * * * * 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. * * * * ************************************************************* * *PROCESS-INQUIRYQ-MSG. * * 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. * * * * ************************************************************* * *INVALID-START-ROUTINE. * * build error message * * send message * * return to cics. * * * * ************************************************************* *
EJECT * ------------------------------------------------------------- * * ------------------------------------------------------------- * ENVIRONMENTDIVISIONDATADIVISIONjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 * ------------------------------------------------------------- * * ------------------------------------------------------------- * DIVISION * ------------------------------------------------------------- * * ------------------------------------------------------------- * WORKING-STORAGE W00-INDEX S9). * ------------------------------------------------------------- * * * W00 - General work fields *
0.
1* Queue
CSQ4SAMP
01 W00-INPUT-MSG-PRIORITY * The .N in the reply/waiting queue signifies a one digitW02-INQUIRY-QNAMEPIC) java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
01 W00-SUBjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
011*java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 * * W01 - Amount *
1R java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 * * Queue names *
01 W02-QUEUE-NAMES.
5 (8 java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 '0 W02-CHECKACCNT-QNAME PIC X(48 * * 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 'CSQ4SAMP.B2.REPLY.N '.
05 REDEFINES W02-REPLY-QNAME.
10 PIC* W03 - MQM API fields
10 01 PICS99 VALUE
10 X(9.
05 W02-WAITING-QNAME PIC X(48) VALUE 'CSQ4SAMP.B2.WAITING.N '.
05 REDEFINES W02-WAITING-QNAME.
10 PIC X(20).
W02-WAITING-QNAME-NUMPIC(0). PIC X(270W03-HCONNS9 ZERO *
0 W02-DEAD-QNAME PICX4)VALUE 'CSQ4SAMP.DEAD.QUEUE '. *
0 PIC(4) VALUE 'CSQ4SAMP.B2.OUTPUT.ALIAS '. *
05 W02-DIST-QNAME PIC0 PIC(1. 'CSQ4SAMP.B4.MESSAGES '. *
0 W02-ANSWER-QNAME W02-DEAD-QNAME X()
05 W02-ANSWER-QMGRNAME PIC X(0 .
5W02-USERIDENTIFIER ( * * * W03 - MQM API fields *
5 W02-DIST-QNAME()VALUE
0W03-INTATTRCOUNTBINARY1
0 1 *
0 PIC LOW-VALUES
01 05 PIC(8.
01 W03-OPTIONS PIC S9(9) BINARY.
0 *
01 W03-HOBJ-INQUIRYQ PIC S9(9) BINARY.
01 W03-HOBJ-WAITQ PIC S9 1 PIC(COPY.
01 W03-HOBJ-CHECKQ PIC S9( 05W03-CSQ4BPGM PIC ()BINARYZERO
01 W03-HOBJ-DISTQ PIC S9(9) BINARY.
01 W03-COMPCODE PIC S9(9) BINARY.
01 W03-REASONS9BINARYjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
01 W03-SELECTORS-TABLE.
05 W03-SELECTORS S9()BINARY 2 TIMES
01 W03-INTATTRS-TABLE.
05 W03-INTATTRS PIC S9(9) BINARYOCCURS* API control blocks1W03-HOBJ-CHECKQPIC(9)BINARY
01 W03-DATALEN PIC S9(9) BINARY.
01 1 1W03-REASON (9 . *
01 W03-GET-BUFFER.
0 .
COPY CSQ4VB405W03-INTATTRS S99) OCCURSTIMES 01 W03-DATALEN PIC S9(9) BINARY.
05 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 24
5. *
05 W03-CSQ4BPGM 1 W04-ECB-ADDR-LIST-PTR.
COPY *
.
COPY CSQ4VB5 *
0 0 W05-TD-MESSAGE-LENGTH PIC 94BINARY
COPY CSQ4VB2 * * API control blocks *
01 MQM-OBJECT-DESCRIPTOR *
COPY * API control blocks
01 MQM-MESSAGE-DESCRIPTOR.
COPY CMQMDV.
01 MQM-PUT-MESSAGE-OPTIONS.
COPY CMQPMOV.
01 MQM-GET-MESSAGE-OPTIONS.
CMQGMOV
01 MQM-TRIGGER-MESSAGE.
COPY CMQTML. * * Fields for ECB handling *
0W04-ECB-ADDR-LIST-PTR.
01 W04-ECB-PTR POINTER.
X LOW-VALUES * * CICS ts queue fields *
01 W05-TD-MESSAGE-LENGTH PIC S9(4) BINARY.
01 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 7
01 W05-ABSTIME PIC S9(15) COMP-3. * * main process flags *
01 W06-MAIN-PROCESS-FLAG PIC IRT-STATUS-NO-MATCH S9 BINARYVALUE
88 - PICVALUE.
01 W06-END-PROCESS PIC S S9. *
01 W06-INQUIRYQ-STATUS PIC X(6) 8INQUIRYQ-OPEN 'OPEN.
88 INQUIRYQ-OPEN VALUE88 INQUIRYQ-CLOSED 0 PIC)BINARY.
88 INQUIRYQ-CLOSED VALUE'CLOSED'. *
01 W06-CALL-STATUS * Size of IRT-TABLE is set here - to 10 initially
88 CALLS-OK.
0 W06-CALL-ERROR X6)VALUE' *
1 .
88 VALUE
88 MSG-NOT-COMPLETE 1 * * CSQ4VB8 contains error messages used in this program * * * * Inquiry Record Table definition and associated fields *
01 IRT-SUB PIC* DFHAID contains the constants used for checking for
01 IRT-STATUS-OK PIC*
01 IRT-STATUS-NO-MATCH PIC S9(9) BINARYVALUE 1.
01 IRT-UPDATE-STATUS PIC S9(9) BINARYVALUE ZEROS SECTION
88 IRT-UPDATE-NO-MATCH VALUE 1.
01 IRT-MAX-ENTRIES PIC S9(9) BINARY.
L01-ECB-ADDR2.
01 IRT-TABLE-SET-FULL1I PIC S9 VALUE PIC) ZEROS
01 IRT-TABLE-STATUS8 VALUE
88 * * * Size of IRT-TABLE is set here - to 10 initially *
01 IRT-TABLE.
05 IRT-TABLE-ELEMENT OCCURS 10 INDEXEDBY IRT-INDEX1.
10 IRT-TABLE-ENTRY.
15 IRT-MSGID PIC X * ------------------------------------------------------------- *
15 IRT-PROPSOUT PIC S9(9) BINARY.
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 CMQV SUPPRESS. * * DFHAID contains the constants used for checking for * attention identifiers *
COPY DFHAID SUPPRESS. * * ------------------------------------------------------------- * LINKAGESECTION. * ------------------------------------------------------------- *
01 L01-ECB-ADDR-LIST. POINTER
05 * *
1 .
05 L02-INQUIRY-ECB1 PICjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 26
05 L02-REPLY-ECB2 *
0 REDEFINES
05 PICSET
05 L02-INQUIRY-ECB1-CC PIC S9 * *
05 PIC X(02).
05 L02-REPLY-ECB2-CC PIC S9 * Initialize IRT and compute number of entries in table *
EJECT * * ------------------------------------------------------------- * PROCEDURE. * ------------------------------------------------------------- * * ------------------------------------------------------------- * * * ------------------------------------------------------------- * * * * * * ------------------------------------------------------------- * * * * Initialize IRT and compute number of entries in table * MOVE LOW-VALUES * queue processing. COMPUTE IRT-MAX-ENTRIES = een triggered then LENGTH* Getmain storage for possible external wait on ecbs * * Check that the program has been started with data * EXECCICSASSIGN
STARTCODE(W00-STARTCODE) END-EXECGOTO * IF W00-STARTCODE NOTELSE PERFORM INVALID-START-ROUTINE * No return from INVALID-START-ROUTINE END-IF W03-COMPCODE=MQCC-OK * * Getmain storage for possible external wait on ecbs * CICS SET(W04-ECB-ADDR-LIST-PTR * Open the Waiting Queue
FLENGTH * END-EXEC. * * get addressability to storage * SETADDRESSOF L01-ECB-ADDR-LIST TOSETTO L02-INQUIRY-ECB1 * EXECCICS GETMAIN SET(W04-ECB-PTR)
FLENGTH(8)
INITIMG(W04-INITIMG) END-EXEC. * * get addressability to storage * SETADDRESSOF L02-ECBS * * * store address's of ebcs into list * SET L01-ECB-ADDR1 TOADDRESSOF L02-INQUIRY-ECB1. SET L01-ECB-ADDR2 TOADDRESSOFW03-REASON * * Retrieve the trigger data this transaction was started with * EXEC* If not ok write record the error an exit from the program INTO(MQTM) END-EXEC. * * Get the amount, if one is passed * IFSET TRUE MOVE MQTM-USERDATA. 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 * * Initialize W03-OPTIONS to open the queue for output * ELSECOMPUTEW03-OPTIONS + SET INQUIRYQ-OPEN TOMQOO-PASS-IDENTITY-CONTEXT 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 PERFORM OPEN-UNNAMED-REPLY-QUEUE * GOTO A-MAIN-EXIT * Test the output from the open. END-IF ELSE PERFORMjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 IFNOTjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 GOTO A-MAIN-EXIT ELSE
MQTM-QNAMEW02-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 * Open the queue MOVE W02-REPLY-QNAME-NUM TOCALL MQOPEN W03-HCONN MOVE MQOD-OBJECTNAME * * Initialize W03-OPTIONS to open the queue for input * exclusive, browse and output * COMPUTE W03-OPTIONS = MQOO-INPUT-EXCLUSIVE + * If not ok then exit program
+
MQOO-PASS-IDENTITY-CONTEXT +
MQOO-SAVE-ALL-CONTEXT +
MQOO-OUTPUT * * Open the queue * CALL'MQOPEN'USING W03-HCONN
MQOD * Test the output from the open.
W03-OPTIONS TO.
W03-HOBJ-WAITQ
W03-COMPCODE
W03-REASON. * * Test the output from the open. * If not ok then exit program * IF W03-COMPCODE NOT = MQCC-OK THEN 'MQOPEN'TO MOVE MQOD-OBJECTNAMEW03-OPTIONS PERFORM GOTO A-MAIN-EXIT. * * Open the Checking Account Queue * MOVE MQOT-Q *
. * * Initialize W03-OPTIONS to open the queue for output * PERFORM * Make the first MQGET call outside the loop * * Open the queue * CALL'MQOPEN'USING MOVE MQOT-Q TO MQOD-O.
W03-HOBJ-CHECKQ
W03-COMPCODE
W03-REASON. * * Test the output from the open. * If not ok then exit program * IF W03-COMPCODE NOT = MQCC-OK THEN MOVE'MQOPEN'TO* MOVE MQOD-OBJECTNAME TO M02-OBJECTNAME PERFORM RECORD-CALL-ERROR GOTO A-MAIN-EXIT * Change the MQGMO Options field to BROWSE-NEXT * * Open the Distribution Queue * * MOVE*MOVEMQOPENM02-OPERATION TO. * * 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
MQOD
W03-OPTIONS
W03-HOBJ-DISTQ
W03-COMPCODE
W03-REASON * * Test the output from the open. * If not ok then exit program * IF***************************************************************** MOVE'MQOPEN '* MOVE MQOD-OBJECTNAME TO M02-OBJECTNAME PERFORM RECORD-CALL-ERROR GOTO 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. MOVELENGTH * * Make the first MQGET call outside the loop * using the BROWSE-FIRST option * CALL'MQGET'USING W03-HCONN
W03-HOBJ-WAITQ
MQMD
MQGMO
W03-BUFFLEN
W03-GET-BUFFER * Test the output of the MQGET call using the PERFORM loop
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 MQGMO-OPTIONS = MQGMO-NO-WAIT *
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 PERFORM T1-IRT-ADD-ENTRY WHEN QUERY-RESPONSE-MESSAGE OR PROPAGATION-MESSAGE PERFORM T2-IRT-UPDATE-ENTRY IF IRT-UPDATE-NO-MATCH PERFORM T5-IRT-REBUILD-NO-MATCH END-IF WHENA-MAIN-EXIT PERFORM T3-IRT-REBUILD-UNKNOWN-MSG END-EVALUATE * * Clear MQMD-MSGID and MQMD-CORRELID before the next * MQGET call to ensure that all messages are retrieved * MOVE* MOVE MQCI-NONE TO MQMD-CORRELID * * Get the next message * CALL'MQGET UEUES SECTION.
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 * IF
(W03-REASON NOT = MQRC-NO-MSG-AVAILABLE) ) 'MQGET BROWSE'TO MOVETO
ORM GO 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-PROCESS WITHTESTAFTER UNTIL END-PROCESS. * PERFORM *
A-MAIN-EXIT. * * * Return to CICS * EXECCICSRETURN END-EXEC. * GOBACK.
EJECT * * ------------------------------------------------------------- *
CLOSE-QUEUES SECTION. * ------------------------------------------------------------- * * * * This section closes the queues. * * * * ------------------------------------------------------------ * * IF INQUIRYQ-OPEN * * PERFORM. * * Close waiting and reply queues, waiting before reply * to avoid problems if multiple instances of the program * are triggered * CALLMQCLOSEjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
W03-HOBJ-WAITQ.
MQCO-NONE *
W03-COMPCODE
W03-REASON *
I = MQCC-OK
MQCO-NONE MOVEW02-WAITING-QNAMETO PERFORM RECORD-CALL-ERROR END-IF. * IF = MQCC-OK
W03-HOBJ-REPLYQ
MQCO-NONE
W03-COMPCODE
W03-REASON. * IF W03-COMPCODE NOT = MQCC-OKEND-IF MOVE'MQCLOSE'TO M02-OPERATIONPERFORM MOVE W02-REPLY-QNAME TO M02-OBJECTNAME PERFORM END-IF. * * Close the output queues * '
MQCO-NONE W02-REPLY-QNAME
W03-COMPCODE
W03-REASON. * IF W03-COMPCODE * MOVE'MQCLOSE'TO M02-OPERATION ''USINGW03-HOBJ-INQUIRYQ MOVE W02-CHECKACCNT-QNAME TO M02-OBJECTNAME PERFORM RECORD-CALL-ERROR END-IF. * CALL MQCLOSEW03-COMPCODEMQCC-OK
W03-HOBJ-DISTQ
MQCO-NONE
W03-COMPCODE
java.lang.StringIndexOutOfBoundsException: Range [42, 32) out of bounds for length 43 * IF W03-COMPCODE RECORD-CALL-ERROR MOVE''java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 19 MOVE W02-DIST-QNAME TO M02-OBJECTNAME PERFORM RECORD-CALL-ERROR END-IF. *
CLOSE-QUEUES-EXIT * * * Return to performing section * EXIT
EJECT * * * ------------------------------------------------------------- *
CLOSE-INQUIRYQ SECTION. * ------------------------------------------------------------- * * * * This section closes the inquiry queue * * * * ------------------------------------------------------------ * * CALL'MQCLOSE'USING W03-HCONN
W03-HOBJ-INQUIRYQ
MQCO-NONE
W03-COMPCODE
W03-REASON. * IF W03-COMPCODE NOT W03-HOBJ-INQUIRYQ MOVE'MQCLOSE'TO M02-OPERATION MOVE W02-INQUIRY-QNAME TOEVALUATE PERFORM (IRT-TABLE-FULL) END-IF. *
CLOSE-INQUIRYQ-EXITIF = MQCC-OK * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
MAIN-PROCESS. * ------------------------------------------------------------- * * * * 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 * EVALUATETRUE WHEN (IRT-TABLE-FULL AND INQUIRYQ-OPEN PERFORM CLOSE-INQUIRYQ IF W03-COMPCODE *
INQUIRYQ-CLOSED ELSE MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAG * GO END-IF * WHENWHENAND INQUIRYQ-OPEN PERFORM OPEN-INQUIRYQ IF W03-COMPCODE = WHEN (W03-COMPCODE = MQCC-AND SET INQUIRYQ-OPEN TOTRUE ELSEMOVETO MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAG java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 GOTO MAIN-PROCESS-EXIT END-IF END-EVALUATE * * If the IRT is full, get messages from the reply queue * only, using get wait * IFMOVETO PERFORM REPLYQ-GETWAIT EVALUATETRUE WHEN = java.lang.StringIndexOutOfBoundsException: Range [47, 6) out of bounds for length 7
W03-REASON = MQRC-NONE) PERFORM PROCESS-REPLYQ-MESSAGE * WHEN (java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
WHEN (W03-COMPCODE MOVE W06-END-PROCESS TO W06-MAIN-PROCESS-FLAGjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 * WHEN MOVE'MQGET WAIT 'TO M02-OPERATION =MQRC-SIGNAL-REQUEST-ACCEPTED MOVE W02-REPLY-QNAME TO M02-OBJECTNAME PERFORM RECORD-CALL-ERROR *
W06-CALL-ERRORTO * END-EVALUATE * * Else the IRT isn't full, get messages from both * inquiry and reply queues, using get signal * ELSE PERFORM INQUIRYQ-GETSIGNAL (W03-COMPCODE AND EVALUATETRUE WHEN (W03-COMPCODE = MQCC-OK AND
W03-REASON = MQRC-NONE) PERFORM * WHEN (W03-COMPCODE * inquiry and reply queues, using get signal PERFORMINQUIRYQ-GETSIGNAL OR
(W03-COMPCODE = MQCC-FAILED = )
W03-REASON = MQRC-SIGNAL-OUTSTANDING) PERFORM = MQRC-SIGNAL-REQUEST-ACCEPTEDEND-EVALUATE *
= MQRC-SIGNAL-OUTSTANDING MOVE PROCESS-SIGNAL-ACCEPTED MOVE java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 PERFORM RECORD-CALL-ERROR MOVE W06-CALL-ERROR TO RECORD-CALL-ERROR NOT * END-EVALUATE END-IF. * * Check whether an inquiry is complete, or whether * problems have occurred * TRUE WHEN (CALLS-OKWHEN CALLS-OK) PERFORM SEND-ANSWER SEND-ANSWER END-EXEC IF W03-COMPCODE OTHER TO EXECCICS ROLLBACK GOTO MAIN-PROCESS-EXIT
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 CICSSYNCPOINT SET* PERFORM T4-IRT-DELETE-ENTRY * WHEN CALLS-OK EXECCICS SYNCPOINT END-EXEC * WHENOTHER MOVE ation name are java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70 EXEC* * END-EVALUATE. *
MAIN-PROCESS-EXIT. *
.
A) * * ------------------------------------------------------------- *
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 * * * * ------------------------------------------------------------ * * EXEC*
ABSTIME(W05-ABSTIME) END-EXEC
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
ABSTIMELENGTH
()java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 TIME(M02-TIME) TIMESEP END-EXEC. * MOVE EIBTRNID *
M03-TRANSACTION. MOVE EIBTASKN TO M02-TASK-NUMBER
M03-TASK-NUMBER. MOVE W03-COMPCODE TO M02-COMPCODE MOVEEXEC WRITEQ MOVE M02-DATE TO M03-DATE. MOVE M02-TIME TO M03-TIME. MOVE M02-CALL-ERROR-MSG
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 MOVE W03-REASON M02-REASON TO W05-TD-MESSAGE-LENGTH. * EXECCICS WRITEQ * FROMMOVEOF LENGTHTOW05-TS-MESSAGE-LENGTH END-EXEC. * CICSWRITEQ
('CSML') FROM (M03-CSML-ERROR-MSG) LENGTH(W05-TD-MESSAGE-LENGTH) END-EXEC. *
RECORD-CALL-ERROR-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
T1-IRT-ADD-ENTRY * ------------------------------------------------------------- * * * * 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. * * * * ------------------------------------------------------------ * * SET1 (IRT-INDEX1 * SEARCH IRT-TABLE-ELEMENT >java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 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 . EXECCICS ABEND
ABCODE('TFUL') END-EXEC * WHEN IRT-MSGID(IRT-INDEX1 * * for the replyq so that the transaction does not MOVE* ------------------------------------------------------------- * MOVE 1 TOCICS MOVE* rebuild of IRT at start of program OR during the main loop. * IF CSQ4BIIM-LOANREQ > W01-AMOUNT * MOVETO ELSE* *
OVE complete flag is set to indicate this. * END-IF END-SEARCH. * IF IRT-INDEX1. MOVE IRT-TABLE-SET-FULL TOMOVETO(IRT-INDEX1 *
T1-IRT-ADD-ENTRY-EXIT. * * Return to performing section * EXIT.
EJECT * * ------------------------------------------------------------- *
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 * ------------------------------------------------------------- * * * * 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 TO 1 * * *
. * ATEND * * * WHEN() =MQMD-CORRELID EVALUATETRUE WHEN PROPAGATION-MESSAGE
* ADDCSQ4BPGM-MSGS-SENT
java.lang.StringIndexOutOfBoundsException: Range [67, 40) out of bounds for length 67 SUBTRACT* program when rebuilding the IRT because an 'unknown message * WHEN
------------------------------------------------------------ * * * Test whether all responses have been received, * if they have - set message complete * IF IRT-REPLYREC(IRT-INDEX1) =
IRT-REPLYEXP java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
IRT-PROPSOUT) = java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 SET MSG-COMPLETE TOTRUE ELSE CONTINUE END-IF END-SEARCH. *
. * * Return to performing section * *
EJECT. * * ------------------------------------------------------------- *
java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 7 * ------------------------------------------------------------- * * * * 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 QUEUE'* This section deletes and entry from the IRT * * queue. * PERFORM* *TO) * PERFORM T6-IRT-REBUILD-GET-MSG.
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 40 * Return to performing section END-IF. * * put the message on the dead letter queue * MOVE W03-HOBJ-WAITQ * ------------------------------------------------------------- * PERFORM *
T3-RESTOREjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 * * Change the MQGMO Options field back to BROWSE-NEXT *
MQGMO-OPTIONS + PERFORM. *
* * Return to performing section * EXIT.
EJECTMQGMO-BROWSE-NEXT * * ------------------------------------------------------------- *
T4-IRT-DELETE-ENTRY SECTION* Return to performing section * ------------------------------------------------------------- * * * * This section deletes and entry from the IRT * * * * ------------------------------------------------------------ * * MOVE LOW-VALUES TO IRT-TABLE-ENTRY(IRT-INDEX1). SUBTRACT 1 FROM IRT-CURRENT-ENTRIES * This section deletes and entry from the IRT * MOVE IRT-TABLE-SET-NOT-FULL TO IRT-TABLE-STATUS * ------------------------------------------------------------ * *
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, * * using T6-IRT-REBUILD-GET-MSG, records the error, and puts * * the message to the dead queue. * * * * ------------------------------------------------------------ * * MOVE'MATCH NOT FOUND IN IRT'TO M02-OPERATION. * the message to the dead queue. * MOVE W02-WAITING-QNAME TO M02-OBJECTNAME. PERFORM RECORD-CALL-ERROR. * PERFORM T6-IRT-REBUILD-GET-MSG. IF W03-COMPCODE MQCC-OK 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 * * ------------------------------------------------------------- * * *
--> --------------------
--> maximum size reached
--> --------------------
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.50Angebot
¤
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.