IDENT 0FA,DRPX
PERIPH J
TITLE 0FA - RELEASE FAST ATTACH PERMANENT FILE.
BASE MIXED
SST
QUAL$ EQU 1 DEFINE UNQUALIFIED COMMON DECKS
*COMMENT 0FA - RELEASE FAST ATTACH PERMANENT FILE.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
SPACE 4
*** 0FA - RELEASE FAST ATTACH PERMANENT FILE.
* M. E. MADDEN. 73/07/10.
* S. L. KSANDER. 75/05/26.
SPACE 4
*** 0FA IS A LOCATION FREE ROUTINE TO BE USED FOR
* RELEASING FAST ATTACH PERMANENT FILES.
*
* IF THE FILE IS ATTACHED IN WRITE MODE THE MODE BITS
* FOR THE FILE WILL BE UPDATED TO CLEAR THE WRITE LOCKOUT
* STATUS. THE ACTIVE FILE COUNT IN THE MST WILL ALSO
* BE DECREMENTED FOR THIS FILE. AN EVENT WILL BE
* ISSUED TO ROLL IN USERS WAITING FOR THE FILE.
*
* IF THE FILE WAS ATTACHED IN READ MODE THE USER COUNTS FOR
* THE FILE WILL BE UPDATED TO REFLECT ONE LESS USER
* ACCESSING THE FILE.
*
* UPDATING OF THE ECS ENTRY AND THE LOCAL FNT IS HANDLED
* BY CPU MONITOR THROUGH THE *AFAM* MONITOR FUNCTION.
SPACE 4
*** CALL.
*
* ENTRY ((LA)-1) = FILE STATUS.
* 6/,1/0,1/A,1/M,1/E,1/U,1/R
* A = APPEND
* M = MODIFY
* E = EXECUTE
* U = UTILITY ATTACH (ALWAYS ZERO FOR *0FA*)
* R = READ ONLY
* (FS - FS+4) = FST INFORMATION.
*
* EXIT (A) = 0.
SPACE 4
*CALL COMPMAC
*CALL COMSCPS
*CALL COMSMST
*CALL COMSPFM
*CALL COMSZOL
*CALL COMPREL
SPACE 4,10
**** DIRECT LOCATION ASSIGNMENTS.
FS EQU 20 - 24 FST INFORMATION (5 LOCATIONS)
****
TITLE MAIN ROUTINE.
** DRP - MAIN ROUTINE.
ORG 5
DRP SUBR ENTRY/EXIT
RJM SFF SEARCH FOR FILE
LDD CM+3
LPN 77
ZJN DRP0 IF NOT GLOBAL FAST ATTACH FILE
LDD T5
DRP0 STD CM+1
LDD T2 SET FNT ORDINAL IN REQUEST
STD CM+4
LDN RFAS REQUEST RETURN OF FAST ATTACH FILE
STD CM+3
* DETERMINE MODE OF FILE TO BE RETURNED.
LDD LA SET TABLE BASE ADDRESS
ADC TFNS
STM DRPA
LDN TFNSL
STD T2
DRP1 SOD T2 DECREMENT TABLE INDEX
MJN DRP2 IF END OF TABLE
LDM -1
LPN 35 SEARCH TABLE FOR MODE
LMM. **,T2
DRPA EQU *-1
NJN DRP1 IF NOT MATCHING STATUS
LDD T2 SET ATTACH MODE IN REQUEST
STD CM+2
MONITOR AFAM RETURN FILE
LDD CM+1 CHECK RETURN STATUS
ZJN DRP3 IF FUNCTION COMPLETE
DRP2 MONITOR HNGM HANG PP
DRP3 LDD T5 SET EST ORDINAL
STD CM+1
LDN DUCS DECREMENT ACTIVE FILE COUNT
STD CM+3
MONITOR SMDM
* LDN 0 ISSUE EVENT TO INDICATE FILE RETURNED
STD CM+1
LDD T6 SET FIRST TRACK IN EVENT
STD CM+4
LDD T5 SET EQUIPMENT IN EVENT
STD CM+3
MONITOR EATM
* LDN 0
LJM DRPX RETURN
TFNS SPACE 4
* TABLE OF FILE MODES.
* INDEXED BY *PFM* MODE NUMBER.
TFNS BSS 0
LOC 0
CON 0 WRITE
CON 1 READ
CON 20 APPEND/EXTEND
CON 5 EXECUTE
CON 77 NULL
CON 30 MODIFY
CON 31 READ ALLOW MODIFY
CON 21 READ ALLOW APPEND/EXTEND
CON 10 UPDATE
CON 11 READ ALLOW UPDATE
LOC *O
TFNSL EQU *-TFNS LENGTH OF TABLE
TITLE SUBROUTINES.
SFF SPACE 4,10
** SFF - SEARCH FOR FAST ATTACH FILE.
*
* ENTRY (FS - FS+4) = FST INFORMATION.
*
* EXIT (T2) = FNT ORDINAL OF FAST ATTACH FILE.
* (T5) = EST ORDINAL.
* (T6) = FIRST TRACK.
* (CM+3) = GLOBAL FAST ATTACH FILE FLAG.
*
* USES T3, T4, CM - CM+4.
*
* MACROS MONITOR, SFA.
SFF SUBR ENTRY/EXIT
LDN FNTP FETCH FNT POINTER
CRD T2
LDN 1 INITIALIZE FNT ORDINAL
STD T2
SFF1 SFA FNT,T2
CRD CM
ADN FSTG GET FST INFORMATION
CRD T5
LDD CM+4 CHECK FILE TYPE
SHN -6
LMN FAFT
NJN SFF2 IF NOT FAST ATTACH FILE
LDD T5
LMD FS
NJN SFF2 IF NOT SAME EQUIPMENT
LDD T6
LMD FS+1
ZJN SFFX IF MATCHING TRACK
SFF2 AOD T2 ADVANCE FNT ORDINAL
LMD T4
NJN SFF1 IF NOT END OF FNT
MONITOR HNGM HANG PP
* LDN 0
LJM DRPX EXIT
SPACE 4,10
** COMMON DECKS.
FNT$ EQU 1
*CALL COMPGFP
SPACE 4
OVERFLOW 5,ZFAL
END