IDENT RTASK
SST BEGN,CMBL
LCC OVERLAY(RTASK,0,0)
ENTRY RTASK
SYSCOM B1
RTASK TITLE RTASK - RECOVER TERMINAL TASK.
*COMMENT RTASK - RECOVER TERMINAL TASK.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
RTASK SPACE 4,10
*** RTASK - RECOVER TERMINAL TASK.
*
* E. D. REDIG. 80/05/07.
RTASK SPACE 4,40
*** THE TASK *RTASK* IS A CONTROL DATA SYSTEMS SUPPLIED
* RECOVERY TASK THAT SHOULD HANDLE MOST TRANSACTION
* APPLICATION NEEDS. HOWEVER, SOME CUSTOMERS MAY WISH
* TO MODIFY *RTASK* TO MEET THEIR SPECIAL REQUIREMENTS.
*
* TERMINAL DISCONNECTS, *NAM* ABORTS, *TAF* ABORTS, AND
* SYSTEM CRASHES WILL MEAN THAT THE TERMINAL MUST GO
* THROUGH THE LOGIN PROCEDURES WITH *TAF*. UPON TERMINAL
* LOGIN *RTASK* WOULD BE CALLED. *RTASK* THEN DOES THE
* FOLLOWING.
*
* 1. IF A RECOVERABLE TRANSACTION IS NO LONGER RERUNNABLE,
* *RTASK* TELLS THE TERMINAL OPERATOR THAT RECOVERY HAS
* OCCURRED, THAT THE RECOVERABLE TRANSACTION WILL NOT
* BE RERUN AUTOMATICALLY, TO ENTER THE NEXT INPUT, AND
* CEASES. THIS SITUATION OCCURS WHEN AN INPUT/OUTPUT
* ERROR OCCURRED ON THE *TAF* RECOVERY FILE.
*
* 2. IF THE TRANSACTION UNIT IS NOT RECOVERABLE, *RTASK*
* SENDS *READY* TO INDICATE THE TERMINAL OPERATOR
* SHOULD ENTER THE NEXT COMMAND, AND CEASES.
*
* 3. IF THE TRANSACTION COMMIT UNIT IS SECURE AND THE DATA
* BASE COMMIT UNIT IS COMMITTED, *RTASK* SENDS THE TERM-
* INAL CONFIRMATION MESSAGE, AND CEASES. THE TERMINAL
* CONFIRMATION MESSAGE IS STORED ON THE *TAF* RECOVERY
* FILE AS A RESULT OF THE SECURE REQUEST.
*
* 4. *RTASK* CALLS *CTASK*. *CTASK* REQUESTS A NEW TRANS-
* ACTION SEQUENCE NUMBER AND RETURNS THE BEGIN-COMMIT
* HISTORY TO *TAF CRM*. *CTASK* THEN MAKES A RERUN
* REQUEST. THE RERUN REQUEST TURNS OFF THE RECOVERY
* STATUS AND RETRIEVES TERMINAL INPUT FROM THE *TAF*
* RECOVERY FILE. THE TRANSACTION WILL BE RUN USING THE
* NEW SEQUENCE NUMBER. *ITASK* WILL LATER PROCESS THE
* INPUT AS IF THE INPUT HAD COME FROM THE TERMINAL.
*** COMMON DECKS.
*CALL COMCMAC
*CALL COMKTAF
*CALL COMKFLD
*CALL COMKIPR
*CALL COMKMAC
BEGN BSS 0 SAVE ORIGIN COUNTER
*CALL COMKCBD
LIST X
*CALL COMKTRF
LIST -X
*CALL COMKTSC
ORG BEGN RESTORE ORIGIN COUNTER
RTASK SPACE 4,15
*** COMMUNICATION BLOCK HEADER WORDS AND MESSAGES.
*
*T TMSW 60/ CASE
*T, TMSW+1 60/ RECOVERY FLAG (RF)
*T, TMSW+2 60/ OLDID
*T, TMSW+3 60/ NEWID
*T, TMSW+5 60/ *RERUN* STATUS (RS)
*
* CASE = 1, RECOVER INTERACTIVE USER.
* 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.
* RS = 0, IF *SRERUN* SUCCESSFUL.
* = 1, IF *SRERUN* NOT SUCCESSFUL.
* = -1, IF DATA BASE FILE DOWN.
BSS CMBL RESERVE SPACE FOR COMMUNICATION BLOCK
RTASK SPACE 4,20
** RTASK - RECOVER TERMINAL TASK.
*
* ENTRY (TMSW+1) = RECOVERY FLAG.
*
* EXIT TERMINAL RECOVERY MESSAGE.
* (TMSW) = RECOVER INTERACTIVE USER CASE.
* (TMSW+1) = RECOVERY FLAG.
* (TMSW+2) = OLDID.
* (TMSW+3) = NEWID.
*
* ERROR TO *RTA3* IF ERROR AND NORMAL CEASE.
* TO *RTA5* IF ERROR AND ABNORMAL CEASE.
*
* USES X - 1, 2, 3, 4, 5, 6, 7.
* A - 1, 2, 3, 5, 6, 7.
* B - 1.
*
* MACROS BLDABH, CALLTRN, CEASE, FMSG, MOVE, SCALL, WAIT,
* WAITINP.
RTASK SB1 1
* ISSUE *TSTAT* REQUEST TO OBTAIN STATUS OF TRANSACTION.
SCALL TSTAT,(RTAA,RTAB,RTAC,RTAD,RTAE,RTAF,RTAG,RTAH,RTAI,RTA
,J,RTAK,RTAL,RTAM) ISSUE *TSTAT* REQUEST
SA2 RTAA GET STATUS OF REQUEST
SX5 RTAAC
SX4 X2-TSRU RECOVERY UNAVAILABLE
ZR X4,RTA2 IF RECOVERY UNAVAILABLE
SX5 RTAAA
SX4 X2-TSNE NO ERRORS STATUS
NZ X4,RTA5 IF ERRORS IN *TSTAT*
SA2 RTAC GET TRANSACTION STEP
SX5 RTAAC
SA3 RTAE GET TRANSACTION TYPE
SX4 X3-TYIT TERMINAL USER TYPE
NZ X4,RTA14 IF NOT TERMINAL USER
ZR X2,RTA2 IF TERMINAL TRANSACTION NON-RECOVERABLE
SX4 X2-CSTA
ZR X4,RTA2 IF TRANSACTION ABORT STEP
SX5 RTAAB
SX4 X2-CSTN NO LONGER RERUNNABLE STEP
ZR X4,RTA2 IF STEP NO LONGER RERUNNABLE
* TRANSACTION WILL BE RERUN OR PUSHED THROUGH TO
* COMPLETION BY SENDING THE *SECURE* MESSAGE.
SX6 TYIT SET RECOVER INTERACTIVE USER CASE
SA2 RTAK GET *OLDID*
SA3 RTAM GET *NEWID*
SA6 TMSW STORE CASE IN COMMUNICATION BLOCK
BX6 X2
BX7 X3
SA6 TMSW+2 STORE *OLDID* IN COMMUNICATION BLOCK
SA7 TMSW+3 STORE *NEWID* IN COMMUNICATION BLOCK
SX7 MAXWS*10 MAXIMUM MESSAGE LENGTH
SX6 4 SET MESSAGE UNITS TO DISPLAY
SA7 RTAP STORE MAXIMUM MESSAGE LENGTH
SA6 RTAQ STORE MESSAGE UNITS
* ISSUE *RSECURE* REQUEST TO OBTAIN *SECURE* MESSAGE.
* IF NO *SECURE* MESSAGE, RERUN TRANSACTION.
SCALL RSECURE,(RTAN,RTAO,RTAP,RTAQ,RTAR,RTAS)
SA2 RTAO GET STATUS OF REQUEST
SX4 X2-TSNM NO MESSAGE STATUS
ZR X4,RTA4 IF NO MESSAGE FROM *RSECURE*
SX4 X2-TSNE NO ERRORS STATUS
SX5 RTAAA
NZ X4,RTA5 IF ERRORS IN *RSECURE*
SA2 RTAI
NZ X2,RTA4 IF *CDCS* USED
SA2 RTAG
ZR X2,RTA1 IF *CRM* NOT USED
* IF *CRM* CURRENT BEGIN-COMMIT ID IS SUCCESSFUL, *SEND*
* *SECURE* MESSAGE ELSE CALL *CTASK* TO RERUN THE TRANSACTION.
SA2 RTAM
NZ X2,RTA4 IF *NEWID* NOT ZERO
* ISSUE *BLDABH* REQUEST TO BUILD APPLICATION BLOCK HEADER.
RTA1 SCALL BLDABH,(RTAT,RTAQ,RTAU,RTAR,RTAV,RTAS)
* ISSUE *SEND* REQUEST TO SEND THE SECURE MESSAGE AND CEASE.
SCALL SEND,(RTAN,RTAP,RTAW,RTAX)
RTA2 RJ SND SEND MESSAGE
RTA3 CEASE EXIT TASK WITH CEASE
RTA3.1 CEASE -1 CEASE BUT TERMINAL WILL REMAIN LOCKED
* CALL *CTASK* TO RERUN THE TRANSACTION.
RTA4 SX5 RTAAE
RJ SND SEND MESSAGE
CALLRTN RTAZ CALL *CTASK*
SA2 TMSW+5 GET *RERUN* STATUS
ZR X2,RTA3.1 IF TRANSACTION WAS RERUNNABLE
NG X2,RTA6 IF DATA BASE FILE DOWN
SX5 RTAAF
RTA5 RJ SND SEND MESSAGE
CEASE 2 ABNORMAL CEASE WITH DUMP
* RECOVERY NOT POSSIBLE NOW BECAUSE DATA BASE FILE IS
* DOWN. SEND MENU OF OPTIONS TO TAKE.
RTA6 SX6 B0+ MESSAGE COUNT
SA6 RTSA
RTA7 SA2 RTSA GET MESSAGE COUNT
SA5 TRTA+X2 GET MESSAGE ADDRESS
SX6 X2-TRTAL
PL X6,RTA8 IF END OF TABLE
SX6 X2+B1 INCREMENT MESSAGE COUNT
SA6 A2
RJ SND SEND MESSAGE
EQ RTA7 GET NEXT MESSAGE
* SAVE C.B. MESSAGE AREA AND THEN REQUEST OPTION.
RTA8 MOVE 4,TMSW,RTSC SAVE C.B. MESSAGE AREA
RTA9 SX6 300
SA6 RTSG
WAITINP RTSG
SA1 TMSW
SX3 X1-1
ZR X3,RTA11 IF TERMINAL TIMEOUT
RJ SFN SPACE FILL NAME
SA2 RTSD
BX3 X2-X6
ZR X3,RTA10 IF WAIT AND TRY AGAIN
SA2 RTSE
BX3 X2-X6
ZR X3,RTA12 IF LOG OFF
SA2 A2+B1
BX3 X2-X6
ZR X3,RTA13 IF ENTER NEXT TRANSACTION
SX5 RTAAT
RJ SND SEND MESSAGE
EQ RTA9 REQUEST OPTION
* TAF WILL WAIT 5 MINUTES BEFORE ATTEMPTING RERUN
* OF TRANSACTION.
RTA10 SX5 RTAAU
RJ SND SEND MESSAGE
WAIT RTSB WAIT FOR 5 MINUTES
MOVE 4,RTSC,TMSW RESTORE C.B. MESSAGE AREA
EQ RTA4 RERUN TRANSACTION
* TERMINAL TIMEOUT, OPTION B ASSUMED.
RTA11 SX5 RTAAS
RJ SND SEND MESSAGE
* LOG OFF WITH THE PREVIOUS RECOVERABLE INFORMATION
* REMAINING INTACT.
RTA12 SX5 RTAAV
RJ SND SEND MESSAGE
LOGT B1 LOG TERMINAL OUT
EQ RTA3 CEASE
* ALLOW ENTRY OF NEXT TRANSACTION. THE PREVIOUS
* RECOVERABLE INFORMATION WILL BE LOST.
RTA13 SX5 RTAAW
RJ SND SEND MESSAGE
EQ RTA3 CEASE
* LOG INTERACTIVE TERMINAL USER OFF WITH THE PREVIOUS
* RECOVERABLE INFORMATION REMAINING INTACT.
RTA14 SX4 X2-CSNR
ZR X4,RTA3 IF NON-RECOVERABLE TRANSACTION
SX4 X2-CSCE
ZR X4,RTA3 IF CEASE/JOB END
SX5 RTAAX
RJ SND SEND MESSAGE
LOGT B1 LOG TERMINAL OUT
EQ RTA3 CEASE
* *TSTAT* REQUEST PARAMETERS.
RTAA CON 0 STATUS OF *TSTAT* REQUEST
RTAB DATA 4HSTEP KEYWORD *STEP*
RTAC CON 0 TRANSACTION STEP
RTAD DATA 4HTRAN KEYWORD *TRAN*
RTAE CON 0 TRANSACTION TYPE
RTAF DATA 3HCRM KEYWORD *CRM*
RTAG CON 0 *CRM* TRANSACTION USAGE
RTAH DATA 4HCDCS KEYWORD *CDCS*
RTAI CON 0 *CDCS* TRANSACTION USAGE
RTAJ DATA 5HOLDID KEYWORD *OLDID*
RTAK CON 0 PREVIOUS *CRM* IDENTIFIER
RTAL DATA 5HNEWID KEYWORD *NEWID*
RTAM CON 0 CURRENT *CRM* IDENTIFIER
* *RSECURE* REQUEST PARAMETERS.
RTAN BSS MAXWS MESSAGE BUFFER
RTAO CON 0 STATUS OF *RSECURE* REQUEST
RTAP CON 0 MESSAGE LENGTH
RTAQ CON 0 MESSAGE UNITS
RTAR CON 0 FORMAT EFFECTOR
RTAS CON 0 TRANSPARENT MODE
* *BLDABH* REQUEST PARAMETERS.
RTAT DATA 3LACT APPLICATION CHARACTER TYPE
RTAU DATA 3LNFE FORMAT EFFECTORS
RTAV DATA 3LXPT TRANSPARENT MODE
* *SEND* REQUEST PARAMETERS.
RTAW CON 0 SEND TO ORIGINATING TERMINAL
RTAX CON 1 CEASE FLAG
RTAZ DATA 5LCTASK CALL TO *CTASK*
CON 0
RTSA CON 0 MESSAGE COUNT
RTSB CON 300 *WAIT* TIME IN SECONDS
RTSC BSSZ 4 C.B. STORAGE BUFFER
RTSD CON 1HA
RTSE CON 1HB
RTSF CON 1HC
RTSG CON 0 *WAITINP* TIME IN SECONDS
* SEND MESSAGES.
RTAAA FMSG (TASK LOGICAL ERROR.)
RTAAB FMSG (RECOVERY, TRANSACTION NOT RERUNNABLE, ENTER NEXT TRANS
,ACTION.)
RTAAC FMSG (READY.)
RTAAE FMSG (RECOVERY, RERUNNING TRANSACTION.)
RTAAF FMSG (TAF TRANSACTION NOT RERUNNABLE.)
RTAAG FMSG (RECOVERY NOT POSSIBLE NOW BECAUSE DATA BASE FILE IS DO
,WN.)
RTAAH FMSG (SELECT DESIRED OPTION FROM FOLLOWING LIST BY ENTERING
,LETTER.)
RTAAI FMSG ( )
RTAAJ FMSG (A = WAIT 5 MINUTES AND TRY AGAIN. TAF WILL WAIT 5 MIN
,UTES)
RTAAK FMSG ( BEFORE ATTEMPTING RERUN OF TRANSACTION.)
RTAAL FMSG ( )
RTAAM FMSG (B = LOG OFF. THE PREVIOUS RECOVERABLE INFORMATION WIL
,L)
RTAAN FMSG ( REMAIN INTACT, LOG IN AT A LATER TIME TO ATTEMPT R
,ERUN.)
RTAAO FMSG ( )
RTAAP FMSG (C = ALLOW ENTRY OF NEXT TRANSACTION. THE PREVIOUS REC
,OVERABLE)
RTAAQ FMSG ( INFORMATION WILL BE LOST.)
RTAAR FMSG (?)
RTAAS FMSG (TERMINAL TIMEOUT, OPTION B ASSUMED.)
RTAAT FMSG (VALID OPTIONS ARE A, B OR C.)
RTAAU FMSG (WAITING.)
RTAAV FMSG (TRANSACTION SESSION ENDED.)
RTAAW FMSG (ENTER NEXT TRANSACTION.)
RTAAX FMSG (TERMINAL NOT AVAILABLE.)
TRTA CON RTAAG
CON RTAAH
CON RTAAI
CON RTAAJ
CON RTAAK
CON RTAAL
CON RTAAM
CON RTAAN
CON RTAAO
CON RTAAP
CON RTAAQ
CON RTAAR
TRTAL EQU *-TRTA LENGTH OF MESSAGE TABLE
SND SPACE 4,10
** SND - SEND MESSAGE.
*
* ENTRY (X5) = ADDRESS OF MESSAGE.
*
* MACROS SEND.
SND SUBR ENTRY/EXIT
SEND X5 SEND MESSAGE
EQ SNDX RETURN
SPACE 4,10
** COMMON DECKS.
*CALL COMCMVE
*CALL COMCSFN
END RTASK