IDENT 0BF,BGFX
PERIPH J
BASE MIXED
SST
*COMMENT 0BF - BEGIN FILE.
COMMENT COPYRIGHT CONTROL DATA SYSTEMS INC. 1992.
TITLE 0BF - BEGIN FILE.
SPACE 4
*** 0BF - BEGIN FILE.
*
* G. R. MANSFIELD. 70/09/01.
* J. L. LARSON. 81/10/05.
SPACE 4
*** 0BF IS A LOCATION FREE ROUTINE WHICH ENTERS FILES INTO
* THE LOCAL FNT (IN NFL). IT MAY BE USED BY ANY PP PROGRAM OR
* ROUTINE FOR THIS PURPOSE. IF THE FILE HAS BEEN PREVIOUSLY
* ENTERED INTO THE *FNT*, *0BF* ADVANCES THE EXIT ADDRESS BY
* ONE AND RETURNS WITH THE FILE LEFT NOT BUSY. IF THE FILE HAS
* NOT BEEN PREVIOUSLY ENTERED INTO THE *FNT* IT WILL BE ENTERED
* AND LEFT BUSY UPON RETURN.
* DEPENDING ON OPTIONS SELECTED BY THE CALLER,
* THE FILE WILL BE ASSIGNED TO A SPECIFIED EQUIPMENT,
* TO THE BEST MASS STORAGE EQUIPMENT, OR TO THE
* TERMINAL EQUIPMENT.
SPACE 4
*** OPERATOR MESSAGES.
*
*
* *WAIT FNT SPACE.* = *0BF* IS WAITING FOR ADDITIONAL NFL TO
* BE ASSIGNED SO ANOTHER LOCAL FNT ENTRY CAN BE CREATED.
SPACE 4
*** ENTRY CONDITIONS.
*
*
* ((LA)-1) = 2/,1/A,3/AL,1/S,2/,1/L,1/R,1/N
* A ACCESS LEVEL SPECIFIED.
* AL FILE ACCESS LEVEL.
* S IF SET, CREATE SPECIAL FILE USING
* ONE OF THE RESERVED FNT ENTRIES. SEE
* SYMBOL *SRFE* IN *PPCOM* FOR A LIST OF
* SPECIAL FILES.
* L IF SET, RETURN TO CALLER ON LOCAL FILE
* LIMIT (MAXIMUM NFL REACHED). IF THIS
* OPTION IS NOT SELECTED, *0BF* WILL SET
* THE *FLET* ERROR FLAG ON THE CONTROL
* POINT AND DROP THE PP.
* R IF SET, RETURN TO CALLER TO ENTER PP
* RECALL STACK ON WAIT FOR NFL INCREASE.
* *0BF* HAS ALREADY ISSUED *ROCM* FOR
* ROLLABLE JOB WHEN FL INCREASE IS NOT
* AVAILABLE, OR DISPLAYED *WAIT FNT SPACE*
* MESSAGE AT THE CONTROL POINT. THE
* CALLER SHOULD NOW ISSUE *RECM* TO ENTER
* THE PP RECALL STACK. IF THIS OPTION IS
* NOT SELECTED, *0BF* WILL ISSUE *ROCM* OR
* DISPLAY MESSAGE, AND ISSUE THE *RECM* TO
* ENTER THE CALLER PP REQUEST INTO THE
* PP RECALL STACK AND DROP THE PP.
* N IF SET, RETURN TO CALLER ON NFL INCREASE
* IN PROGRESS. *0BF* EXITS WITH STATUS
* FROM *COMPNFL*. IF THIS OPTION IS NOT
* SELECTED, ACTION DEPENDS ON *R* OPTION
* SETTING.
*
* (FS) = 1/0,1/T,1/M,9/EQ
* T IF SET, PREVENT TRACK ASSIGNMENT
* IF FILE TO BE ASSIGNED TO MASS STORAGE.
* M IF SET, FORCE MASS STORAGE ASSIGNMENT
* RATHER THAN TERMINAL EQUIPMENT IF
* *EQ* = 0 SPECIFIED.
* EQ IF NONZERO, ASSIGN FILE TO THIS
* EQUIPMENT (FOR NON-MASS STORAGE
* NON-ALLOCATABLE EQUIPMENT, CALLER MUST
* PREVIOUSLY HAVE COMPLETED *REQM*
* FUNCTION TO REQUEST THIS EQUIPMENT).
* IF *EQ* = 0, *M* = 0, AND
* *T* = 0 FOR A TERMINAL ORIGIN JOB,
* ASSIGN TERMINAL EQUIPMENT FOR SPECIAL
* FILES *INPUT* AND *OUTPUT*. OTHERWISE
* FOR *EQ* = 0, ASSIGN FILE TO THE BEST
* MASS STORAGE EQUIPMENT. NOTE THAT
* IF THE CALLER REQUESTS ASSIGNMENT
* OF THE NULL EQUIPMENT (*EQ* = *NEEQ*),
* THIS PREVENTS MASS STORAGE ASSIGNMENT
* AND THE CALLER CAN LATER OVERRIDE THE
* NULL EQUIPMENT WITH A DIFFERENT
* EQUIPMENT SELECTION (SINCE THE NULL
* EQUIPMENT DOES NOT NEED TO BE RELEASED
* AND THERE ARE NO TRACKS ASSOCIATED WITH
* IT THAT NEED TO BE DROPPED).
*
* (FN - FN+3) = FILE NAME LEFT JUSTIFIED WITH 0 FILL.
*
* (IR - IR+4) = CALLER PP REQUEST.
SPACE 4
*** EXIT CONDITIONS.
*
*
* (A) = 0 IF FILE LOCAL FNT ENTRY CREATED.
* .LT. 0 IF STORAGE FOR NFL INCREASE IS NOT AVAILABLE
* WHEN *N* OPTION IS SELECTED BY CALLER.
* = 1 IF WAITING FOR NFL INCREASE TO COMPLETE
* WHEN *N* OPTION IS SELECTED BY CALLER.
* = 2 IF CALLER IS TO ENTER PP RECALL STACK TO WAIT FOR
* NFL INCREASE WHEN *R* OPTION IS SELECTED BY CALLER.
* = 4 IF LOCAL FILE LIMIT (MAXIMUM NFL) REACHED
* WHEN *L* OPTION IS SELECTED BY CALLER.
* = LARGE POSITIVE NUMBER IF ADVANCE EXIT TAKEN
* FOR FILE ALREADY EXISTS CONDITION.
*
* (FN - FN+4) = FNT ENTRY.
*
* (FS - FS+4) = FST ENTRY.
*
* (FA) = RELATIVE ADDRESS OF LOCAL FNT ENTRY IN NFL.
*
* ADVANCE EXIT IF FILE PREVIOUSLY ASSIGNED.
* FST ENTRY SET BUSY IF NEW ENTRY IS MADE.
SPACE 4
*CALL COMPMAC
*CALL COMSCPS
*CALL COMSLFD
*CALL COMPREL
*CALL COMSZOL
SPACE 4
**** DIRECT LOCATION ASSIGNMENTS.
FS EQU 20 - 24 FST ENTRY (5 LOCATIONS)
FN EQU 40 - 44 FILE NAME (5 LOCATIONS)
FA EQU 57 FNT RELATIVE ADDRESS
****
TITLE MAIN ROUTINE.
0BF SPACE 4
* BGF - MAIN ROUTINE.
ORG 5
BGF SUBR ENTRY/EXIT
LDM -1 SAVE OPTIONS
STI LA
LPN 1
ZJN BGF0 IF NO RETURN ON NFL INCREASE
LCN BGF6-BGF5 SET TO RETURN ON NFL INCREASE
RAM BGFA
* GET ACCESS LEVEL FOR FILE.
BGF0 LDI LA GET PARAMETER WORD
SHN 21-11
PJN BGF0.1 IF NO ACCESS LEVEL SPECIFIED
SHN 0-6-21+11 EXTRACT ACCESS LEVEL
LPN 7
UJN BGF0.2 SAVE ACCESS LEVEL
BGF0.1 LDD CP GET JOB ACCESS LEVEL
ADK JSCW
CRD CM
LDD CM+1
SHN -11
BGF0.2 STD T3 SAVE ACCESS LEVEL
* CREATE LOCAL FNT ENTRY.
BGF1 LDD FS SAVE EST ORDINAL AND FLAGS
STD T2
LDI LA GET SPECIAL FILE FLAG
LPN 40
LMN CRFS CREATE LOCAL FNT ENTRY SUBFUNCTION
STD CM+1
LDD MA SET FILE NAME
CWD FN
MONITOR PLFM PROCESS LOCAL FNT ENTRY
LDD CM+1 SET FNT ADDRESS
STD FA
LDD CM+4
NJN BGF2 IF FILE NOT CREATED
* PROCESS NEWLY CREATED FILE.
LDC LOFT*100 SET FILE TYPE
STD FN+4
LDN ZERL CLEAR FST INFORMATION
CRD FS
LJM SFT SET FILE TYPE
* IF THE FILE IS FOUND, ADVANCE EXIT FROM ROUTINE.
BGF2 SHN 21-0
PJN BGF3 IF NOT FILE ALREADY EXISTS STATUS
NFA FA,R GET FNT ENTRY
CRD FN
ADN FSTL GET FST ENTRY
CRD FS
AOM BGF ADVANCE EXIT
UJN BGF5 EXIT
* PROCESS LOCAL FILE LIMIT (MAXIMUM NFL REACHED).
BGF3 SHN 21-1-21+0+22
PJN BGF4 IF NOT LOCAL FILE LIMIT
LDI LA
LPN 4
NJN BGF5 IF RETURN REQUESTED
LDN FLET SET LOCAL FILE LIMIT ERROR FLAG
STD CM+1
MONITOR CEFM
MONITOR DPPM DROP PP
LJP PPR EXIT TO PP RESIDENT
* PROCESS NFL INCREASE.
BGF4 LDD CP GET CURRENT NFL SIZE
ADN FLSW
CRD CM
AOD CM REQUEST ADDITIONAL 100B WORDS
RJM NFL REQUEST STORAGE INCREASE
BGFA NJN BGF6 IF NFL NOT ASSIGNED
* NJN BGF5 (RETURN ON NFL INCREASE)
LJM BGF1 RETRY CREATE OF FNT ENTRY
BGF5 LJM BGFX EXIT
BGF6 PJN BGF7 IF WAITING FOR COMPLETION OF NFL INCREASE
LDD CP
ADN JCIW
CRD CM
LDD CM+3 CHECK FOR *DIS* JOB
LPC 1000
ADD CM+2 CHECK FOR NON-ROLLABLE JOB
NJN BGF7 IF JOB NOT ROLLABLE
* LDN ROSR JOB SCHEDULAR ROLLOUT OPTION
ERRNZ ROSR CODE DEPENDS ON ZERO VALUE
STD CM+1 ROLLOUT THIS CONTROL POINT
MONITOR ROCM
UJN BGF8 CHECK RETURN OPTION
BGF7 LDD LA
RAM BGFB
LDD CP CONSOLE MESSAGE *WAIT FNT SPACE.*
ADN MS2W
CWM. =C*WAIT FNT SPACE.*,TR
BGFB EQU *-1
BGF8 LDI LA
LPN 2
NJN BGF5 IF RETURN TO ENTER PP RECALL STACK
* UJN EPR ENTER PP RECALL
TITLE SUBROUTINES.
EPR SPACE 4,10
** EPR - ENTER PP RECALL.
*
* ENTRY (IR - IR+4) = RECALL PARAMETERS.
*
* EXIT TO *PPR*.
*
* USES CM - CM+4.
*
* MACROS LJP, MONITOR.
EPR LDN ZERL ENTER DEFAULT TIMED RECALL
CRD CM
LDN NFIR NFL INCREASE PENDING REASON CODE
STD CM
LDD MA STORE PP CALL IN MESSAGE BUFFER
CWD IR
ADN 1
CWD CM STORE RECALL STACK REASON CODE
MONITOR RECM
LJP PPR ENTER PP RESIDENT
SFT SPACE 4,15
** SFT - SET FILE TYPE.
*
* EXIT (T1) = RELOCATION ADDRESS.
* (FN - FN+4) = FNT WORD.
* (FS - FS+4) = FST WORD.
* TO *AMS* IF NOT MS EQUIPMENT.
* TO *PSI* IF MS EQUIPMENT.
*
* USES FN+4, FS, T1, CM - CM+4.
*
* MACROS SFA.
SFT LDC TSFN-4 SET SPECIAL FILE ADDRESS
ADD LA
STD T1
SFT1 LDN 4 ADVANCE TABLE
RAD T1
LDI T1 CHECK ENTRY
ZJN SFT2 IF END OF TABLE
LMD FN COMPARE NAMES
NJN SFT1 IF NAMES DO NOT MATCH
LDM. 1,T1
LMD FN+1
NJN SFT1 IF NAMES DO NOT MATCH
LDM. 2,T1
LMD FN+2
NJN SFT1 IF NAMES DO NOT MATCH
LDM. 3,T1
LMD FN+3
SCN 77
NJN SFT1 IF NAMES DO NOT MATCH
SFT2 LDD T2 CHECK EQUIPMENT
LPC 1777
NJN SFT3 IF EQUIPMENT SPECIFIED
LDM. 3,T1 CHECK ASSIGNMENT BYTE
LPN 40
ZJN SFT4 IF NOT TERMINAL ASSOCIATED FILE
LDD CP GET JOB EJT ORDINAL
ADN TFSW
CRD CM
SFA EJT,CM GET JOB EJT ENTRY ADDRESS
ADN SCLE
CRD CM
LDD CM GET JOB ORIGIN TYPE
LPN 17
LMN TXOT
NJN SFT4 IF NOT TERMINAL JOB
LDN TTEQ TTY EST ORDINAL
SFT3 LPC 777
ZJN SFT4 IF NO EQUIPMENT SPECIFIED
STD FS SET EST ORDINAL IN FST
SFA EST READ EST ENTRY
ADK EQDE
CRD CM
LDD CM CHECK FOR MASS STORAGE EQUIPMENT
SHN 21-13
PJN PSI IF NOT MASS STORAGE
SFT4 LDD T2 CHECK REQUEST
SHN 21-12
MJN PSI IF MS SPACE NOT TO BE ASSIGNED
* UJN AMS ALLOCATE MS SPACE
AMS SPACE 4,15
** AMS - ALLOCATE MASS STORAGE SPACE.
*
* ENTRY (T1) = RELOCATION ADDRESS.
* (T3) = FILE ACCESS LEVEL.
* (FS) = EST ORDINAL IF SPECIFIED.
*
* EXIT (FS) = EST ORDINAL.
* (FS+1) = FIRST TRACK FOR FILE.
* TO *PSI*.
*
* USES FS, FS+1, CM - CM+4.
*
* MACROS MONITOR.
AMS LDN ZERL CLEAR PARAMETERS
CRD CM
LDD FS SET EST ORDINAL IN REQUEST
STD CM+1
NJN AMS1 IF EQUIPMENT
LDM. 3,T1 SET MASS STORAGE ASSIGNMENT PARAMETER
LPN 7
STD CM+2
LDD T3 SET ACCESS LEVEL PARAMETER
ADN 40 SET ACCESS LEVEL FLAG PARAMETER
SHN 6
RAD CM+3
AMS1 MONITOR RTCM REQUEST TRACK CHAIN
LDD CM+1 SET EQUIPMENT
LPC 777 EST ORDINAL = 0 IF NO EQUIPMENT ASSIGNED
STD FS
LDD CM+4 SET FIRST TRACK
STD FS+1
* UJN PSI PROCESS SPECIAL FILE STATUS
PSI SPACE 4,15
** PSI - PROCESS SPECIAL FILE STATUS.
*
* ENTRY (FN - FN+4) = FNT WORD.
* (FS - FS+4) = FST WORD.
* (T3) = ACCESS LEVEL.
*
* EXIT UPDATED FNT/FST/FUT INFORMATION COPIED TO NFL.
*
* USES CM - CM+4.
*
* MACROS NFA.
PSI LDD CP CHECK FOR JOB WITH SSJ= BLOCK
ADC SEPW
CRD CM
LDD CM+3
LPN 37
ADD CM+4
ZJN PSI1 IF NO SSJ= ADDRESS SPECIFIED
LDN SSST SET SPECIAL SYSTEM FILE
UJN PSI2 COMPLETE FNT/FST
PSI1 LDD CP CHECK FOR USER FILE PRIVACY
ADN JCIW
CRD CM
LDD CM+3 SET USER FILE PRIVACY STATUS
SHN 0-7
LPN 1
ERRNZ UPST-1 ADJUST CODE IF VALUE CHANGES
PSI2 RAD FN+4
NFA FA,R STORE FNT ENTRY
CWD FN
ADN FSTL STORE FST WORD
CWD FS
ADN FUTL-FSTL GET FUT WORD
CRD CM
LDD T3 SET ACCESS LEVEL IN FUT
RAD CM+2
NFA FA,R REPLACE FUT WORD
ADN FUTL
CWD CM
LDN 0 SET EXIT
LJM BGFX RETURN
TSFN SPACE 4,10
** TSFN - TABLE OF SPECIAL FILE NAMES.
* ENTRY = 5 WORDS.
*
*T 42/ FILE NAME,1/T,2/,3/MS
* T TERMINAL FILE ASSIGNMENT
* MS RTCM MASS STORAGE ALLOCATION PARAMETER.
TSFN BSS 0
VFD 42/0LINPUT,1/1,2/0,3/LOCS
VFD 42/0LOUTPUT,1/1,2/0,3/OUTS
VFD 42/0LPUNCH,3/0,3/OUTS
VFD 42/0LPUNCHB,3/0,3/OUTS
VFD 42/0LP8,3/0,3/OUTS
VFD 42/0LLGO,3/0,3/LGOS
VFD 42/0,3/0,3/LOCS ALL SCRATCH FILES
SPACE 4,10
** EJT MANAGED TABLE PROCESSOR.
CEJT
NFI SPACE 4
** COMMON DECK.
*CALL COMPNFL
SPACE 4,10
OVERFLOW 5,ZBFL
END