IDENT TFU,TFU
PERIPH
BASE MIXED
SST
*COMMENT TFU - TAPE FILE UTILITY.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
TITLE TFU - TAPE FILE UTILITY.
TFU SPACE 4,10
*** TFU - TAPE FILE UTILITY.
*
* J. D. HOLMBECK 85/02/15.
TFU SPACE 4,10
*** *TFU* CONTAINS FUNCTIONS FOR THE *TAPE MANAGEMENT SYSTEM*
* (*TMS*) THAT DO NOT REQUIRE ACCESS TO THE TAPE CATALOG FILES.
* THE PROGRAM *TFM* IS USED TO ACCESS THE TAPE CATALOG FILES.
TFU SPACE 4,10
*** *TFU* CALL FORMAT.
*
*T 18/*TFU* ,6/AR, 12/CODE, 24/PARAM
*
* AR AUTO RECALL.
* CODE FUNCTION CODE.
* PARAM PARAMETER FOR FUNCTION.
DAYFILE SPACE 4,10
*** DAYFILE MESSAGES.
*
* * TFU - ARGUMENT ERROR.*
* THE PARAMETER SPECIFIED IN THE LOWER 24 BITS OF THE
* REQUEST IS NOT IN THE CORRECT FORMAT FOR THE FUNCTION.
* FOR EXAMPLE, A PARAMETER BLOCK ADDRESS MAY BE OUTSIDE
* THE FIELD LENGTH OF THE CALLING PROGRAM.
*
* * TFU - INCORRECT REQUEST.*
* THE FUNCTION NUMBER SPECIFIED IS NOT RECOGNIZED BY
* *TFU*.
*
* * TFU - USER ACCESS NOT VALID.*
* THE FUNCTION REQUESTED REQUIRES SPECIAL PRIVILEGES
* THAT THE CALLING PROGRAM DOES NOT HAVE. FOR EXAMPLE,
* THE FUNCTION MAY REQUIRE AN *SSJ=* ENTRY POINT.
TITLE COMMON DECKS.
COMMON SPACE 4,10
** COMMON DECKS.
*CALL COMPMAC
*CALL COMSEJT
QUAL MTX
*CALL COMSMTX
QUAL *
*CALL COMSPIM
*CALL COMSPRD
*CALL COMSSSD
QUAL TFM
*CALL COMSTFM
QUAL *
LIST X
*CALL COMSTFU
LIST *
TITLE PROGRAM MACROS AND EQUIVALENCES.
ABORT SPACE 4,10
** ABORT - ERROR PROCESSING MACRO.
*
* ABORT PARAM
*
* ENTRY PARAM = DAYFILE MESSAGE ADDRESS.
*
* EXIT DAYFILE MESSAGE ISSUED TO SYSTEM AND USER DAYFILES.
* PP ABORTED.
*
* CALLS ERR.
PURGMAC ABORT
ABORT MACRO A
MACREF ABORT
LDC A
LJM //ERR
ABORT ENDM
ENTRY SPACE 4,10
** ENTRY - DEFINE OVERLAY ENTRY POINT.
*
* ENTRY NAME
*
* ENTRY NAME = ENTRY ADDRESS.
PURGMAC ENTRY
MACRO ENTRY,NAME
MACREF ENTRY
IF -MIC,.M
NAME EQU *
ELSE
QUAL
NAME EQU *+1R".M"*10000
QUAL ".O"
ENDIF
ENTRY ENDM
FCN SPACE 4,15
** FCN - DEFINE FUNCTION PROCESSOR.
*
* FUNC FCN NAME,(JOB CODES),SSJ
*
* ENTRY FUNC = FUNCTION CODE FROM *COMSTFU*.
* NAME = NAME OF FUNCTION PROCESSOR.
* JOB CODES = IF USED, FUNCTION IS ALLOWED BY ONLY
* THOSE JOB TYPES.
* SSJ = IF USED, FUNCTION IS ALLOWED BY ONLY THOSE
* JOBS WITH *SSJ=* ENTRY POINTS OR
* SUBSYSTEM ID-S.
.3 SET 0
PURGMAC FCN
MACRO FCN,FN,A,B,C
LOC .3/3
FN CON A/10000B,A-A/10000B*10000B
.1 SET 0
IFC NE,$B$$,1
.1 BITSET (B)
IFC NE,$C$$,1
.1 SET .1+4000
CON .1
.3 SET .3+3
FCN ENDM
OVERLAY SPACE 4,10
** OVERLAY - GENERATE OVERLAY CONSTANTS.
*
* OVERLAY (TEXT)
*
* ENTRY TEXT = TEXT OF SUBTITLE.
.N SET 0
OVLB MICRO 1,, 4T BASE OVERLAY NAME
PURGMAC OVERLAY
OVERLAY MACRO TEXT
QUAL
.N SET .N+1
.M MICRO .N,1, ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
.O MICRO 1,3, "OVLB"".M"
QUAL ".O"
TTL TFU/".O" - TEXT
TITLE
IDENT ".O",OVL TEXT
*COMMENT TFU - TEXT
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
ORG OVL
LJM *
UJN *-2
OVERLAY ENDM
DIRECT SPACE 4,10
**** DIRECT LOCATION ASSIGNMENTS.
CN EQU 20 - 24 CM WORD BUFFER (5 LOCATIONS)
OT EQU 25 JOB ORIGIN TYPE
FN EQU 30 - 34 FAMILY NAME (5 LOCATIONS)
UN EQU 40 - 44 USER NAME (5 LOCATIONS)
EP EQU 57 ENTRY POINTS
SC EQU 60 - 64 SCRATCH
****
TITLE MAIN PROGRAM.
SPACE 4
ORG PPFW
TFU SPACE 4,10
** TFU - MAIN PROGRAM.
TFU RJM PRS PRESET TAPE FILE UTILITY
LDC 0
TFUA EQU *-1 (OVERLAY NAME)
ZJN TFU1 IF NO OVERLAY NAME
LMC 2L"OVLB" LOAD OVERLAY
RJM EXR EXECUTE ROUTINE
TFU1 LDN 0 CLEAR ADDRESS WORD COUNT
STD T1
LJM * ENTER PROCESSOR
TFUB EQU *-1 (ENTRY ADDRESS FOR FUNCTION)
TFUX MONITOR DPPM DROP PP
LJM PPR EXIT TO PP RESIDENT
SPACE 4,10
** PROGRAMMING NOTE.
*
* (T1) = 0, ON ENTRY TO ALL FUNCTION PROCESSORS TO ASSURE
* THE ROUTINE *CKA* WILL CHECK THE PROPER CM ADDRESSES.
TITLE ERROR PROCESSOR.
ERR SPACE 4,10
** ERR - ERROR PROCESSOR.
*
* ENTRY (A) = ADDRESS OF DAYFILE MESSAGE.
*
* EXIT DAYFILE MESSAGE ISSUED TO SYSTEM AND USER DAYFILES.
* PP ABORTED.
*
* USES CN.
*
* CALLS /4TA/ERR.
ERR BSS 0 ENTRY
STD CN SET ERROR MESSAGE ADDRESS
EXECUTE 4TA
LJM /4TA/ERR PROCESS ERROR
TITLE RESIDENT ROUTINES.
CKA SPACE 4,15
** CKA - CHECK ADDRESS.
*
* ENTRY (IR+3 - IR+4) = ADDRESS.
* (T1) = WORD COUNT MINUS ONE.
*
* EXIT (A) = ABSOLUTE ADDRESS.
*
* ERROR ABORT WITH * TFU - ARGUMENT ERROR* IF ADDRESS IS NOT
* WITHIN FIELD LENGTH OF CALLING PROGRAM.
*
* MACROS ABORT.
CKA2 LDD IR+3 LOAD ABSOLUTE ADDRESS
SHN 6
ADD RA
SHN 6
ADD IR+4
CKA SUBR ENTRY/EXIT
LDD IR+3
SCN 37
NJN CKA1 IF OUT OF RANGE
LDD IR+3
SHN 14
LMD IR+4
ADD T1
SHN -6
SBD FL
MJN CKA2 IF WITHIN FIELD LENGTH
CKA1 ABORT ERAE * TFU - ARGUMENT ERROR.*
COMMON SPACE 4,10
** COMMON DECKS NOT TO BE OVERLAYED.
EJT$ EQU 1 DEFINE EJT PROCESSOR
IFP$ EQU 1 DEFINE INITIALIZATION PROCESSOR
*CALL COMPGFP
OVERLAY SPACE 4,10
** OVERLAY DEFINITIONS.
USE OVERLAY
OVL EQU *+5 OVERLAY LOAD ADDRESS
TITLE FUNCTION PROCESSORS.
AEJ SPACE 4,25
*** FUNCTION *AEJF* - ASSIGN EST ORDINAL TO JOB.
*
* ENTRY (IR+3 - IR+4) = PARAMETER BLOCK ADDRESS.
*
*T,ADDR 36/ , 12/ EJT, 12/ EST
*
* EJT = EJT ORDINAL OF JOB.
* EST = EST ORDINAL TO ASSIGN TO JOB.
*
* EXIT PARAMETER BLOCK RESET.
*
*T,ADDR 12/ RET, 24/ , 12/ EJT, 12/ EST
*
* RET = 0 IF EST ASSIGNED.
* = 1 IF JOB NOT AT A CONTROL POINT.
* = 2 IF JOB NOT REQUESTING A RESOURCE.
*
* USES CM - CM+4, CN - CN+4, FN - FN+4.
*
* CALLS CKA.
*
* MACROS MONITOR, SFA.
AEJ ENTRY ENTRY
RJM CKA CHECK ADDRESS
CRD FN GET PARAMETER BLOCK
LDD FN+4 SET EST
STM AEJC
SFA EJT,FN+3 GET EJT ADDRESS
ERRNZ JSNE
CRD CM GET JOB STATUS
ADN SCHE-JSNE GET CONTROL POINT NUMBER
CRD CN
LDD CM+4
LPN 76
SBN EXJS*2
NJN AEJ1 IF JOB NOT AT CONTROL POINT
LDN ZERL SET MONITOR CALL
CRD CM
LDN 4 SET REQUEST COUNT
STD CM+1
LDD CN+3 SET CPA ADDRESS
LPN 77
SHN 7
ADN JCIW
STD CM+4
LDD MA SET VERIFY/UPDATE BLOCK
CWM AEJB,CM+1
MONITOR UTEM UPDATE TABLE ENTRY
LDD CM+1
ZJN AEJ2 IF OPERATION COMPLETE
AEJ1 BSS 0
AEJA LDN 1 FLAG USER NOT AT CONTROL POINT
* LDN 2 (FLAG USER NOT REQUESTING RESOURCE)
AEJ2 STD FN+0
RJM CKA CHECK ADDRESS
CWD FN RETURN STATUS TO USER
LJM TFUX RETURN
AEJB BSS 0 VERIFY/UPDATE BLOCK FOR *UTEM*
VFD 1/1,5/JCIW-JCIW,6/11D,6/49D
VFD 42/RXCS VERIFY *RESEX* CPU PRIORITY
VFD 1/1,5/JCIW-JCIW,6/12D,6/24D
VFD 42/ORSI VERIFY ALLOW OPERATOR ROLLOUT SUBSYSTEM ID
VFD 1/1,5/SNSW-JCIW,6/01D,6/12D
VFD 42/1 VERIFY PP PAUSE FLAG SET
VFD 1/0,5/OAEW-JCIW,6/12D,6/00D,30/0
AEJC VFD 12/ UPDATE ASSIGNED EST ORDINAL
IXM SPACE 4,25
*** FUNCTION *IXMF* - ISSUE EXTERNAL *MAGNET* REQUEST.
*
* ENTRY (IR+3 - IR+4) = PARAMETER BLOCK ADDRESS.
*
*T,ADDR 6/ 0, 6/ FNC, 12/ UDT, 36/ PAR
*
* FNC = FUNCTION CODE.
* UDT = *UDT* ORDINAL.
* PAR = PARAMETER FOR FUNCTION.
*
* EXIT PARAMETER BLOCK RESET.
*
*T,ADDR 12/ RET, 12/ UDT, 36/ PAR
*
* RET = 0 IF REQUEST ACCEPTED.
* = 1 IF MAGNET NOT ACTIVE.
* = 2 IF REQUEST NOT ACCEPTED.
*
* USES CM - CM+4, CN - CN+4.
*
* CALLS CKA.
*
* MACROS DELAY, MONITOR, PAUSE.
IXM ENTRY ENTRY
RJM CKA CHECK ADDRESS
CRD CN
LDD MA WRITE VSN ASSIGNMENT DATA
CWD CN
IXM1 LDN 1 SET WRITE
STD CM+1
LDC MTSI *MAGNET* SUBSYSTEM ID
STD CM+2
LDD HN SET WORD COUNT
STD CM+3
LDN /MTX/XREQ
STD CM+4
MONITOR TDAM
LDD CM+1
ZJN IXM4 IF CALL COMPLETED
SBN 4
ZJN IXM3 IF MAGNET NOT ACTIVE
PAUSE
DELAY
LDD CM+1
NJN IXM2 IF ERROR
SOM IXMB
PJP IXM1 IF RETRY COUNT NOT EXHAUSTED
IXM2 AOM IXMA
IXM3 AOM IXMA
IXM4 BSS 0
IXMA LDN 0 FLAG REQUEST ACCEPTED
* LDN 1 (FLAG *MAGNET* NOT ACTIVE)
* LDN 2 (FLAG REQUEST NOT ACCEPTED)
STD CN
RJM CKA CHECK ADDRESS
CWD CN
LJM TFUX RETURN
IXMB CON 10D RETRY COUNT
STO SPACE 4,20
*** FUNCTION *STOF* - SET DEFAULT *TO* OPTION FOR USER.
*
* ENTRY (IR+3 - IR+4) = PARAMETER BLOCK ADDRESS.
*
*T,ADDR 58/ , 1/ ETD, 1/ UTD
*
* ETD = 0 IF DEFAULT USER TAPE OPTION TO BE *TO=E*.
* = 1 IF DEFAULT USER TAPE OPTION TO BE *TO=C*.
* UTD = 0 IF DEFAULT USER TAPE OPTION TO BE *TO=F*.
* = 1 IF DEFAULT USER TAPE OPTION TO BE *TO=T*.
*
* EXIT DEFAULT USER TAPE OPTION RESET.
*
* USES CM - CM+4, CN - CN+4.
*
* CALLS CKA.
*
* MACROS DELAY, MONITOR, PAUSE.
STO ENTRY ENTRY
RJM CKA CHECK ADDRESS
CRD FN GET USER REQUEST
NFA TMSN GET TMS CONTROL WORD
CRD CM
LDD CM+4 SET USER DEFINED TAPE OPTIONS FLAG
LPC 777
LMC 4000
STD CM+4
LDD FN+4 SET USER DEFINED TAPE OPTIONS
LPN 3
SHN 12-1
RAD CM+4
NFA TMSN REWRITE TMS CONTROL WORD
CWD CM
LJM TFUX RETURN
STS SPACE 4,20
*** FUNCTION *STSF* - SET *TMS* STATUS FOR SYSTEM.
*
* ENTRY (IR+3 - IR+4) = PARAMETER BLOCK ADDRESS.
*
*T,ADDR 1/ TMS, 1/ NTD, 1/STD, 1/ NTE, 1/ STE, 55/
*
* TMS = 1 IF *TMS* TO BE ENABLED.
* NTD = 0 IF DEFAULT NON-SYOT TAPE OPTION TO BE *TO=F*.
* = 1 IF DEFAULT NON-SYOT TAPE OPTION TO BE *TO=T*.
* STD = 0 IF DEFAULT SYOT TAPE OPTION TO BE *TO=F*.
* = 1 IF DEFAULT SYOT TAPE OPTION TO BE *TO=T*.
* NTE = 0 IF DEFAULT NON-SYOT TAPE OPTION TO BE *TO=E*.
* = 1 IF DEFAULT NON-SYOT TAPE OPTION TO BE *TO=C*.
* STE = 0 IF DEFAULT NON-SYOT TAPE OPTION TO BE *TO=E*.
* = 1 IF DEFAULT NON-SYOT TAPE OPTION TO BE *TO=C*.
*
* EXIT SYSTEM *TMS* STATUS RESET.
*
* USES T1, CM - CM+4.
*
* CALLS CKA.
*
* MACROS MONITOR.
STS ENTRY ENTRY
RJM CKA CHECK ADDRESS
CRD CM SET REQUESTED *TMS* STATUS
LDD CM
SHN 0-7
STM STSA+4
LDN 1 SET REQUEST COUNT
STD CM+1
LDN 0
STD CM+2
STD CM+3
LDK TFML SET ADDRESS
STD CM+4
LDD MA SET REQUEST IN MESSAGE BUFFER
CWM STSA,ON
MONITOR UTEM UPDATE TABLE
LDN 0 SET ADDRESS WORD COUNT
STD T1
RJM CKA GET PARAMETER WORD
CRD CM
LDD CM
SHN 21-13
PJN STS1 IF *TMS* NOT TO BE ENABLED
LDN ZERL CLEAR REQUEST WORD
CRD CM
LDN 1 SET REQUEST COUNT
STD CM+1
LDK SSTL SET ADDRESS
STD CM+4
LDD MA
CWM STSB,ON
MONITOR UTEM UPDATE TABLE
STS1 LJM TFUX RETURN
STSA VFD 1/0,5/0,6/4,6/7,42/0 *UTEM* REQUEST BLOCK
STSB VFD 1/0,5/0,6/1,6/24D,42/0 *UTEM* REQUEST BLOCK
TITLE PRESET AREA.
PRS SPACE 4,15
** PRS - PRESET TAPE FILE UTILITY.
*
* EXIT (EP) = SPECIAL ENTRY POINT FLAGS.
* (OT) = JOB ORIGIN TYPE.
*
* ERROR ABORT WITH * TFU - INCORRECT REQUEST* IF FUNCTION
* NUMBER NOT RECOGNIZED OR IF THE CALLING PROGRAM DOES
* NOT HAVE THE CORRECT PRIVILEGES.
*
* USES CM - CM+4, CN - CN+4.
*
* CALLS CRS, IFP.
*
* MACROS ABORT, SFA.
PRS SUBR ENTRY/EXIT
LDD CP READ SPECIAL ENTRY POINT WORD
ADN STSW CHECK ERROR FLAG
CRD CM
ADN SEPW-STSW
CRD CN
LDD CM+1
SBN SPET
MJN PRS1 IF NOT SPECIAL ERROR FLAG
LJM TFUX EXIT *TFU*
PRS1 LDD CN SAVE ENTRY POINTS
STD EP
RJM CRS CHECK RECALL STATUS
ZJN PRS2 IF NO AUTO RECALL
RJM IFP INITIALIZE MANAGED TABLE PROCESSORS
LDD CP FETCH EJT ORDINAL
ADN TFSW
CRD CM
SFA EJT,CM CALCULATE EJT ENTRY ABSOLUTE ADDRESS
ADN SCLE GET JOB ORIGIN TYPE
CRD CM
LDD CM
LPN 17
STD OT
LDD IR+2 CHECK FUNCTION CODE
SHN 1
ADD IR+2
STD T7
ADC -TFCNL
MJN PRS3 IF LEGAL CODE
PRS2 ABORT ERIR * TFU - INCORRECT REQUEST.*
PRS3 LDM TFCN+1,T7
ZJN PRS2 IF UNDEFINED FUNCTION CODE
STM TFUB SAVE THE ADDRESS OF FUNCTION
LDD CP READ JOB CONTROL INFORMATION
ADK JCIW
CRD CN
LDM TFCN+2,T7 CHECK ORIGIN CONTROL
LPC 3777
ZJN PRS4 IF NO CONTROL BITS
STD T1
LCN 0 SET BIT SHIFT
LMD OT
RAM PRSA
LDD T1 CHECK BITS
PRSA SHN 21
MJN PRS6 IF LEGAL FUNCTION FOR JOB ORIGIN TYPE
LDM TFCN+2,T7 GET FUNCTION PROCESSOR ADDRESS
SHN 21-13
MJN PRS5 IF *SSJ=* REQUIRED
UJN PRS2 ABORT
PRS4 LDM TFCN+2,T7 GET FUNCTION PROCESSOR ADDRESS
SHN 21-13
PJN PRS6 IF SSJ= NOT REQUIRED
PRS5 LDD EP CHECK *SSJ=* ENTRY POINT
SHN 21-2
MJN PRS6 IF *SSJ=*
LDD CN+2
ADK -LSSI
MJP PRS2 IF NOT SUBSYSTEM
PRS6 LDM TFCN,T7 SET OVERLAY NAME
STM TFUA
LJM PRSX RETURN
TFCN SPACE 4,15
** TFCN - TABLE OF FUNCTION CODE PROCESSORS.
* ENTRY = 3 WORDS.
*
*T, 12/ NAME , 12/ ADDR , 12/ BITS
*
* NAME OVERLAY NAME
* ADDR ADDRESS OF FUNCTION PROCESSOR
* BITS BITS FOR JOB ORIGIN CONTROL
* BIT MEANING
* 11 SET IF SSJ= ENTRY POINT REQUIRED.
* 10 - 0 SET IF CORRESPONDING ORIGIN TYPE REQUIRED.
TFCN BSS 0 TABLE OF FUNCTION CODE PROCESSORS
AEJF FCN AEJ,,SSJ ASSIGN *EST* ORDINAL TO JOB
IXMF FCN IXM,,SSJ ISSUE EXTERNAL *MAGNET* REQUEST
FCN PRS2 RESERVED
STOF FCN STO SET DEFAULT *TO* FOR USER
STSF FCN STS,,SSJ SET *TMS* STATUS FOR SYSTEM
LOC *O
TFCNL EQU *-TFCN
SPACE 4
IFP HERE GLOBAL FNT PROCESSORS INITIALIZATION CODE
SPACE 4,10
** COMMON DECKS.
*CALL COMPCRS
SPACE 4,10
OVERFLOW
OVERLAY (ERROR PROCESSOR.)
ERR SPACE 4,10
** ERR - PROCESS ERROR.
*
* ENTRY (CN) = ERROR MESSAGE ADDRESS.
*
* EXIT ERROR MESSAGE ISSUED TO SYSTEM AND USER DAYFILES.
* PP ABORTED.
*
* CALLS DFM.
*
* MACROS MONITOR.
ERR BSS 0 ENTRY
LDD CN GET DAYFILE MESSAGE ADDRESS
RJM DFM ISSUE DAYFILE MESSAGE
MONITOR ABTM
LJM PPR EXIT
ERRMSG SPACE 4,10
* ERROR MESSAGES.
QUAL
ERAE DATA C* TFU - ARGUMENT ERROR.*
ERIR DATA C* TFU - INCORRECT REQUEST.*
ERIU DATA C* TFU - USER ACCESS NOT VALID.*
QUAL *
SPACE 4,10
OVERFLOW OVL
TTL TFU - TAPE FILE UTILITY.
SPACE 4,10
END