cdc:nos2.source:opl871:ctask
Table of Contents
CTASK
Table Of Contents
- [00010] RECOVER DATA BASE OR USER TASK.
- [00096] CTASK ROUTINES.
- [00127] RECOVER DATA BASE OR USER TASK.
- [00199] RIU - RECOVER INTERACTIVE USER.
- [00333] RBU - RECOVER *BTRAN* USER.
- [00416] RDB - RECOVER *CRM* DATA BASE.
- [00590] RTF - RECOVER TERMINAL FAILURE.
- [00698] CCE - COUNT *CRMSTAT* ENTRIES.
- [00723] CSN - COMPARE SEQUENCE NUMBERS.
- [00768] RBC - RECOVER BEGIN-COMMIT HISTORY.
- [00869] RBH - RECOVER BEGIN-COMMIT HISTORY FOR TERMINAL FAILURES.
- [00962] RDC - ROLL BACK DATA TO CONSISTENT STATE.
- [01042] RCS - ROLL BACK DATA TO CONSISTENT STATE FOR
- [01085] RID - RESTORE DATA BASE IDENTIFIERS.
Source Code
- CTASK.txt
- IDENT CTASK
- LCC OVERLAY(CTASK,0,0)
- SST BEGN,CMBL
- ENTRY CTASK
- SYSCOM B1
- CTASK TITLE CTASK - RECOVER DATA BASE OR USER TASK.
- *COMMENT CTASK - RECOVER DATA BASE OR USER TASK.
- COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
- CTASK SPACE 4,10
- *** CTASK - RECOVER DATA BASE OR USER TASK.
- *
- * E. D. REDIG. 80/06/11.
- CTASK SPACE 4,10
- *** *CTASK* HANDLES THE FOLLOWING RECOVERY CASES:
- *
- * 1. INTERACTIVE USERS.
- * 2. *BTRAN* (BATCH) USERS.
- * 3. *CRM* DATA BASES.
- * 4. TERMINAL FAILURES.
- *
- * FOR A MORE COMPLETE DESCRIPTION REFER TO THE
- * APPROPRIATE PROCESSOR WITHIN *CTASK*.
- CTASK SPACE 4,50
- *** DAYFILE MESSAGES ISSUED.
- *
- * ABNORMAL COMPLETION.
- *
- * * CTASK - DATA BASE OR FILE DOWN.*
- * THE DATA BASE, *TAF*/*CRM*, OR FILE IS DOWN ON
- * AN *RSTDBI* REQUEST.
- *
- * * CTASK - DATA BASE OR FILE IDLE.*
- * THE DATA BASE, *TAF/CRM*, OR FILE IS IDLE ON
- * AN *RSTDBI* REQUEST.
- *
- * * CTASK - FILE IS NOT INSTALLED.*
- * DATA BASE OR FILE NOT AVAILABLE IN *XXJ* FILE
- * ON A *CRMSTAT* REQUEST.
- *
- * * CTASK - INCORRECT RECOVERY CASE.*
- * RECOVER CASE NOT VALID.
- *
- * * CTASK - NO CRM RECOVERY FILES FOR DATA BASE.*
- * NO RECOVERY FILE ASSIGNED TO THE DATA BASE ON
- * AN *RSTDBI* REQUEST.
- *
- * * CTASK - SYSTEM IDENTIFIER UNKNOWN.*
- * OLD SYSTEM IDENTIFIER UNKNOWN WHEN ISSUING A
- * *TINVOKE* REQUEST.
- *
- * * CTASK - TABLE AREA NOT LARGE ENOUGH.*
- * THE TABLE AREA SUPPLIED BY *CTASK* FOR A *CRMSTAT*
- * REQUEST IS NOT LARGE ENOUGH.
- *
- * * CTASK - TASK LOGICAL ERROR.*
- * A LOGICAL ERROR OCCURRED THAT WAS NOT EXPECTED.
- *
- * * CTASK - TRANSACTION NOT RERUNNABLE.*
- * A TRANSACTION IS NOT RERUNNABLE AND A *RERUN*
- * WAS ATTEMPTED.
- *
- * * CTASK - TRMREC ERROR.*
- * ONE OF THE FOLLOWING OCCURRED.
- * 1. THERE WAS NO OUTSTANDING *DBEGIN* REQUEST.
- * 2. AN ERROR WAS ENCOUNTERED ON A DATA BASE OR
- * RECOVERY FILE.
- * 3. THE DATA BASE OR *TAF*/*CRM* IS DOWN.
- *
- * * CTASK - USER NOT DEFINED IN NETWORK FILE.*
- * THE *USER* IS NOT DEFINED IN THE *NETWORK* FILE
- * ON AN *SRERUN*, *TSTAT* OR *WSTAT* REQUEST.
- * COMMON DECKS.
- *CALL COMCMAC
- *CALL COMKTAF
- *CALL COMKFLD
- *CALL COMKIPR
- *CALL COMKMAC
- * SAVE ORIGIN COUNTER TO REMOVE COMMON DECK STORAGE IN
- * *COMKCBD*, *COMKCRM*, *COMKTDM*, *COMKTER*, AND *COMKTSC*.
- BEGN BSS 0
- *CALL COMKCBD
- LIST X
- *CALL COMKCRM
- *CALL COMKTDM
- *CALL COMKTER
- *CALL COMKTRF
- LIST -X
- *CALL COMKTSC
- ORG BEGN RESTORE ORIGIN COUNTER
- TITLE CTASK ROUTINES.
- CTASK SPACE 4,15
- *** COMMUNICATION BLOCK HEADER WORDS AND MESSAGES.
- *
- * INPUT TO *CTASK* APPEARS IN THE COMMUNICATION BLOCK.
- * THE INPUT IS AS FOLLOWS.
- *
- *T TMSW 60/ CASE
- *T, TMSW+1 60/ RECOVERY FLAG (RF)
- *T, TMSW+2 60/ OLDID
- *T, TMSW+3 60/ NEWID
- *T, TMSW+4 60/ USERNAME
- *T, TMSW+5 60/ *SRERUN* STATUS (RS)
- *
- * CASE = 1 RECOVER INTERACTIVE USER.
- * = 2 RECOVER *BTRAN* USER.
- * = 3 RECOVER *CRM* DATA BASE.
- * = 4 RECOVER TERMINAL FAILURE.
- * RF BIT 59 = 1, IF *CRM* AUTOMATIC RECOVERY USED.
- * BIT 0 = 1, IF *TAF* AUTOMATIC RECOVERY USED.
- * OLDID = PREVIOUS *CRM* IDENTIFIER.
- * NEWID = CURRENT *CRM* IDENTIFIER.
- * USERNAME = ONE-TO-SEVEN CHARACTER USERNAME LEFT-JUSTIFIED
- * WITH BLANK FILL.
- * RS = 0, IF *SRERUN* SUCCESSFUL.
- * = 1, IF *SRERUN* NOT SUCCESSFUL.
- * = -1, IF DATA BASE FILE DOWN.
- BSS CMBL RESERVE SPACE FOR COMMUNICATION BLOCK
- CTASK SPACE 4,20
- ** CTASK - RECOVER DATA BASE OR USER TASK.
- *
- * ENTRY (TMSW) = RECOVERY MESSAGE (DATA BASE OR USER).
- *
- * EXIT SPECIFIED RECOVERY CASE PROCESSED.
- *
- * ERROR TO *CTA1* IF INCORRECT CASE.
- *
- * USES X - 3, 6.
- * A - 3.
- * B - 1, 2.
- *
- * CALLS RBU, RDB, RIU, RTF.
- *
- * MACROS CEASE, SCALL.
- CTASK SB1 1
- SA3 TMSW GET RECOVER CASE
- LX3 -1
- SX6 X3-TCTAL
- SB2 X3
- PL X6,CTA1 IF INCORRECT RECOVERY CASE.
- JP B2+TCTA JUMP THRU TABLE
- TCTA PL X3,CTA1 UNUSED CASE
- EQ RIU RECOVER INTERACTIVE USER
- PL X3,RBU RECOVER *BTRAN* USER
- EQ RDB RECOVER *CRM* DATA BASE
- PL X3,RTF RECOVER TERMINAL FAILURE
- EQ CTA1 INCORRECT RECOVERY CASE
- TCTAL EQU *-TCTA LENGTH OF *CTASK* JUMP TABLE
- * THE PROCESSORS *RIU*, *RBU*, *RDB*, AND *RTF*
- * RETURN TO THE CODE BELOW TO TERMINATE PROCESSING.
- CTA1 SX3 CTAD INCORRECT RECOVERY CASE
- CTA2 SA3 X3
- AX3 18
- SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
- CTA3 CEASE EXIT TASK WITH CEASE
- CTA4 SA3 X3
- AX3 18
- SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
- CTA5 CEASE 2 ABNORMAL CEASE WITH MEMORY DUMP
- * DAYFILE MESSAGES.
- CTAAM DATA C* CTASK - DATA BASE OR FILE DOWN.*
- CTAA VFD 42/CTAAM,18/**10-CTAAM*10
- CTACM DATA C* CTASK - FILE IS NOT INSTALLED.*
- CTAC VFD 42/CTACM,18/**10-CTACM*10
- CTADM DATA C* CTASK - INCORRECT RECOVERY CASE.*
- CTAD VFD 42/CTADM,18/**10-CTADM*10
- CTAEM DATA C* CTASK - NO CRM RECOVERY FILES FOR DATA BASE.*
- CTAE VFD 42/CTAEM,18/**10-CTAEM*10
- CTAFM DATA C* CTASK - SYSTEM IDENTIFIER UNKNOWN.*
- CTAF VFD 42/CTAFM,18/**10-CTAFM*10
- CTAGM DATA C* CTASK - TABLE AREA NOT LARGE ENOUGH.*
- CTAG VFD 42/CTAGM,18/**10-CTAGM*10
- CTAHM DATA C* CTASK - TASK LOGICAL ERROR.*
- CTAH VFD 42/CTAHM,18/**10-CTAHM*10
- CTAIM DATA C* CTASK - TRANSACTION NOT RERUNNABLE.*
- CTAI VFD 42/CTAIM,18/**10-CTAIM*10
- CTAJM DATA C* CTASK - TRMREC ERROR.*
- CTAJ VFD 42/CTAJM,18/**10-CTAJM*10
- CTAKM DATA C* CTASK - USER NOT DEFINED IN NETWORK FILE.*
- CTAK VFD 42/CTAKM,18/**10-CTAKM*10
- CTALM DATA C* CTASK - DATA BASE OR FILE IDLE.*
- CTAL VFD 42/CTALM,18/**10-CTALM*10
- CTASK SPACE 4,35
- ** RIU - RECOVER INTERACTIVE USER.
- *
- * TO RECOVER AN INTERACTIVE USER A *TINVOKE* REQUEST IS
- * ISSUED USING ONLY THE *NEW-SYS-ID* PARAMETER. THIS
- * RETURNS A NEW SYSTEM IDENTIFIER (TRANSACTION SEQUENCE
- * NUMBER) TO BE USED FOR ALL TASKS IN THE RECOVERY UNIT.
- *
- * NEXT, AN *RSTDBI* REQUEST IS USED TO RESTORE THE
- * BEGIN IDENTIFIERS TO *CRM* FOR A RECOVERED TRANSACTION.
- *
- * THEN, AN *SRERUN* REQUEST IS ISSUED TO CAUSE THE INITIAL
- * TERMINAL INPUT FOR A RERUNNABLE TRANSACTION TO BE
- * RESUBMITTED TO THE TRANSACTION SYSTEM.
- *
- * FINALLY, A *RECOVERY, RERUNNING TRANSACTION.* MESSAGE IS
- * SENT TO THE ORIGINATING TERMINAL. WHEN *CTASK* CEASES,
- * *ITASK* IS CALLED AS IF THE INPUT CAME FROM THE TERMINAL.
- *
- * ENTRY RECOVER INTERACTIVE USER CASE SELECTED.
- * (TMSW+1) = RECOVERY FLAG.
- *
- * EXIT TO *CTA3* FOR CEASE.
- * (TMSW+5) = 0, IF *SRERUN* SUCCESSFUL.
- * = 1, IF *SRERUN* NOT SUCCESSFUL.
- * = -1, IF DATA BASE FILE DOWN.
- *
- * ERROR (X3) = FWA OF DAYFILE MESSAGE PARAMETERS.
- * (TMSW+5) = *SRERUN* STATUS.
- * TO *CTA2* IF ERROR AND NORMAL CEASE.
- * TO *CTA4* IF ERROR AND ABNORMAL CEASE.
- *
- * USES X - 2, 3, 4, 6.
- * A - 2, 3, 6.
- *
- * CALLS RID.
- *
- * MACROS SCALL, TRMREC.
- RIU SA2 TMSW+1 GET RECOVERY FLAG
- SX3 B0
- SX6 B1
- PL X2,RIU1 IF NO *CRM* RECOVERY
- * ISSUE *TINVOKE* USING *NEW-ID* TO GET NEW SEQUENCE NUMBER.
- SCALL TINVOKE,(RIUC,RIUD)
- SA2 RIUC GET STATUS OF REQUEST
- SX3 CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- SX6 B1+
- NZ X4,RIU2 IF ERRORS IN *TINVOKE*
- * RETURN BEGIN-COMMIT HISTORY TO *CRM* WITH *RSTDBI*.
- RJ RID RESTORE DATA BASE IDENTIFIERS
- SX3 CTAE RECOVERY FILE NOT ASSIGNED TO DATA BASE
- SX4 X2-TERAF
- SX6 B1+
- ZR X4,RIU2 IF NO RECOVERY FILE FOR DATA BASE
- SX3 CTAA DATA BASE OR FILE DOWN
- SX4 X2-TERAK
- SX6 -1
- ZR X4,RIU2 IF DATA BASE OR FILE DOWN
- SX3 CTAL DATA BASE OR FILE IDLE
- SX4 X2-TERAG
- ZR X4,RIU2 IF DATA BASE OR FILE IDLE
- SX3 CTAH TASK LOGICAL ERROR
- SX6 B1+
- NZ X2,RIU2 IF REQUEST NOT SUCCESSFUL
- SX4 B0+
- SX3 B0+
- RIU1 SA2 TMSW+1 GET RECOVERY FLAG
- SX2 X2+
- ZR X2,RIU2 IF NO *TAF* AUTOMATIC RECOVERY
- * ISSUE *SRERUN* REQUEST TO RERUN TRANSACTION.
- SCALL SRERUN,(RIUB)
- SA2 RIUB GET STATUS OF REQUEST
- SX3 CTAI TRANSACTION NOT RERUNNABLE
- SX4 X2-TSNO
- SX6 B1+
- ZR X4,RIU2 IF TRANSACTION NOT RERUNNABLE
- SX3 CTAK USER NOT DEFINED IN NETWORK FILE
- SX4 X2-TSUU
- ZR X4,RIU2 IF USER UNKNOWN
- SX3 CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- NZ X4,RIU2 IF ERRORS IN *SRERUN*
- SX6 B0+
- SA6 TMSW+5 STORE *RERUN* SUCCESSFUL
- EQ CTA3 CEASE
- RIU2 SA6 TMSW+5 STORE *SRERUN* NOT SUCCESSFUL
- SX6 X4
- SA6 A6+B1 STORE CEASE TYPE
- SX6 X3
- SA6 A6+B1 STORE DAYFILE MESSAGE
- SA2 TMSW+5
- NG X2,RIU3 IF FILE DOWN OR IDLE
- SA2 TMSW+1 GET RECOVERY FLAG
- PL X2,RIU3 IF NO *CRM* RECOVERY
- * ISSUE *TRMREC* REQUEST TO CLEAR *CRM* TABLES ON ERROR.
- TRMREC RIUE
- SA2 RIUG GET STATUS OF REQUEST
- SX3 CTAJ *TRMREC* ERROR
- NZ X2,CTA2 IF REQUEST NOT SUCCESSFUL
- RIU3 SA3 TMSW+7 GET DAYFILE MESSAGE
- ZR X3,CTA3 IF NO MESSAGE THEN CEASE
- SA2 TMSW+6 GET CEASE TYPE
- ZR X2,CTA2 IF ERROR WITH NORMAL CEASE
- EQ CTA4 ERROR WITH ABNORMAL CEASE
- * *SRERUN* REQUEST PARAMETER.
- RIUB CON 0 STATUS OF REQUEST
- * *TINVOKE* REQUEST PARAMETERS.
- RIUC CON 0 STATUS OF REQUEST
- RIUD CON 0 NEW SYSTEM IDENTIFIER
- * *TRMREC* REQUEST PARAMETERS.
- RIUE VFD 42/0,18/RIUF
- VFD 42/0,18/RIUG
- CON 0
- RIUF CON 0 ZERO WORD
- RIUG CON 0 STATUS OF REQUEST
- CTASK SPACE 4,30
- ** RBU - RECOVER *BTRAN* USER.
- *
- * TO RECOVER A *BTRAN* USER A *TINVOKE* REQUEST IS ISSUED
- * USING ONLY THE *NEW-SYS-ID* PARAMETER. THIS RETURNS A
- * NEW SYSTEM IDENTIFIER (TRANSACTION SEQUENCE NUMBER) TO
- * BE USED FOR ALL TASKS IN THE RECOVERY UNIT.
- *
- * THEN AN *RSTDBI* REQUEST IS USED TO RESTORE THE BEGIN
- * IDENTIFIERS TO *CRM* FOR A RECOVERED TRANSACTION.
- *
- * FINALLY, AN *SRERUN* REQUEST IS USED TO CAUSE THE INITIAL
- * INPUT FOR A RERUNNABLE TRANSACTION TO BE RESUBMITTED TO
- * THE TRANSACTION SYSTEM. THIS PROCESS CAUSES *ITASK* TO
- * BE CALLED JUST AS IF THE INPUT CAME FROM THE TERMINAL.
- *
- * ENTRY RECOVER *BTRAN* USER CASE SELECTED.
- * (TMSW+1) = RECOVERY FLAG.
- * (TMSW+4) = USERNAME.
- *
- * EXIT TO *CTA3* FOR CEASE.
- *
- * ERROR (X7) = FWA OF DAYFILE MESSAGE PARAMETERS.
- * TO *CTA2* IF ERROR AND NORMAL CEASE.
- * TO *CTA4* IF ERROR AND ABNORMAL CEASE.
- *
- * USES X - 2, 3, 4, 6.
- * A - 2, 6.
- *
- * CALLS RID.
- *
- * MACROS SCALL.
- RBU SA2 TMSW+1 GET RECOVERY FLAG
- PL X1,RBU1 IF NO *CRM* RECOVERY
- * ISSUE *TINVOKE* USING *NEW-ID* TO GET NEW SEQUENCE NUMBER.
- SCALL TINVOKE,(RBUC,RBUD)
- SA2 RBUC GET STATUS OF REQUEST
- SX3 CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- NZ X4,CTA4 IF ERRORS IN *TINVOKE*
- * RETURN BEGIN-COMMIT HISTORY TO *CRM* WITH *RSTDBI*.
- RJ RID RESTORE DATA BASE IDENTIFIERS
- SX3 CTAE RECOVERY FILE NOT ASSIGNED TO DATA BASE
- SX4 X2-TERAF
- ZR X4,CTA2 IF NO RECOVERY FILE FOR DATA BASE
- SX3 CTAA DATA BASE OR FILE DOWN
- SX4 X2-TERAK
- ZR X4,CTA2 IF DATA BASE OR FILE DOWN
- SX3 CTAL DATA BASE OR FILE IDLE
- SX4 X2-TERAG
- ZR X4,CTA2 IF DATA BASE OR FILE IDLE
- SX3 CTAH TASK LOGICAL ERROR
- NZ X2,CTA4 IF REQUEST NOT SUCCESSFUL
- RBU1 SA2 TMSW+1 GET RECOVERY FLAG
- SX2 X2+
- ZR X2,CTA3 IF NO *TAF* AUTOMATIC RECOVERY
- * ISSUE *SRERUN* REQUEST TO RERUN TRANSACTION USING USERNAME.
- SCALL SRERUN,(RBUA,TMSW+4)
- SA2 RBUA GET STATUS OF REQUEST
- SX3 CTAI TRANSACTON NOT RERUNNABLE
- SX4 X2-TSNO
- ZR X4,CTA2 IF TRANSACTION NOT RERUNNABLE
- SX3 CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- NZ X4,CTA4 IF ERRORS IN *RERUN*
- EQ CTA3 CEASE
- * *SRERUN* REQUEST PARAMETER.
- RBUA CON 0 STATUS OF REQUEST
- * *TINVOKE* REQUEST PARAMETERS.
- RBUC CON 0 STATUS OF REQUEST
- RBUD CON 0 NEW SYSTEM IDENTIFIER
- CTASK SPACE 4,50
- ** RDB - RECOVER *CRM* DATA BASE.
- *
- * TO RECOVER THE *CRM* DATA BASE A *TAF* *CRM* REQUEST
- * *CRMSTAT* IS USED TO RETURN THE BEGIN-COMMIT HISTORY.
- * THIS INFORMATION IS PRIMARILY THE TRANSACTION SEQUENCE
- * TABLE (TSEQ) IN ITS ENTIRITY AS IT EXITS AT THE TIME
- * THE REQUEST IS PROCESSED. THE TABLE IS DEFINED WITH
- * *FIELD* MACROS IN *COMKCRM*. THIS DECK ALSO DEFINES
- * THE LENGTH OF EACH ENTRY OF THIS TABLE (TSEQE SYMBOL).
- * THE NUMBER OF ENTRIES IN THIS TABLE IS *CMDM*, WHICH
- * IS AN INSTALLATION PARAMETER DEFINED IN *COMKIPR*.
- * THE FIRST WORD OF EACH ENTRY OF THIS TABLE IS ZERO IF
- * THE ENTRY DOES NOT CONTAIN A TRANSACTION ENTRY.
- *
- * WITH THE INFORMATION IN THE *CRMSTAT* TABLE, RECOVERY
- * PROCESSING IS INITIATED. SUBROUTINE *RBC* HANDLES THE
- * PROCESSING BY CHECKING THE TRANSACTION SEQUENCE NUMBER OF
- * EACH ENTRY IN THE *CRMSTAT* TABLE AGAINST THE *TAF* RECOVERY
- * FILE. WHEN A MATCH IS FOUND, THE BEGIN IDENTIFIERS FROM
- * THE *CRMSTAT* TABLE ARE USED AS INPUT PARAMETERS INTO
- * THE APPROPRIATE PARAMETERS IN *WSTAT*. THEN A *WSTAT*
- * REQUEST IS ISSUED TO RECORD THE BEGIN-COMMIT HISTORY ON
- * THE *TAF* RECOVERY FILE. SUBROUTINE *CSN* COMPARES THE
- * TRANSACTION SEQUENCE NUMBERS FROM THE *TAF* RECOVERY FILE
- * AND THE *CRMSTAT* TABLE.
- *
- * WHEN RECOVERY PROCESSING IS COMPLETE, ROLL BACK PRO-
- * CESSING IS INITIATED. SUBROUTINE *RDC* HANDLES THE ROLL
- * BACK PROCESSING BY USING THE TRANSACTION SEQUENCE NUMBER OF
- * EACH *CRMSTAT* ENTRY AS THE *OLD-SYS-ID* ON THE *TINVOKE*
- * REQUEST. THIS WOULD ESTABLISH THE TASK/JOB AS A CONTIN-
- * UATION OF A PREVIOUS ONE FOR THE PURPOSE OF ISSUING A TRMREC
- * REQUEST TO ROLL BACK THE DATA TO A CONSISTENT STATE.
- *
- * WITH THE SUCCESSFUL COMPLETION OF ROLL BACK PROCESSING,
- * *BTASK* IS CALLED TO RECOVER *BTRAN* TRANSACTIONS. UPON
- * THE COMPLETION OF *BTASK*, A *WSTAT* REQUEST IS ISSUED
- * TO START INPUT TO TAF AND DATA BASE RECOVERY IS COMPLETE.
- *
- * ENTRY RECOVER *CRM* DATA BASE CASE SELECTED.
- * (TMSW+1) = RECOVERY FLAG.
- *
- * EXIT TO *CTA3* FOR NORMAL CEASE.
- * TO *CTA5* FOR ABNORMAL CEASE.
- *
- * ERROR APPROPRIATE ERROR MESSAGE ISSUED TO DAYFILE.
- * TO *CTA4* IF NOT SYSTEM ORIGIN TRANSACTION.
- *
- * USES X - 2, 3, 4, 6, 7.
- * A - 2, 6.
- *
- * CALLS RBC, RDC.
- *
- * MACROS CALLRTN, CRMSTAT, SCALL.
- RDB SA2 TNAM
- SX3 -CTAH TASK LOGICAL ERROR
- LX2 59-CBSYS
- PL X2,CTA4 IF NOT SYSTEM ORIGIN TRANSACTION
- SX6 B0
- SA2 TMSW+1 GET RECOVERY FLAG
- SA6 RDBM INITIALIZE NORMAL CEASE
- PL X2,RDB4 IF NO *CRM* RECOVERY
- * ISSUE *CRMSTAT* REQUEST TO GET BEGIN-COMMIT HISTORY.
- CRMSTAT RDBD
- SA2 RDBF GET STATUS OF REQUEST
- SX3 CTAC FILE IS NOT INSTALLED
- SX4 X2-TERB
- ZR X4,RDB2 IF FILE IS NOT INSTALLED
- SX3 CTAG TABLE AREA NOT LARGE ENOUGH
- SX4 X2-TERAN
- ZR X4,RDB2 IF TABLE AREA NOT LARGE ENOUGH
- SX3 -CTAH TASK LOGICAL ERROR
- NZ X2,RDB2 IF REQUEST NOT SUCCESSFUL
- SA2 TMSW+1 GET RECOVERY FLAG
- SX2 X2
- ZR X2,RDB1 IF NO *TAF* AUTOMATIC RECOVERY
- SX6 B1
- SA6 RDBN RECOVERY PROCESSING NOT COMPLETE
- * RECOVER *TAF* *CRM* DATA BASE BEGIN-COMMIT HISTORY.
- RJ RBC RECOVER BEGIN-COMMIT HISTORY
- SA2 RDBN
- NZ X2,RDB2 IF RECOVERY PROCESSING NOT COMPLETE
- RDB1 SX6 B0+
- SA6 RDBL INITIALIZE *TRMREC* COUNTER
- * ROLL BACK THE DATA BASE TO A CONSISTENT STATE.
- RJ RDC ROLL BACK DATA BASE
- SX6 X3+
- SA6 TMSW+6 SAVE ERROR MESSAGE
- SA2 TRSQ GET TRANSACTION SEQUENCE NUMBER
- MX4 -CBTSN
- BX6 -X4*X2
- SA6 RDBK SET OLD SYSTEM IDENTIFIER
- * RESTORE *CTASK* SEQUENCE NUMBER BEFORE CEASING.
- SCALL TINVOKE,(RDBI,RDBJ,RDBK)
- SA2 RDBI
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,RDB2 IF ERRORS IN *TINVOKE*
- SA3 TMSW+6
- SA2 RDBL
- NZ X2,RDB2 IF *TRMREC* ERRORS
- EQ RDB4 START TERMINAL INPUT
- RDB2 SX6 CSTT TERMINATE *TAF*
- SA6 RDBC TRANSACTION STEP
- PL X3,RDB3 IF NORMAL CEASE
- SX7 B1
- BX3 -X3
- SA7 RDBM ABNORMAL CEASE
- RDB3 SA3 X3
- AX3 18
- SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
- EQ RDB5 ISSUE *WSTAT* REQUEST
- RDB4 SX6 CSST START TERMINAL/JOB INPUT
- SA6 RDBC TRANSACTION STEP
- * ISSUE A *CALLRTN* TO *BTASK* TO RECOVER *BTRAN* TRANSACTIONS
- * AND A *WSTAT* REQUEST TO TERMINATE TAF OR START INPUT.
- RDB5 CALLRTN RDBO
- SCALL WSTAT,(RDBA,RDBB,RDBC)
- SA2 RDBA
- SX3 CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,CTA4 IF ERRORS IN *WSTAT*
- SA2 RDBM
- ZR X2,CTA3 IF NORMAL CEASE
- EQ CTA5 ABNORMAL CEASE WITH MEMORY DUMP
- * *WSTAT* REQUEST PARAMETERS.
- RDBA CON 0 STATUS OF REQUEST
- RDBB DATA 4HSTEP KEYWORD *STEP*
- RDBC CON 0 TRANSACTION STEP
- * *CRMSTAT* REQUEST PARAMETERS.
- RDBD VFD 42/0,18/RDBE
- VFD 42/0,18/RDBF
- VFD 42/0,18/RDBG
- VFD 42/0,18/RDBH
- CON 0
- RDBE CON 0 *CRM* STATUS FUNCTION
- RDBF CON 0 STATUS OF REQUEST
- RDBG BSSZ RMDM*CMDM*TSEQE+TSEQE+1+2*AAMQFL+AIBFL+AOBFL+1
- RDBH CON *-RDBG LENGTH OF *CRMSTAT* TABLE
- * *TINVOKE* REQUEST PARAMETERS.
- RDBI CON 0 STATUS OF REQUEST
- RDBJ CON 0 NEW SYSTEM IDENTIFIER
- RDBK CON 0 OLD SYSTEM IDENTIFIER
- RDBL CON 0 *TRMREC* ERROR COUNTER
- RDBM CON 0 NORMAL CEASE FLAG
- RDBN CON 0 RECOVERY PROCESSING COMPLETE FLAG
- * *CALLRTN* TASK LIST.
- RDBO CON 5LBTASK
- CON 0
- RTF SPACE 4,40
- ** RTF - RECOVER TERMINAL FAILURE.
- *
- * TO RECOVER TERMINAL FAILURES, SUBROUTINE *RBH* HANDLES THE
- * PROCESSING BY CHECKING THE TRANSACTION SEQUENCE NUMBER
- * FROM THE *TAF* RECOVERY FILE AGAINST THE ENTRIES IN
- * THE *CRMSTAT* TABLE. IF A MATCH IS FOUND, THE BEGIN
- * IDENTIFIERS FROM THE *CRMSTAT* TABLE ARE USED AS INPUT
- * PARAMETERS IN *WSTAT*. THEN A *WSTAT* REQUEST IS
- * ISSUED TO RECORD THE BEGIN-COMMIT HISTORY ON THE *TAF*
- * RECOVERY FILE. SUBROUTINE *CSN* COMPARES THE TRANSACTION
- * SEQUENCE NUMBERS FROM THE *TRF* AND THE *CRMSTAT* TABLE.
- *
- * WHEN RECOVERY PROCESSING IS COMPLETE, ROLL BACK PRO-
- * CESSING IS STARTED. SUBROUTINE *RCS* HANDLES THE ROLL
- * BACK PROCESSING BY USING THE TRANSACTION SEQUENCE NUMBER
- * FROM THE *TRF* AS THE *OLD-SYS-ID* ON THE *TINVOKE*
- * REQUEST. THIS ESTABLISHES THE TASK/JOB AS A CONTINUATION
- * OF A PREVIOUS ONE FOR THE PURPOSE OF ISSUING A *TRMREC*
- * REQUEST TO ROLL BACK THE DATA TO A CONSISTENT STATE.
- *
- * WITH THE COMPLETION OF ROLL BACK PROCESSING, A *WSTAT*
- * REQUEST IS ISSUED TO START TERMINAL INPUT TO *TAF* AND
- * TERMINAL FAILURE RECOVERY IS COMPLETE.
- *
- * ENTRY (TMSW+1) = RECOVERY FLAG.
- *
- * EXIT TO *CTA3* FOR NORMAL CEASE.
- * TO *CTA5* FOR ABNORMAL CEASE.
- *
- * ERROR APPROPRIATE ERROR MESSAGE ISSUED TO DAYFILE.
- * TO *CTA4* IF NOT SYSTEM ORIGIN TRANSACTION.
- *
- * USES X - 2, 3, 4, 6, 7.
- * A - 2, 6, 7.
- *
- * CALLS RBH, RCS.
- *
- * MACROS SCALL.
- RTF SA2 TNAM
- SX3 -CTAH TASK LOGICAL ERROR
- LX2 59-CBSYS
- PL X2,CTA4 IF NOT SYSTEM ORIGIN TRANSACTION
- SX7 B0
- SA2 TMSW+1 GET RECOVERY FLAG
- SA7 RDBM INITIALIZE NORMAL CEASE
- PL X2,RTF3 IF NO *CRM* RECOVERY
- SX7 B1+
- SA7 RDBN RECOVERY PROCESSING NOT COMPLETE
- * RECOVER *TAF/CRM* DATA BASE BEGIN-COMMIT HISTORY.
- RJ RBH RECOVER BEGIN-COMMIT HISTORY
- SA2 RDBN
- NZ X2,RTF1 IF RECOVERY PROCESSING NOT COMPLETE
- SA2 RBHA
- NZ X2,RTF3 IF ROLL BACK PROCESSING NOT NECESSARY
- SX7 B0+
- SA7 RDBL INITIALIZE *TRMREC* COUNTER
- * ROLL BACK THE DATA BASE TO A CONSISTENT STATE.
- RJ RCS ROLL BACK TO CONSISTENT STATE
- SX6 X3+
- SA6 TMSW+6 SAVE ERROR MESSAGE
- SA2 TRSQ GET TRANSACTION SEQUENCE NUMBER
- MX4 -CBTSN
- BX6 -X4*X2
- SA6 RDBK SET OLD SYSTEM IDENTIFIER
- * RESTORE *CTASK* SEQUENCE NUMBER BEFORE CEASING.
- SCALL TINVOKE,(RDBI,RDBJ,RDBK)
- SA2 RDBI GET STATUS OF REQUEST
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,RTF1 IF ERRORS IN *TINVOKE*
- SA3 TMSW+6
- SA2 RDBL
- NZ X2,RTF1 IF *TRMREC* ERRORS
- EQ RTF3 START TERMINAL INPUT
- RTF1 SX6 CSTT TERMINATE *TAF*
- SA6 RDBC TRANSACTION STEP
- PL X3,RTF2 IF NORMAL CEASE
- SX7 B1
- BX3 -X3
- SA7 RDBM ABNORMAL CEASE WITH DUMP
- RTF2 SA3 X3
- AX3 18
- SCALL TMSG,(X3,A3) SEND DAYFILE MESSAGE
- EQ RTF4 ISSUE *WSTAT* REQUEST
- RTF3 SX6 CSST START TERMINAL/JOB INPUT
- SA6 RDBC TRANSACTION STEP
- * ISSUE *WSTAT* REQUEST TO TERMINATE *TAF* OR START INPUT.
- RTF4 SCALL WSTAT,(RDBA,RDBB,RDBC)
- SA2 RDBA GET STATUS OF REQUEST
- SX3 CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,CTA4 IF ERRORS IN *WSTAT*
- SA2 RDBM
- ZR X2,CTA3 IF NORMAL CEASE
- EQ CTA5 ABNORMAL CEASE WITH MEMORY DUMP
- CTASK SPACE 4,10
- ** CCE - COUNT *CRMSTAT* ENTRIES.
- *
- * ENTRY (B2) = NUMBER OF ENTRIES IN *CRMSTAT* TABLE.
- * RDBG = FWA OF *CRMSTAT* TABLE.
- *
- * EXIT (B3) = NUMBER OF VALID ENTRIES IN *CRMSTAT* TABLE.
- *
- * USES X - 2, 3.
- * A - 2, 3.
- * B - 2, 3.
- CCE SUBR ENTRY/EXIT
- SB3 B0+ VALID ENTRY COUNT
- SA2 RDBG+TSSQW-TSEQE INITIALIZE FWA OF *CRMSTAT* TABLE
- CCE1 SB2 B2-1 DECREMENT ENTRY COUNT
- ZR B2,CCEX IF END OF *CRMSTAT* TABLE
- SA2 A2+TSEQE GET NEXT ENTRY FROM *CRMSTAT* TABLE
- ZR X2,CCE1 IF NULL ENTRY
- SA3 A2+TSRCW
- LX3 59-TSRCS TASK RECOVERED FROM *BRF* BIT
- PL X3,CCE1 IF TASK NOT RECOVERED FROM *BRF*
- SB3 B3+1 INCREMENT VALID ENTRY COUNT
- EQ CCE1 LOOP FOR NEXT ENTRY IN *CRMSTAT* TABLE
- CTASK SPACE 4,15
- ** CSN - COMPARE SEQUENCE NUMBERS.
- *
- * ENTRY (RBCF) = *TSTAT* SEQUENCE NUMBER.
- * (RBCD) = *TSTAT* USER NAME.
- * RDBG = FWA OF *CRMSTAT* TABLE.
- *
- * EXIT (X0) = 0, IF MATCH FOUND.
- * 1, IF NO MATCH.
- * (A3) = FWA OF *CRMSTAT* ENTRY IF MATCH FOUND.
- *
- * USES X - 0, 1, 2, 3, 4, 5, 6.
- * A - 1, 2, 3, 6.
- * B - 3, 4.
- CSN SUBR ENTRY/EXIT
- SA2 TMSW TERMINAL FAILURE CASE
- SB4 X2-TYTF
- SB3 RMDM*CMDM+2 INITIALIZE ENTRY COUNTER
- SA2 RBCF GET *SEQ* NUMBER FROM *TSTAT*
- SX0 B1+ NO MATCH
- SA3 RDBG+TSSQW-TSEQE INITIALIZE FWA OF *CRMSTAT* TABLE
- CSN1 SB3 B3-1 DECREMENT ENTRY COUNT
- ZR B3,CSNX IF END OF *CRMSTAT* TABLE, RETURN
- SA3 A3+TSEQE GET NEXT ENTRY FROM *CRMSTAT* TABLE
- ZR X3,CSN1 IF NULL ENTRY
- ZR B4,CSN2 IF TERMINAL FAILURE CASE
- SA1 A3+TSRCW
- LX1 59-TSRCS TASK RECOVERED FROM *BRF* BIT
- PL X1,CSN1 IF TASK NOT RECOVERED FROM *BRF*
- CSN2 MX4 TSSQN
- BX5 X4*X3 MASK OFF *CRM* SEQUENCE NUMBER
- LX5 TSSQN-1-TSSQS RIGHT JUSTIFY *CRM* SEQUENCE NUMBER
- IX3 X5-X2
- NZ X3,CSN1 IF NO MATCH
- SA1 A3+TSUNW GET USER FROM *CRMSTAT* TABLE
- SA2 RBCD GET USER FROM *TSTAT*
- MX4 TSUNN
- BX1 X4*X1
- BX2 X4*X2
- BX4 X1-X2
- NZ X4,CSN1 IF USER NAMES DO NOT MATCH
- SX0 B0+ MATCH FOUND
- EQ CSNX RETURN
- CTASK SPACE 4,20
- ** RBC - RECOVER BEGIN-COMMIT HISTORY.
- *
- * ENTRY *CRMSTAT* TABLE LOADED.
- * (RDBN) = 1, FOR RECOVERY PROCESSING NOT COMPLETE.
- *
- * EXIT (RDBN) = 0, IF RECOVERY PROCESSING COMPLETE.
- * = 1, IF NOT COMPLETE.
- *
- * ERROR (X3) = ADDRESS OF ERROR MESSAGE WHEN NOT COMPLETE.
- *
- * USES X - 2, 3, 4, 6, 7.
- * A - 2, 3, 6, 7.
- * B - 2.
- *
- * CALLS CCE, CSN.
- *
- * MACROS SCALL.
- RBC SUBR ENTRY/EXIT
- SB2 RMDM*CMDM+2
- SA3 RBCS GET BLANK WORD
- BX6 X3
- RJ CCE COUNT *CRMSTAT* ENTRIES
- SX7 B3+B1 VALID ENTRY COUNT
- SA6 RBCD INITIALIZE *NEXT* FOR *TSTAT*
- SA7 RBCT
- RBC1 SA1 RBCT
- SX6 X1-1 DECREMENT ENTRY COUNT
- ZR X6,RBC4 IF END OF *CRMSTAT* TABLE
- SA6 A1+
- * ISSUE *TSTAT* REQUEST TO RETURN OPERATIONAL ENVIRONMENT.
- RBC2 SCALL TSTAT,(RBCA,RBCC,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
- ,K,RBCL,RBCM,RBCN) ISSUE *TSTAT* REQUEST
- SA2 RBCA GET STATUS OF REQUEST
- SX4 X2-TSRU RECOVERY UNAVAILABLE STATUS
- ZR X4,RBC4 IF RECOVERY UNAVAILABLE
- SX4 X2-TSEN
- ZR X4,RBC4 IF END OF *NEXT* PROCESSING
- SX3 CTAK USER NOT DEFINED IN NETWORK FILE
- SX4 X2-TSUU USER UNKNOWN STATUS
- ZR X4,RBCX IF USER UNKNOWN, RETURN
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- NZ X4,RBCX IF ERRORS IN *TSTAT*, RETURN
- RJ CSN COMPARE SEQUENCE NUMBERS
- NZ X0,RBC2 IF NO MATCH FOUND
- SX6 CSBC
- SA6 RBCH SET TRANSACTION STEP
- SA3 A3+TSBCW GET BEGIN IDENTIFIERS FROM *CRMSTAT* TABLE
- ERRNZ TSBPW-TSBCW ID-S NOT IN SAME WORD
- MX4 -TSBCN
- ERRNZ TSBPN-TSBCN ID-LENGTH NOT EQUAL
- BX6 -X4*X3 MASK OFF CURRENT BEGIN IDENTIFIER
- LX3 TSBPN-1-TSBPS RIGHT JUSTIFY PREVIOUS BEGIN IDENTIFIER
- BX7 -X4*X3 MASK OFF PREVIOUS BEGIN IDENTIFIER
- SA6 RBCR CURRENT *CRM* IDENTIFIER
- SA7 RBCP PREVIOUS *CRM* IDENTIFIER
- * ISSUE *WSTAT* REQUEST TO RECORD BEGIN-COMMIT HISTORY.
- SCALL WSTAT,(RBCA,RBCB,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
- ,K,RBCL,RBCM,RBCN,RBCO,RBCP,RBCQ,RBCR) ISSUE *WSTAT* REQUEST
- SA2 RBCA GET STATUS OF REQUEST
- SX3 CTAK USER NOT DEFINED IN NETWORK FILE
- SX4 X2-TSUU USER UNKNOWN STATUS
- ZR X4,RBCX IF USER UNKNOWN, RETURN
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- NZ X4,RBCX IF ERRORS IN *WSTAT*, RETURN
- EQ RBC1 LOOP FOR NEXT ENTRY IN *CRMSTAT* TABLE
- RBC4 SX7 B0+ RECOVER PROCESSING COMPLETE
- SA7 RDBN
- EQ RBCX RETURN
- * *TSTAT* AND *WSTAT* REQUEST PARAMETERS.
- RBCA CON 0 STATUS OF REQUEST
- RBCB DATA 4HUSER KEYWORD *USER*
- RBCC DATA 4HNEXT KEYWORD *NEXT*
- RBCD CON 0 NEXT USER FROM *TAF* RECOVERY FILE
- RBCE DATA 3HSEQ KEYWORD *SEQ*
- RBCF CON 0 TRANSACTION SEQUENCE NUMBER
- RBCG DATA 4HSTEP KEYWORD *STEP*
- RBCH CON 0 TRANSACTION STEP
- RBCI DATA 4HTRAN KEYWORD *TRAN*
- RBCJ CON 0 TRANSACTION TYPE
- RBCK DATA 3HCRM KEYWORD *CRM*
- RBCL CON 0 *CRM* TRANSACTION USAGE
- RBCM DATA 4HCDCS KEYWORD *CDCS*
- RBCN CON 0 *CDCS* TRANSACTION USAGE
- RBCO DATA 5HOLDID KEYWORD *OLDID*
- RBCP CON 0 PREVIOUS *CRM* IDENTIFIER
- RBCQ DATA 5HNEWID KEYWORD *NEWID*
- RBCR CON 0 CURRENT *CRM* IDENTIFIER
- RBCS DATA 1H BLANK WORD
- RBCT CON 0 ENTRY COUNT
- RBH SPACE 4,20
- ** RBH - RECOVER BEGIN-COMMIT HISTORY FOR TERMINAL FAILURES.
- *
- * ENTRY (RDBN) = 1 FOR RECOVERY PROCESSING NOT COMPLETE.
- *
- * EXIT (RDBN) = 0, IF RECOVERY PROCESSING COMPLETE.
- * = 1, IF NOT COMPLETE.
- * (RBHA) = 0, IF ROLL BACK PROCESSING NECESSARY.
- * = 1, IF NOT NECESSARY.
- *
- * ERROR (X3) = FWA OF ERROR MESSAGE PARAMETERS WHEN NOT
- * COMPLETE.
- *
- * USES X - 2, 3, 4, 6, 7.
- * A - 2, 3, 6, 7.
- *
- * CALLS CSN.
- *
- * MACROS CRMSTAT, SCALL.
- RBH SUBR ENTRY/EXIT
- SA2 TNAM GET TERMINAL NAME
- MX3 TSUNN
- BX6 X3*X2
- SA6 RBCD
- * ISSUE *TSTAT* REQUEST TO RETURN OPERATIONAL ENVIRONMENT.
- SCALL TSTAT,(RBCA,RBCB,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
- ,K,RBCL,RBCM,RBCN)
- SA2 RBCA GET STATUS OF REQUEST
- SX3 CTAK USER NOT DEFINED IN NETWORK FILE
- SX4 X2-TSUU
- ZR X4,RBHX IF USER UNKNOWN
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,RBHX IF ERRORS IN *TSTAT*
- SA2 RBCL GET *CRM* USAGE
- SX6 B1+
- ZR X2,RBH2 IF *CRM* MAY NOT BE USED
- * ISSUE *CRMSTAT* REQUEST TO GET BEGIN-COMMIT HISTORY.
- CRMSTAT RDBD
- SA2 RDBF GET STATUS OF REQUEST
- SX3 CTAC FILE IS NOT INSTALLED
- SX4 X2-TERB
- ZR X4,RBHX IF FILE IS NOT INSTALLED
- SX3 CTAG TABLE AREA NOT LARGE ENOUGH
- SX4 X2-TERAN
- ZR X4,RBHX IF TABLE AREA NOT LARGE ENOUGH
- SX3 -CTAH TASK LOGICAL ERROR
- NZ X2,RBHX IF REQUEST NOT SUCCESSFUL
- RJ CSN COMPARE SEQUENCE NUMBERS
- SX6 B1+
- NZ X0,RBH2 IF NO MATCH FOUND
- SA2 RBCH GET TRANSACTION STEP
- SX4 X2-CSTI
- ZR X4,RBH1 IF RECOVERABLE TRANSACTION/JOB INPUT
- SX4 X2-CSBC
- ZR X4,RBH1 IF BEGIN-COMMIT *CRM* ID-S LOGGED
- SX4 X2-CSND
- SX6 B0+
- NZ X4,RBH2 IF *NAM* NOT DOWN
- RBH1 SX6 CSBC
- SA6 RBCH SET ID-S LOGGED STEP
- SA3 A3+TSBCW GET ID-S FROM *CRMSTAT* TABLE
- MX4 -TSBCN
- BX6 -X4*X3
- LX3 TSBPN-1-TSBPS
- BX7 -X4*X3
- SA6 RBCR CURRENT *CRM* ID
- SA7 RBCP PREVIOUS *CRM* ID
- * ISSUE *WSTAT* REQUEST TO RECORD BEGIN-COMMIT HISTORY.
- SCALL WSTAT,(RBCA,RBCB,RBCD,RBCE,RBCF,RBCG,RBCH,RBCI,RBCJ,RBC
- ,K,RBCL,RBCM,RBCN,RBCO,RBCP,RBCQ,RBCR)
- SA2 RBCA GET STATUS OF REQUEST
- SX3 CTAK USER NOT DEFINED IN NETWORK FILE
- SX4 X2-TSUU
- ZR X4,RBHX IF USER UNKNOWN
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,RBHX IF ERRORS IN *WSTAT*
- SX6 B0+
- RBH2 SX7 B0+
- SA6 RBHA ROLL BACK PROCESSING FLAG
- SA7 RDBN RECOVERY PROCESSING COMPLETE
- EQ RBHX RETURN
- RBHA CON 0 ROLL BACK PROCESSING FLAG
- CTASK SPACE 4,15
- ** RDC - ROLL BACK DATA TO CONSISTENT STATE.
- *
- * ENTRY RDBG = FWA OF *CRMSTAT* TABLE.
- *
- * EXIT (RDBL) = 0, IF ROLL BACK PROCESSING COMPLETE.
- * = NON-ZERO, IF NOT COMPLETE.
- *
- * ERROR (X3) = FWA OF ERROR MESSAGE PARAMETERS WHEN NOT
- * COMPLETE.
- *
- * USES X - 2, 3, 4, 5, 6, 7.
- * A - 2, 3, 6, 7.
- *
- * MACROS SCALL, TRMREC.
- RDC SUBR ENTRY/EXIT
- SX6 RMDM*CMDM+2
- SX7 RDBG+TSSQW-TSEQE
- SA6 RDCG
- SA7 RDCH
- RDC1 SA2 RDCG
- SX6 X2-1
- ZR X6,RDC2 IF END OF *CRMSTAT* TABLE
- SA6 A2
- SA2 A2+B1
- SA3 X2+TSEQE GET NEXT ENTRY FROM *CRMSTAT* TABLE
- SX7 A3
- SA7 A2
- ZR X3,RDC1 IF NULL ENTRY
- MX5 TSSQN
- BX6 X5*X3 MASK OFF *CRM* SEQUENCE NUMBER
- LX6 TSSQN-1-TSSQS RIGHT JUSTIFY *CRM* SEQUENCE NUMBER
- SA6 RDCC OLD SYSTEM IDENTIFIER
- * ISSUE *TINVOKE* REQUEST TO GET NEW SYSTEM IDENTIFIER.
- SCALL TINVOKE,(RDCA,RDCB,RDCC) ISSUE *TINVOKE* REQUEST
- SA2 RDCA GET STATUS OF REQUEST
- SX3 CTAF SYSTEM IDENTIFIER UNKNOWN STATUS
- SX4 X2-TSSU
- ZR X4,RDC3 IF SYSTEM ID UNKNOWN
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE NO ERRORS STATUS
- NZ X4,RDC3 IF ERRORS IN *TINVOKE*
- * ISSUE *TRMREC* REQUEST TO ROLL BACK DATA TO CONSISTENT STATE.
- TRMREC RDCD
- SA2 RDCF GET STATUS OF REQUEST
- ZR X2,RDC1 IF REQUEST SUCCESSFUL
- SA1 RDBL *TRMREC* ERROR COUNTER
- SX7 X1+1
- SA7 A1+ INCREMENT ERROR COUNTER
- EQ RDC1 LOOP FOR NEXT ENTRY IN *CRMSTAT* TABLE
- RDC2 SX3 CTAJ *TRMREC* ERROR
- EQ RDCX RETURN
- RDC3 SX6 CMDM+1
- SA6 RDBL *TINVOKE* ERROR
- EQ RDCX RETURN
- * *TINVOKE* REQUEST PARAMETERS.
- RDCA CON 0 STATUS OF REQUEST
- RDCB CON 0 NEW SYSTEM IDENTIFIER
- RDCC CON 0 OLD SYSTEM IDENTIFIER
- * *TRMREC* REQUEST PARAMETERS.
- RDCD VFD 42/0,18/RDCE
- VFD 42/0,18/RDCF
- CON 0
- RDCE CON 0 ZERO WORD
- RDCF CON 0 STATUS OF REQUEST
- RDCG CON 0 NUMBER OF *CRMSTAT* ENTRIES
- RDCH CON 0 FWA OF *CRMSTAT* TABLE
- RCS SPACE 4,15
- ** RCS - ROLL BACK DATA TO CONSISTENT STATE FOR
- * TERMINAL FAILURES.
- *
- * ENTRY (RBCF) = SEQUENCE NUMBER.
- *
- * EXIT (RDBL) = 0, IF ROLL BACK PROCESSING COMPLETE.
- * = NON-ZERO, IF NOT COMPLETE.
- *
- * ERROR (X3) = FWA OF ERROR MESSAGE PARAMETERS WHEN NOT
- * COMPLETE.
- *
- * USES X - 2, 3, 4, 7.
- * A - 2, 7.
- *
- * MACROS SCALL, TRMREC.
- RCS SUBR ENTRY/EXIT
- * ISSUE *TINVOKE* REQUEST TO GET NEW SYSTEM ID.
- SCALL TINVOKE,(RDCA,RDCB,RBCF)
- SA2 RDCA GET STATUS OF REQUEST
- SX3 CTAF SYSTEM ID UNKNOWN
- SX4 X2-TSUU
- ZR X4,RCS3 IF SYSTEM ID UNKNOWN
- SX3 -CTAH TASK LOGICAL ERROR
- SX4 X2-TSNE
- NZ X4,RCS3 IF ERRORS IN *TINVOKE*
- * ISSUE *TRMREC* REQUEST TO ROLL BACK DATA TO CONSISTENT STATE.
- TRMREC RDCD
- SA2 RDCF GET STATUS OF REQUEST
- ZR X2,RCSX IF REQUEST SUCCESSFUL
- SX3 CTAJ *TRMREC* ERROR
- SX7 B1+
- RCS2 SA7 RDBL *TRMREC* ERROR COUNTER
- EQ RCSX RETURN
- RCS3 SX7 CMDM+1 *TINVOKE* ERROR
- EQ RCS2 SET *TRMREC* COUNT
- CTASK SPACE 4,15
- ** RID - RESTORE DATA BASE IDENTIFIERS.
- *
- * ENTRY (TMSW+2) = *OLDID* FROM COMMUNICATION BLOCK.
- * (TMSW+3) = *NEWID* FROM COMMUNICATION BLOCK.
- *
- * EXIT (X2) = STATUS OF *RSTDBI* REQUEST.
- *
- * USES X - 2, 3, 6, 7.
- * A - 2, 3, 6, 7.
- *
- * MACROS RSTDBI.
- RID SUBR ENTRY/EXIT
- SA2 TMSW+2 GET *OLDID*
- SA3 TMSW+3 GET *NEWID*
- BX6 X2
- BX7 X3
- SA6 RIDD PREVIOUS BEGIN IDENTIFIER
- SA7 RIDB CURRENT BEGIN IDENTIFIER
- RSTDBI RIDA RESTORE BEGIN IDENTIFIERS
- SA2 RIDC GET STATUS OF REQUEST
- EQ RIDX RETURN
- * *RSTDBI* REQUEST PARAMETERS.
- RIDA VFD 42/0,18/RIDB
- VFD 42/0,18/RIDC
- VFD 42/0,18/RIDD
- CON 0
- RIDB CON 0 CURRENT BEGIN IDENTIFIER
- RIDC CON 0 STATUS OF REQUEST
- RIDD CON 0 PREVIOUS BEGIN IDENTIFIER
- END CTASK
cdc/nos2.source/opl871/ctask.txt ยท Last modified: 2023/08/05 17:24 by Site Administrator