top - download
⟦d1ed89cf2⟧ Wang Wps File
Length: 49724 (0xc23c)
Types: Wang Wps File
Notes: CPS/SDS/025
Names: »1601A «
Derivation
└─⟦c333b847f⟧ Bits:30005811 8" Wang WCS floppy, CR 0118A
└─ ⟦this⟧ »1601A «
WangText
…00……00……00……00……00…>…0a……00……00…>…0b…>…00…> =…08…=…0c…=…01…=…02…=…05…(…01…(…05…(…06…'…09…'…0b…'…0e…'…02…'…06…&…0a…&…0b…&…0f…& &…07…%…0b…%…0f…%
$…0a…$…0b……86…1 …02… …02… …02…
…02…CPS/SDS/025
…02…850401…02……02…
MESSAGE MANAGEMENT
DETAILED DESIGN SPECIFICATION…02…ISSUE 1…02…CAMPS
4.1.7 I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
4.1.7.1 E̲x̲t̲e̲r̲n̲a̲l̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
N/A.
4.1.7.2 P̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
The general environments of MMS are described in (b),
section 3.2.7. Refer in particular to figure (b), 3.2.7.1-1.
MMS is a File Manager in the sense described in (d)
3.1. As such it interfaces to the FMS Command Controller
and to FMS Disk Cache Manager.
Moreover, it interfaces to Message Monitor Subpackage
within CSF Package, running in all application processes
using MMS.
4.1.7.2.1 I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲ ̲t̲o̲ ̲F̲M̲S̲
4.1.7.2.1.1 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Initializes MMS control variables and coroutines. Creates
the data segments required. Must be called at FMS Initialization
Time. Refer (d) 3.1.1.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
INIT ̲MM
4.1.7.2.1.2 F̲M̲S̲ ̲C̲o̲m̲m̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲l̲e̲r̲ ̲t̲o̲ ̲M̲M̲S̲
The Command Controller places MMS Command Operations
in MMS Command Queue. Refer (e) 3.1.2.1.
The next command is fetched by calling the Command
Controller Function Get MMS Command.
4.1.7.2.1.3 M̲M̲S̲ ̲t̲o̲ ̲C̲o̲m̲m̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲l̲e̲r̲
MMS utilizes the following Command Controller Functions.
Refer (e) 3.1.2.1 and 3.1.2.2:
- Reply Command Large
- Receive Words
- Send Words
- Receive Sectors
- Send Sectors
- Skip Destination
- Skip Source
4.1.7.2.1.4 M̲M̲S̲ ̲t̲o̲ ̲D̲i̲s̲k̲ ̲C̲a̲c̲h̲e̲ ̲M̲a̲n̲a̲g̲e̲r̲
MMS sends DC operation to the DCM semaphore, Refer
(f) 3.1.
The following commands are used by MMS:
All commands of (f) sections 3.1.2.1 and 3.1.2.2.
4.1.7.2.1.5 D̲i̲s̲k̲ ̲C̲a̲c̲h̲e̲ ̲M̲a̲n̲a̲g̲e̲r̲ ̲t̲o̲ ̲M̲M̲S̲
Replies from DCM to the commands from MMS are sent
to the DCM Reply Semaphore in each MMS Coroutine, refer
4.1.4.3.4.1.
4.1.7.2.2 I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲ ̲t̲o̲ ̲M̲e̲s̲s̲a̲g̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲
Refer (b), section 3.2.7.
4.1.7.3 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
Refer to subpackage specifications.
4.2 S̲U̲B̲P̲A̲C̲K̲A̲G̲E̲ ̲S̲P̲E̲C̲I̲F̲I̲C̲A̲T̲I̲O̲N̲S̲
4.2.1 C̲o̲m̲m̲a̲n̲d̲ ̲H̲a̲n̲d̲l̲i̲n̲g̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲
4.2.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The functions performed by this subpackage are:
a) C̲o̲m̲m̲a̲n̲d̲ ̲S̲c̲h̲e̲d̲u̲l̲i̲n̲g̲
Receives commands from the MMS Command Queue, where
they are placed by the FMS Command Controller.
Executes commands by calling the command dependent
Command Execution Procedure, refer 4.1.3.1. Then
sends a reply to calling application via FMS Command
Controller. Refer 4.2.1.4.1.
b) S̲t̲o̲r̲a̲g̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲i̲n̲g̲ ̲a̲n̲d̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲F̲u̲n̲c̲t̲i̲o̲n̲s̲
Three commands are directly executed by this subpackage:
- Get Storage Occupancy
- Get Threshold Warning
- Get Statistics
Refer 4.2.1.4.2.
Moreover MMS Command Statistics is updated.
c) I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲
The initialization of MMS at FMS process initialization
time is performed by this subpackage. Refer 4.2.1.4.3.
4.2.1.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
The subpackage consists of
- NO ̲OF ̲MH ̲COROUTINES coroutines of type Message
Handler Coroutine. Refer 4.2.1.4.1.
- 3 Command Execution Procedures, Refer 4.2.1.4.2.
- 2 Initialization Procedures, Refer 4.2.1.4.3.
4.2.1.3 D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲
4.2.1.3.1 R̲u̲n̲n̲i̲n̲g̲ ̲S̲t̲a̲t̲e̲
The variable RUNNING ̲STATE determines the legal command
codes as follows:
a) Await Start
In this state only the Start command is legal
b) Await Restore
In this state only the Restore command is legal.
c) Running
In this state all commands except Start and Restore
are legal.
Running State is set to Await Start by the Initialization
Procedure.
The other state transitions are performed by Checkpoint
and Recovery Subpackage.
4.2.1.3.2 C̲o̲m̲m̲a̲n̲d̲ ̲E̲x̲e̲c̲u̲t̲i̲o̲n̲
The invocation of Command Execution Procedures is explained
in 4.1.3.
4.2.1.4 M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲s̲
4.2.1.4.1 C̲o̲m̲m̲a̲n̲d̲ ̲H̲a̲n̲d̲l̲e̲r̲ ̲M̲o̲d̲u̲l̲e̲
4.2.1.4.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The module receives command operations from the FMS
Command Controller, refer 4.1.7.2.1.2, and calls the
appropriate command execution procedure in this or
in other subpackages. It also checks that the command
received is consistent with the current Running State
of MMS.
Having called the command execution procedure, a reply
is returned to calling application process via FMS
Command Controller. Refer 4.1.7.2.1.3.
4.2.1.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module has two Package Interfaces.
Get MM Command, refer (E) 3.1.2.1
Reply Command Large refer (E) 3.1.2.1
4.2.1.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of one coroutine:
a) Command Handler Coroutine
and 6 procedures:
b) Perform Start
c) Perform Restore
d) Perform Command
e) Update Statistics Before
f) Update Statistics After
g) Manipulate TRiple Words
FIGURE 4.2.1.4.1.3-1
COMMAND HANDLER CONTROL FLOW
4.2.1.4.1.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) OPERATION (m)
b2) CC (m)
b3) RUNNING ̲STATE
b4) DCM ̲REPLY ̲SEM (m)
b5) COMMAND ̲STATISTICS (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None.
4.2.1.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Get MM Command 4.1.7.2.1.2
- Reply Command Large 4.1.7.2.1.3
- Start 4.2.4.7.3
- Restore 4.2.4.7.1
- Create CIF 4.2.2.7.1
- Create New CIF Version 4.2.2.7.2
- Create View 4.2.2.7.3
- Create Fields 4.2.2.7.11
- Lookup 4.2.2.7.8
- Lock View 4.2.2.7.5
- Unlock View 4.2.2.7.6
- Stop CIF 4.2.2.7.7
- Remove View 4.2.2.7.4
- Get View Attributes 4.2.2.7.9
- Change Attributes 4.2.2.7.10
- Store 4.2.3.7.1
- Clear 4.2.3.7.5
- Retrieve 4.2.3.7.6
- Init Dump 4.2.3.7.2
- Dump CIF Sequence 4.2.3.7.3
- Terminate Dump 4.2.3.7.4
- Copy Fileds 4.2.3.7
- Copy Fields 4.2.3.7
- Read View 4.2.5.7.15
- Write View 4.2.5.7.16
- Save 4.2.4.7.2
- Get Storage Occupancy 4.2.1.4.2.2 a
- Get Threshold Warning 4.2.1.4.2.2 b
- Get Statistics 4.2.1.4.2.2 c
- Change Warning Threshold 4.2.1.4.2.1
- Get Threshold 4.2.1.4.2.2
- Get Resource State 4.2.1.4.2.2
- Check Deletion
- Make CIF Permanent
a) C̲o̲m̲m̲a̲n̲d̲ ̲H̲a̲n̲d̲l̲e̲r̲ ̲C̲o̲r̲o̲u̲t̲i̲n̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes DCM Reply Semaphore and stack control
block. Then goes into the infinite coroutine loop.
Gets a command and performs it according to running
state by calling appropriate command executing
procedure or setting a completion code.
Return reply to calling application.
Flowgram: Figure 4.2.1.4.1.5-1.
b) P̲e̲r̲f̲o̲r̲m̲ ̲S̲t̲a̲r̲t̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
If command is START, the START procedure is called.
Otherwise set an error cc.
Flowgram: None.
c) P̲e̲r̲f̲o̲r̲m̲ ̲R̲e̲s̲t̲o̲r̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
If command is RESTORE, then RESTORE procedure is
called. Otherwise set an error cc.
Flowgram: None.
d) P̲e̲r̲f̲o̲r̲m̲ ̲C̲o̲m̲m̲a̲n̲d̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
If command is START or RESTORE, an error cc is
set. Otherwise the command executing procedure
corresponding to the command is called.
Flowgram: None.
e) U̲p̲d̲a̲t̲e̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲B̲e̲f̲o̲r̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Updates statistics variables before command execution.
Flowgram: Figure 4.2.1.4.1.5-2
f) U̲p̲d̲a̲t̲e̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲A̲f̲t̲e̲r̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Updates statistics variables after command execution
Flowgram: Figure 4.2.1.4.1.5-3
g) M̲a̲n̲i̲p̲u̲l̲a̲t̲e̲ ̲T̲r̲i̲p̲l̲e̲ ̲W̲o̲r̲d̲s̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Two triple integers are added or subtracted according
to function.
COMMAND HANDLER COROUTINE
Initialize DCM ̲REPLY ̲SEM and stack control block
Coroutine loop
GET ̲MM ̲COMMAND ()(OPERATION)
UPDATE ̲STATISTICS ̲BEFORE
CASE RUNNING ̲STATE
AWAIT ̲START? PERFORM ̲START
AWAIT ̲RESTORE? PERFORM ̲RESTORE
RUNNING? PERFORM ̲COMMAND
End case
REPLY ̲COMMAND LARGE (OPERATION, REPLY)
UPDATE ̲STATISTICS ̲AFTER
End Coroutine loop
Figure 4.2.1.4.1.5-1…01…Command Handler Coroutine Flowgram
PROCEDURE UPDATE ̲STATISTICS ̲BEFORE
With COMMAND ̲STATISTICS
INCREMENT(BUSY ̲COUNT)
BUSY ̲COUNT EQ MAX ̲BUSY ̲COUNT?
BUSY ̲START = Current time
BUSY ̲COUNT EQ 1?
IDLE ̲TIME =
IDLE ̲TIME + Current Time - IDLE
̲START
RETURN
Figure 4.2.1.4.1.5-2…01…Update Statistics Before Flowgram
PROCEDURE UPDATE ̲STATISTICS ̲AFTER
With COMMAND ̲STATISTICS
DECREMENT(BUSY ̲COUNT)
BUSY ̲COUNT EQ 0? IDLE ̲START = Current Time?
BUSY ̲COUNT EQ MAX ̲BUSY ̲COUNT - 1?
BUSY ̲TIME =
BUSY ̲TIME + Current Time - BUSY ̲START
OPERATION ̲QUEUE ̲LENGTH GT MAX ̲QUEUE ̲LENGTH?
MAX ̲QUEUE ̲LENGTH = OPERATION ̲QUEUE
̲LENGTH
RETURN
Figure 4.2.1.4.1.5-3…01…Update Statistics After Flowgram
4.2.1.4.2 S̲t̲o̲r̲a̲g̲e̲ ̲M̲o̲n̲i̲t̲o̲r̲i̲n̲g̲ ̲a̲n̲d̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲M̲o̲d̲u̲l̲e̲
4.2.1.4.2.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The module performs the commands
- Get Storage Occupancy
- Get Threshold Warning
- Get Statistics
- Change Warning Threshold
- Get Trheshold
- Get Resource State
4.2.1.4.2.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module has 6 interfaces:
a) G̲e̲t̲ ̲S̲t̲o̲r̲a̲g̲e̲ ̲O̲c̲c̲u̲p̲a̲n̲c̲y̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Performs the command Get Storage Occupancy.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲STORAGE ̲OCCUPANCY
b) G̲e̲t̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲ ̲W̲a̲r̲n̲i̲n̲g̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Performs the command Get Threshold Warning:
If a threshold is pending, it returns a reply.
Otherwise the operation is queued.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲THRESHOLD ̲WARNING
C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲
repeated command
c) G̲e̲t̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Performs the command Get Statistics.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲STATISTICS
C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲
buffer size error
d) C̲h̲a̲n̲g̲e̲ ̲W̲a̲r̲n̲i̲n̲g̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Perform the command Change Warning Threshold
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
CHANGE ̲WARNING ̲THRESHOLD
e) G̲e̲t̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Perform the Get Threshold Command.
If the parameter NEW, specified in operation, is
true the operation is queued until a threshold
occurs.
If NEW = false and a threshold is pending it returns
a reply. If not the operation is queued.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲THRESHOLD
C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲
Repeated command.
f) G̲e̲t̲ ̲R̲e̲s̲o̲u̲r̲c̲e̲ ̲S̲t̲a̲t̲e̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Perform the Get Resource State command.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲RESOURCE ̲STATE
4.2.1.4.2.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of the following procedures:
- Get Storage Occupancy
- Get Threshold Warning
- Get Statistics
- Change Warning Threshold
- Get Threshold
- Get Resource State
- Send Threshold
- Update State
4.2.1.4.2.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list.
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) FREE ̲STS ̲BLOCKS
b2) ITS ̲FREE ̲SECTORS
b3) STS ̲WARNING ̲PENDING (m)
b4) ITS ̲WARNING ̲PENDING (m)
b5) MEMORY ̲WARNING ̲PENDING (m)
b6) PENDING ̲THRESHOLD ̲WARNING (m)
b7) OPERATION (m)
b8) CC (m)
b9) SECTOR ̲STATISTICS (m)
b10) COMMAND ̲STATISTICS (m)
Figure 4.2.1.4.2.3-1
Storage Monitoring and Statistics Control Flow
4.2.1.4.2.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Reply Command Large 4.1.7.2.1.3
- MMS Send Words 4.1.5.11
a) G̲e̲t̲ ̲S̲t̲o̲r̲a̲g̲e̲ ̲O̲c̲c̲u̲p̲a̲n̲c̲y̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Put FREE ̲STS ̲BLOCKS and ITS ̲FREE ̲SECTORS/BLOCKSIZE
into reply. Set CC = OK and return.
Flowgram: None
b) G̲e̲t̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲ ̲W̲a̲r̲n̲i̲n̲g̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
If there is a pending ITS warning, the corresponding
boolean is set to false, and a warning is returned.
Otherwise it is checked that there is not already
a pending operation, and the operation is set pending.
Flowgram: None.
c) G̲e̲t̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Calculates statistics figures and sends them in
reply trailer. Resets Sector and Command Statistics.
Flowgram: None.
d) C̲h̲a̲n̲g̲e̲ ̲W̲a̲r̲n̲i̲n̲g̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲ ̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
STS and ITS warning thresholds are changed according
to received values.
Flowgram: None.
e) G̲e̲t̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
If there is a pending warning, the corresponding
boolean is set to false, and a warning is returned.
Otherwise it is checked that there is not already
a pending operation, and the operation is set to
pending.
Flowgram: None
f) G̲e̲t̲ ̲R̲e̲s̲o̲u̲r̲c̲e̲ ̲S̲t̲a̲t̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The number of free resources are calculated and
the resource level is calculated. The level can
be NORMAL, WARNING or CRITICAL. The result is returned
for each resource type.
Flowgram: None
g) S̲e̲n̲d̲ ̲T̲h̲r̲e̲s̲h̲o̲l̲d̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
If any Get Threshold command is pending a reply
is returned. Otherwise threshold pending info corresponding
to actual resource type is updated.
Flowgram: None
h) U̲p̲d̲a̲t̲e̲ ̲S̲t̲a̲t̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The number of free elements for the specified resource
type is counted. The resulting resource level is
stored in RESOURCE ̲STATE.LEVEL.
Flowgram: None
4.2.1.4.3 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲M̲o̲d̲u̲l̲e̲
4.2.1.4.3.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Initializes all control variables of MMS at FMS process
start time. The MMS initialization procedures are called
by FMS Initialization Module, refer (d) 3.1.1.
Refer also 4.2.4.4.6.
4.2.1.4.3.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module has two Package Interface:
- Init MM
- MM Size
4.2.1.4.3.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of 4 procedures,
Init MM
MM ̲SIZE
Init Pool
Update Res Pool
4.2.1.4.3.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
MH ̲COROUTINES
RESOURCE ̲POOL (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None
4.2.1.4.3.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
None
a) I̲n̲i̲t̲ ̲M̲M̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Initializes the coroutines. All the coroutines,
the Disk Purge Coroutine included, are added to
the FMS process. Initializes control block pools
and lock descriptors.
Creates and initialies the data segments necessary
to hold the required no. of CIFCB's, VCB's, and
ADBCB's.
b) M̲M̲ ̲S̲I̲Z̲E̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Calculates the no of words required by MMS for
control blocks.
c) I̲n̲i̲t̲ ̲P̲o̲o̲l̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
This procdure initialies control block pools -
CIFCB ̲POOL, VCB ̲POOL, and CIF ̲ADDRESS ̲BLOCK ̲POOL.
d) U̲p̲d̲a̲t̲e̲ ̲R̲e̲s̲o̲u̲r̲c̲e̲ ̲P̲o̲o̲l̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Updates the resource element for the specified
resource pool type.
4.2.1.5 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
N/A
4.2.1.6 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲s̲
N/A
4.2.1.7 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
N/A
4.2.2 C̲I̲F̲ ̲H̲a̲n̲d̲l̲i̲n̲g̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲
4.2.2.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The subpackage takes care of the management of CIFs,
their views and fields, and the management of Short
Term Storage resources.
4.2.2.1.1 C̲I̲F̲ ̲C̲r̲e̲a̲t̲i̲o̲n̲
Creates new CIFs in STS, either on request from application
processes by commands
- Create CIF
- Create New CIF Version
or on request from other subpackages.
Refer 4.2.2.4.1.
4.2.2.1.2 V̲i̲e̲w̲ ̲C̲r̲e̲a̲t̲i̲o̲n̲
Creates new views. Performs the command
- Create View
Refer 4.2.2.4.2.
4.2.2.1.3 C̲I̲F̲ ̲a̲n̲d̲ ̲V̲i̲e̲w̲ ̲D̲e̲l̲e̲t̲i̲o̲n̲
Performs the command
Remove View,
and performs CIF and View deletion on request from
other subpackages.
Refer 4.2.2.4.3
4.2.2.1.4 L̲o̲o̲k̲u̲p̲ ̲a̲n̲d̲ ̲L̲o̲c̲k̲
Performs functions connected to Passive Handles and
to CIF activation. Performs the commands
- Lock View
- Unlock View
- Lookup
- Stop CIF
Refer 4.2.2.4.4
4.2.2.1.5 V̲i̲e̲w̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲
Performs the functions
- Get View Attribute and
- Change Attributes
Refer 4.2.2.4.5
4.2.2.1.6 F̲i̲e̲l̲d̲ ̲H̲a̲n̲d̲l̲i̲n̲g̲
Performs the handling of fields connected to the command
Create Field
and to the functions performed by other CIF Handling
modules. Extension of fields in connection with write
View command is also performed by this module.
Refer 4.2.2.4.6.
4.2.2.1.7 S̲t̲o̲r̲a̲g̲e̲ ̲M̲a̲n̲a̲g̲e̲m̲e̲n̲t̲
S̲hort T̲erm S̲torage is part of an ordinary contiguous
file allocated by FMS. Refer 2.2.1.8 and 4.1.4.4.
Apart from initial allocation of the file, FMS does
not access STS. The size of STS is a system generation
parameter.
The STS Storage Management utilizes a two level storage
allocation scheme using blocks and sectors. STS is
subdivided into blocks of equal size. A block consists
of a number of sectors, each of 512 bytes. A sector
is the smallest addressable unit on a disk volume.
The blocksize is a compile Constant and may range from
2 to 8 sectors. For CAMPS the value is 8.
STS contains NO OF STS BLOCKS blocks.
4.2.2.1.7.1 S̲h̲o̲r̲t̲ ̲T̲e̲r̲m̲ ̲S̲t̲o̲r̲a̲g̲e̲ ̲A̲l̲l̲o̲c̲a̲t̲i̲o̲n̲
This section describes the allocation and deallocation
of blocks in STS.
Free blocks are described in the F̲ree B̲lock M̲ap. FBM
is a bit array of length NO OF BLOCKS. The bit corresponding
to a block is set, if the block is not allocated to
a CIF.
When storage is allocated to a CIF, either when the
CIF is created or when it is extended, one or more
blocks are allocated and reserved for the CIF. The
blocks allocated to a CIF are described in the CIF
Block List of the CIF. When blocks are deallocated
from a CIF, they may be freed at once, and thus transferred
to FBM. The blocks may, however, be subject to purge
before reuse. Blocks which must be purged are described
in the P̲urge B̲lock M̲ap, which is a bit array of length
NO OF BLOCKS. When the block has actually been purged,
it is transferred from PBM to FBM. Refer 4.2.2.1.8.
Each block is at a given time in one of the following
states:
a) Allocated to a CIF
b) Free
c) Subject to Purge
Block state transitions are shown on figure 4.2.2.1.7-1.
Fig. 4.2.2.1.7-1…01…Block State Transitions
4.2.2.1.7.2 C̲I̲F̲ ̲S̲t̲o̲r̲a̲g̲e̲ ̲A̲l̲l̲o̲c̲a̲t̲i̲o̲n̲
This section describes management of the blocks which
are allocated to a CIF. The main issue is allocation
of sectors to fields within the CIF.
The blocks allocated to a CIF are described in the
C̲IF B̲LOCK L̲IST of the CIF Control Block refer 4.1.4.3.3.1.
Each allocated block consists of a number of sectors.
A sector in an allocated block may at a given time
either be used or unused. A used sector is allocated
to one of the fields of the CIF. The CIF Block List
contains a Block Sector Map for each allocated block.
The map is a bit array of length NO OF SECTORS IN BLOCK.
The bit corresponding to a sector is set to one if
the sector is used.
A field consists of a number (possibly zero) of sectors.
New sectors may be added to the field, either at field
creation time or when the field must be extended. Sectors
to be allocated to a field are taken from the unused
sectors of blocks allocated to the CIF. If necessary,
the CIF is extended by allocation of one or more new
blocks.
When sectors are allocated to a field, they will be
selected in such a way that they are physically as
close as possible to each other. A close allocation
can in particular be achieved, if space is "preallocated"
to the fields. This means that it is specified in one
of the commands CREATE CIF, CREATE NEW CIF VERSION,
CREATE VIEW, CREATE FIELDS, that initial space shall
be allocated at creation time. This preallocation does
not exclude possibility of subsequent extension, but
it increases the likelihood of a physically close allocation.
Extension of a field is done automatically as part
of the WRITE VIEW command.
Sectors and blocks are deallocated as part of the REMOVE
VIEW and SAVE commands. Deallocation of a sector will
change its state to unused. When all sectors within
a block have been deallocated, the block is deallocated
from the CIF.
4.2.2.1.8 D̲i̲s̲k̲ ̲B̲l̲o̲c̲k̲ ̲P̲u̲r̲g̲e̲
Disk blocks containing information of a security profile
higher than a "purge profile" specified at system generation
time shall be purged when deallocated. Purge of a disk
block consists of overwriting the block a specified
number of times with a random pattern.
The security profile of an allocated block is by definition
the profile of the CIF to which the block is allocated.
Non-recoverable CIFs are lost after a system start,
and so is information about security profile of blocks
belonging to those CIFs. For this reason all non-recovered
blocks will be purged after a system start.
Blocks which are subject to purge will be entered into
the Purge Block Map, PBM. When purge of a block has
been performed, the block will be transferred to Free
Block Map, FBM. After a system start and the associated
recovery phase, FBM will be empty while PBM will contain
all non-allocated blocks.
Deallocated sectors will not be purged separately,
as they still belong to the same CIF and may thus only
be reused for information of same security profile.
Disk block Purge is performed by the Purge Module,
refer 4.2.2.4.8.
4.2.2.1.9 I̲n̲i̲t̲i̲a̲l̲i̲z̲a̲t̲i̲o̲n̲ ̲a̲n̲d̲ ̲R̲e̲c̲o̲v̲e̲r̲y̲
Initialization and Recovery of CIFs in ITS is the responsibility
of the Checkpoint and Recovery Subpackage.
4.2.2.1.10 E̲r̲r̲o̲r̲ ̲H̲a̲n̲d̲l̲i̲n̲g̲
Parameter errors in application process calls are returned
as completion codes.
Disk errors on mirrored disk result in a retire of
the FMS process.
The subpackage controls that the size constraints of
CIFs specified in 2.3.3.1 are not violated. Normal
Completion Codes are returned in case of violation.
4.2.2.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
The subpackage consists of a set of procedures, refer
module specification 4.2.2.4.1 to 4.2.2.4.7, and one
coroutine, refer 4.2.2.4.8.
4.2.2.3 D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲
Refer 4.1.3.
4.2.2.4.1 C̲I̲F̲ ̲C̲r̲e̲a̲t̲i̲o̲n̲ ̲M̲o̲d̲u̲l̲e̲
4.2.2.4.1.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The module performs the commands CREATE CIF and CREATE
NEW CIF VERSION, and performs creation of CIFs in STS
on behalf of other subpackages.
4.2.2.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲s̲
The module has 3 subpackage interfaces:
- Create CIF refer 4.2.2.7.1
- Create New CIF Version refer 4.2.2.7.2
- Generate CIFCB refer 4.2.2.7.12
4.2.2.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of 5 procedures:
a) Create CIF
b) Create New CIF Version
c) Generate CIFCB
d) Initialize CIFCB
e) Generate Address List
4.2.2.4.1.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list.
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) CIF ̲CONTROL ̲BLOCK (m)
b2) ATTRIBUTES (m)
b3) ADDRESS ̲ELEMENT (m)
b4) OPERATION (m)
b5) CC (m)
b6) CURRENT ̲CIF ̲REF ̲NO (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None
4.2.2.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Get CIF 4.1.5.1
- Open CIF 4.1.5.2
- Close CIF 4.1.5.3
- MM Receive Words 4.1.5.11
- Put Attributes 4.2.2.4.5.2 e)
- Delete CIFCB 4.2.2.4.3.3
- Allocate 4.2.2.4.9.3
- Deallocate 4.2.2.4.9.3
- Generate VCB 4.2.2.4.2.3
- Put in Address Element 4.2.2.4.7.3
- Compute Object Reference 4.1.5
RECEIVE ̲WORDS
PUT ̲ATTRIBUTES
CREATE DELETE ̲CIFCB
CIF GENERATE ̲VCB
ALLOCATE
DEALLOCATE
GENERATE ̲ INITIALIZE
CIFCB CIFCB
CREATE GENERATE ̲ ALLOCATE
NEW ̲CIF ̲ ADDRESS ̲ PUT ̲IN ̲
VERSION…02… LIST ADDR ̲ELEMENT
GET ̲CIF ̲
OPEN ̲CIF ̲
CLOSE ̲CIF
Figure 4.2.2.4.1.3-1
CIF Creation Control Flow
a) C̲r̲e̲a̲t̲e̲ ̲C̲I̲F̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Generates a CIF according to attributes. Updates
reply and CC and Sends attributes to caller.
Flowgram: Refer figure 4.2.2.4.1.5-1
b) C̲r̲e̲a̲t̲e̲ ̲N̲e̲w̲ ̲C̲I̲F̲ ̲V̲e̲r̲s̲i̲o̲n̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Generates a new version of referenced CIF. It is
first checked that conditions are fulfilled for
the new version to be generated. Updates reply
and CC, and sends attributes to caller.
Flowgram: Refer figure 4.2.2.4.1.5-2.
c) G̲e̲n̲e̲r̲a̲t̲e̲ ̲C̲I̲F̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Generates the memory resident control structures
for a new CIF, according to the contents of ATTRIBUTES.
Flowgram: Refer figure 4.2.2.4.1.5-3.
d) I̲n̲i̲t̲i̲a̲l̲i̲z̲e̲ ̲C̲I̲F̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲
PROCEDURE INITIALIZE ̲CIFCB(CIFCB)
Initialize the CIF Control Block with:
CIF ̲REFERENCE ̲NUMBER = 0
VERSION = 1
MAX ̲VIEW = 0
STORE ̲TIME = 0
RETRIEVAL ̲STATUS = FALSE
RECOVERY ̲STATUS = FALSE
STATE = ACTIVE
STOPPED ̲STATUS = FALSE
LATEST ̲VERSION = TRUE
ADDRESS ̲MODE = TRUE
CHECKPOINT ̲STATUS = FALSE
LOCK ̲COUNT = 0
VIEW ̲LIST = NIL
ADDRESS ̲LIST = NIL
Flowgram: None.
e) G̲e̲n̲e̲r̲a̲t̲e̲ ̲A̲d̲d̲r̲e̲s̲s̲ ̲L̲i̲s̲t̲
PROCEDURE GENERATE ̲ADDRESS ̲LIST(CIFCB)(CC):ERROR
̲OK
Generates an initial address list for the CIF by:
- Generate an address element and chain to ADDRESS
̲LIST.
- Generate empty BLOCK ̲LIST ̲ELEMET
- Generate empty Field Descriptor for each Field
Group in Attributes. The first Field Information
with REFERENCED = FALSE specifies the end of
Field information, except if all 12 elements
have REFERENCED = TRUE
- Initialize FIELD ̲GROUP ̲TYPES of CIFCB according
to ATTRIBUTES
- Insert NUMBER ̲OF ̲FIELD ̲GROUPS into CIFCB
Error return with CC = FIELD ̲INFO ̲ERROR, if any
parameter errors.
Flowgram: None.
PROCEDURE CREATE ̲CIF
RECEIVE ̲WORDS(ATTRIBUTES, ATTRIBUTES ̲LENGTH)
CASE GENERATE ̲CIFCB()(CIFCB,CC):ERROR ̲OK
ERROR?
END CASE
Move PROFILE and SEC ̲PROFILE from OPERATION to CIFCB
CIFCB.FIELD ̲GROUP ̲TYPES EQ 0?
CIFCB.CIF ̲REFERENCE ̲NUMBER =
INCREMENT(CURRENT ̲CIF ̲REF ̲NO)
VCB = CIFCB.VIEW ̲LIST
PUT ̲ATTRIBUTES (VCB)
COMPUTE ̲OBJ ̲REF (VCB ̲POOL, VCB)(INDEX(VCB))
Put into reply: Index (VCB), CIF ̲ID
CC = OK
RETURN
Figure 4.2.2.4.1.5-1
Create CIF Flowgram
PROCEDURE CREATE ̲NEW ̲CIF ̲VERSION
CASE GET ̲CIF()(CIFCB,VCB,CC): ERROR ̲OK
ERROR?
END CASE
CASE OPEN ̲CIF(CIFCB,FALSE)(LOCK,CC): ERROR ̲OK
ERROR?
END CASE
CIFCB.FIELD ̲GROUP ̲TYPES EQ 0? CC = CIF ̲NOT ̲PERMANENT
CIFCB.LATEST ̲VERSION NE TRUE? CC = NOT ̲LATEST ̲VERSION
CIFCB.STOPPED ̲STATUS EQ TRUE? CC = STOPPED
CIFCB.LATEST ̲VERSION = FALSE
MMS ̲RECEIVE ̲WORDS(ATTRIBUTES,ATTRIBUTES ̲LENGTH)
Move from CIFCB to ATTRIBUTES:
FIELD ̲GROUP ̲TYPES,FIELD ̲INFO ̲ELEMENT.REFERENCED
CASE GENERATE ̲CIFCB()(NEW ̲CIFCB,CC):ERROR ̲OK
ERROR?
END CASE
Move from CIFCB to NEWCIFCB:
PROFILE,SEC ̲PROFILE,CIF ̲ID,RECOVERY ̲STATUS
NEWCIFCB.LATEST ̲VERSION=TRUE,INCREMENT(NEWCIFCB.VERSION)
VCB = CIFCB.VIEW ̲LIST
PUT ̲ATTRIBUTES(VCB)
COMPUTE ̲OBJ ̲REG (VCB ̲POOL, VCB)(INDEX(VCB))
Put into reply: Index(VCB),CIF ̲ID
CC = OK
CLOSE ̲CIF(LOCK)
RETURN
Figure 4.2.2.4.1.4-2…01…Create New CIF Version Flowgram
PROCEDURE GENERATE ̲CIFCB()(CIFCB,CC):ERROR ̲OK
ALLOCATE(CIFCB ̲POOL)(CIFCB)
INITIALIZE ̲CIFCB(CIFCB)
CASE GENERATE ̲ADDRESS ̲LIST(CIFCB)(CC): ERROR ̲OK
ERROR? DEALLOCATE(CIFCB ̲POOL,CIFCB)
END CASE
CASE GENERATE ̲VCB(CIFCB,0)(VCB,CC):ERROR ̲OK
ERROR? DELETE ̲CIFCB(CIFCB)
END CASE
CC = OK, EXITNO = OK EXITNO
=
ERROR
RETURN
Figure 4.2.2.4.1.5-3…01…Generate CIFCB Flowgram
4.2.2.4.2 V̲i̲e̲w̲ ̲C̲r̲e̲a̲t̲i̲o̲n̲ ̲M̲o̲d̲u̲l̲e̲
4.2.2.4.2.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The module handles the command CREATE VIEW and generates
View Control Structures on behalf of CIF Creation Module.
4.2.2.4.2.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module has two subpackage interfaces:
a) Create View, Refer 4.2.2.7.3
b) Make CIF Permanent Refer 4.2.2.7.19
and one additional interface.
c) G̲e̲n̲e̲r̲a̲t̲e̲ ̲V̲i̲e̲w̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Generates a new View Control Block with fields
as specified in ATTRIBUTES, and chain it to the
specified CIF Control Block.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GENERATE ̲VCB (CIFCB: CIF ̲CONTROL ̲BLOCK
PREV ̲VIEW: VIEW ̲ID)
(VCB: VIEW ̲CONTROL ̲BLOCK,
CC: COMPLETION ̲CODE): ERROR
̲OK
4.2.2.4.2.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of 3 procedures:
- Create View
- Make CIF Permanent
- Generate View Control Block
Figure 4.2.2.4.2.3-1
View Creation Control Flow
4.2.2.4.2.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list.
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) CIF ̲CONTROL ̲BLOCK (m)
b2) VIEW ̲CONTROL ̲BLOCK (m)
b3) ATTRIBUTES (m)
b4) OPERATION (m)
b5) CC (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None
4.2.2.4.2.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Get CIF 4.1.5.1
- Open CIF 4.1.5.2
- Close CIF 4.1.5.3
- MMS ̲Receive Words 4.1.5.11
- Put Attributes 4.2.2.4.5.2 c
- Allocate 4.2.2.7.17
- Deallocate 4.2.2.7.18
- Define Fields 4.2.2.4.6.2 c)
a) C̲r̲e̲a̲t̲e̲ ̲V̲i̲e̲w̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Performs the command CREATE VIEW, based on ATTRIBUTES
Flowgram: Figure 4.2.2.4.2.5-1
b) G̲e̲n̲e̲r̲a̲t̲e̲ ̲V̲i̲e̲w̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲B̲l̲o̲c̲k̲
Allocates a View Control Block and initializes
it. Then defines the fields of the view according
to Field Information in ATTRIBUTES.
Flowgram: Figure 4.2.2.4.2.5-2
c) M̲a̲k̲e̲ ̲C̲I̲F̲ ̲P̲e̲r̲m̲a̲n̲e̲n̲t̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Field Group Types of CIFCB is adjusted according
to View attributes. CURRENT ̲CIF ̲REF ̲NO is incremented
and inserted in CIFCB together with version = 1.
Flowgram: none
PROCEDURE CREATE ̲VIEW
CASE GET ̲CIF()(CIFCB,VCB,CC): ERROR ̲OK
ERROR?
END CASE
CASE OPEN ̲CIF(CIFCB,FALSE)(LOCK,CC): ERROR ̲OK
ERROR?
END CASE
CIFCB.MAX ̲VIEW EQ MAX ̲VIEWS?
CC = VIEW ̲ID ̲OVERFLOW
MMS ̲RECEIVE ̲WORDS(ATTRIBUTES,ATTRIBUTES ̲LENGTH)
CASE GENERATE ̲VCB(CIFCB,VCB)
(NEWVCB,CC): ERROR ̲OK
ERROR?
END CASE
PUT ̲ATTRIBUTES(NEW VCB)
COMPUTE ̲OBJ ̲REF (VCB ̲POOL, VCB)(INDEX)
PUT Index of NEWVCB into reply
CC = OK
CLOSE ̲CIF(LOCK)
RETURN
Figure 4.2.2.4.2.5-1…01…Create View Flowgram
PROCEDURE GENERATE ̲VCB(CIFCB,PREV ̲VIEW)(VCB,CC): ERROR
̲OK
ALLOCATE(VCB ̲POOL)(VCB)
Initialize VCB: CHECKPOINT ̲STATUS = STORE ̲STATUS
= FALSE,
ACTIVE ̲HC = 1, PASSIVE ̲HC = 0
All Field References = 0
PRED ̲VIEW ̲ID = PREV ̲VIEW
VCB.CIFCB = CIFCB
CASE DEFINE ̲FIELDS(VCB,TRUE)(CC): ERROR ̲OK
ERROR? - DEALLOCATE(VCB ̲POOL, VCB)
END CASE
INCREMENT(CIFCB.MAX ̲VIEW)
VCB.VIEW ̲ID = CIFCB.MAX ̲VIEW
CHAIN VCB to CIFCB.VIEW ̲LIST
CC = OK, EXITNO = OK EXIT = ERROR
RETURN(EXITNO)
Figure 4.2.2.4.2.5-2…01…Generate View Control Block Flowgram
4.2.2.4.3 C̲I̲F̲ ̲a̲n̲d̲ ̲V̲i̲e̲w̲ ̲D̲e̲l̲e̲t̲i̲o̲n̲ ̲M̲o̲d̲u̲l̲e̲
4.2.2.4.3.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
This module performs the command REMOVE VIEW and contains
in addition a number of service procedures used by
other modules and subpackages for CIF and VIEW deletion.
Additionally the CHECK DELETION command is processed.
4.2.2.4.3.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module contains 4 subpackage interfaces:
a) Remove View refer 4.2.2.7.4
b) Check Passivation refer 4.2.2.7.13
c) Delete View refer 4.2.2.7.14
c1) Check Deletion refer 4.2.2.7.18
and 3 additional interfaces:
d) D̲e̲l̲e̲t̲e̲ ̲C̲I̲F̲ ̲f̲r̲o̲m̲ ̲S̲T̲S̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The STS disk area occupied by the specified CIF
is released and possibly purged. The memory control
structures are not affected.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
DELETE ̲CIF ̲FROM ̲STS (CIFCB: CIF ̲CONTROL ̲BLOCK)
e) R̲e̲m̲o̲v̲e̲ ̲C̲I̲F̲C̲B̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
Deallocates a CIF Control Block and its associated
View Control Block and Address Elements. The CIF
must have been opened, and the CIFCB reference
in Lock Descriptor is set to NIL. The disk area
occupied by the CIF must have been deallocated
previously.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
REMOVE ̲CIFCB(LOCK: LOCK ̲DESCRIPTOR)
f) D̲e̲l̲e̲t̲e̲ ̲C̲I̲F̲C̲B̲
F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
As Remove CIFCB, except that the CIF must not have
been opened.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
DELETE ̲CIFCB(CIFCB: CIFCB ̲CONTROL ̲BLOCK)
4.2.2.4.3.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of 9 procedures:
- Remove Field Reference
- Remove View
- Check Passivation
- Delete View
- Delete CIF from STS
- Remove CIFCB
- Delete CIFCB
- Get Handle Count
- Check Deletion
4.2.2.4.3.4 D̲a̲t̲a̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list.
Figure 4.2.2.4.3.3-1
CIF and View Deletion Control Flow
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) CIF ̲CONTROL ̲BLOCK (m)
b2) VIEW ̲CONROL ̲BLOCK (m)
b3) LOCK ̲DESCRIPTOR (m)
b4) ADDRESS ̲ELEMENT
b5) FIELD ̲DESCRIPTOR (m)
b6) OPERATION (m)
b7) CC (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None
4.2.2.4.3.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Get CIF 4.1.5.1
- Open CIF 4.1.5.2
- Close CIF 4.1.5.3
- Unload 4.2.3.7.7
- Passivate 4.2.4.7.11
- Release STS Block 4.2.2.4.7.2 c)
- Deallocate 4.2.2.4.9.2b
- Get Field Descriptor 4.2.2.4.5.2f
- Remove Addr Element 4.2.2.4.7.2
- Next Addr Element 4.2.2.4.5.2d
- Release Sector 4.2.2.4.7.2b
a) R̲e̲m̲o̲v̲e̲ ̲V̲i̲e̲w̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The procedure opens the CIF and removes an Active
Handle for the specified view. Then checks, if
one of the following actions shall be performed:
- The view shall be deleted, because Handle Count
is zero, and the view has not been stored.
- The CIF shall be unloaded, because total Handle
Count is zero
- The CIF shall be made passive, because Active
Handle Count is zero, but there are still passive
handles
Flowgram: Figure 4.2.2.4.3.5-1
b) C̲h̲e̲c̲k̲ ̲P̲a̲s̲s̲i̲v̲a̲t̲i̲o̲n̲
Flowgram: Figure 4.2.2.4.3.5-2
c) D̲e̲l̲e̲t̲e̲ ̲V̲i̲e̲w̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The procedure deletes a view which shall not be
retained for UNLOAD purposes.
The list of Fields of the CIF is inspected.
For each field referenced by the view, Remove Field
Reference is called.
Finally the VCB is unchained from the CIFCB View
List and released to the pool of free VCBs.
Flowgram: Figure 4.2.2.4.3.5-3
d) D̲e̲l̲e̲t̲e̲ ̲C̲I̲F̲ ̲F̲r̲o̲m̲ ̲S̲T̲S̲
Inspects the Block List of the CIF. For each block
occupied, the procedure Release STS Block is called.
Flowgram: None
e) R̲e̲m̲o̲v̲e̲ ̲C̲I̲F̲C̲B̲
The CIFCB referenced by Lock Descriptor is removed
by calling Delete CIFCB. Then LOCK.CIFCB is set
to NIL.
Flowgram: None
f) D̲e̲l̲e̲t̲e̲ ̲C̲I̲F̲C̲B̲
Each VCB in CIFCB.VIEWLIST is deallocated to VCB
̲POOL. Each Address Element in CIFCB.ADDRESS ̲LIST
is deallocated to ADDRESS ̲ELEMENT ̲POOL. Finally
CIFCB is deallocated to CIFCB ̲POOL.
Flowgram: None
g) G̲e̲t̲ ̲H̲a̲n̲d̲l̲e̲ ̲C̲o̲u̲n̲t̲
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲HANDLE ̲COUNT(CIFCB: CIF ̲CONTROL ̲BLOCK)
(AHC,
PHC: HANDLE ̲COUNT)
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Inspect all VCBs of CIFCB.VIEW ̲LIST, and accumulate
their Active and Passive Handle Counts.
h) C̲h̲e̲c̲k̲ ̲D̲e̲l̲e̲t̲i̲o̲n̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Checks wheather the next Remove View will result
in removal of the CIF from STS, i.e. wheather (AHC,
PHC) = (1,0).
C̲o̲m̲p̲l̲e̲t̲i̲o̲n̲ ̲C̲o̲d̲e̲
last handle
illegal view reference
nonexisting CIF
i) R̲e̲m̲o̲v̲e̲ ̲F̲i̲e̲l̲d̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The specified Field Descriptor is located. Its
reference count is decremented. If it becomes zero,
all sectors allocated to the field are released
by calling Release Sector. Finally the Field Reference
of VCB is set to zero.
PROCEDURE REMOVE ̲VIEW
CASE GET ̲CIF()(CIFCB, VCB,CC): ERROR ̲OK
ERROR?
END CASE
CASE OPEN ̲CIF(CIFCB,TRUE)(LOCK,CC): ERROR ̲OK
ERROR?
END CASE
DECREMENT(VCB.ACTIVE ̲HANDLE ̲COUNT)
VCB.STORAGE ̲STATUS EQ TRUE OR
VCB.ACTIVE ̲HANDLE ̲COUNT NE ZERO OR ?
VCV.PASSIVE ̲HANDLE ̲COUNT NE ZERO
DELETE ̲VIEW(VCB)
GET ̲HANDLE ̲COUNT(CIFCB)(AHC,PHC)
AHC + PHC EQ 0? UNLOAD(CIFCB)
DELETE ̲CIF ̲FROM ̲STS(CIFCB)
AHC EQ 0? PASSIVATE (CIFCB)
REMOVE ̲CIFCB(LOCK)
CC = OK
CLOSE ̲CIF (LOCK)
RETURN
REMOVE VIEW FLOWGRAM
FIGURE 4.2.2.4.3.5-1
PROCEDURE CHECK ̲PASSIVATION(CIFCB,LOCK)
GET ̲HANDLE ̲COUNT(CIFCB)(AHC,PHC)
AHC NE 0?
PASSIVATE (CIFCB)
REMOVE ̲CIFCB (LOCK)
CLOSE ̲CIF (LOCK)
RETURN
Figure 4.2.2.4.3.5-2…01…Check Passivation Flowgram
DELETE ̲VIEW(VCB:VIEW ̲CONTROL ̲BLOCK);
START
LOOP "through all field group
VCBF,RS EQ NOT ̲REF?
REMOVE ̲FIELD ̲REFERENCE(VCB,FG)
advance to next FG
FG EQ CIFCB.NO ̲OF ̲FGCC EXIT
END LOOP
DEALLOCATE (VCB)
RETURN
STOP
DELETE VIEW FLOWGRAM
FIGURE 4.2.2.4.3.5-3
4.2.2.4.4 L̲o̲o̲k̲u̲p̲ ̲a̲n̲d̲ ̲L̲o̲c̲k̲ ̲M̲o̲d̲u̲l̲e̲
4.2.2.4.4.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The module performs the following commands:
- LOCK VIEW
- UNLOCK VIEW
- LOOKUP
- STOP CIF
4.2.2.4.4.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module has 4 subpackage interfaces:
a) Lock View refer 4.2.2.7.5
b) Unlock View refer 4.2.2.7.6
c) Lookup refer 4.2.2.7.8
d) Stop CIF refer 4.2.2.7.7
4.2.2.4.4.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of 5 procedures
- Lock View
- Unlock View
- Lookup
- Stop CIF
- Get Active CIF
4.2.2.4.4.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list.
Figure 4.2.2.4.4.3-1
Lookup and Lock Control Flow
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) OPERATION (m)
b2) CC (m)
b3) CIF ̲CONTROL ̲BLOCK (m)
b4) VIEW ̲CONTROL ̲BLOCK (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None.
4.2.2.4.4.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Get CIF 4.1.5.1
- Open CIF 4.1.5.2
- Close CIF 4.1.5.3
- Put Attributes 4.2.2.4.5.2 c)
- Add Passive Handle 4.2.4.7.9
- Remove Passive Handle 4.2.4.7.10
- Set Stopped Status 4.2.4.7.12
- Search OCD 4.2.4.7.4
- Read Checkpoint 4.2.4.7.13
- Check View in Checkpoint 4.2.4.7.14
- Release Buffer 4.2.5.7.5
- Check CIF Status 4.2.4.7.15
- Activate CIF 4.2.4.7.8
- Reserve OCD
- Release OCD
- Impossible 4.1.5.4
a) L̲o̲c̲k̲ ̲V̲i̲e̲w̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Opens CIF with OCD reservation, checks that View
has been checkpointed. Then increments Passive
Handle Count in View Control Block, and in checkpoint
by calling checkpoint and recovery subpackage.
Flowgram: Figure 4.2.2.4.4.5-1
b) U̲n̲l̲o̲c̲k̲ ̲V̲i̲e̲w̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Opens CIF with OCD reservation. Checks that view
has been checkpointed, and that it has a non-zero
Passive Handle Count. Then decrements Passive Handle
Count in View Control Block, and in Checkpoint,
by calling Checkpoint and Recovery Subpackage.
Update reply with passive handle count.
Flowgram:
c) L̲o̲o̲k̲u̲p̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Locates the CIF and activates it by calling Get
Active CIF. If error, only CC is updated. Otherwise
Active Handle Count in VCB is updated, and reply
and attributes are generated.
Flowgram: None.
d) S̲t̲o̲p̲ ̲C̲I̲F̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Goes through all active CIF Control Blocks and
stops those having the specified CIF Reference
Number by setting the stopped status in CIFCB as
well as in checkpoint. CIF and OCD is reserved
for each CIF found. Note that it starts from beginning
of CIFCB Array each time a CIF has been stopped.
Flowgram: Figure 4.2.2.4.4.5-2
e) G̲e̲t̲ ̲A̲c̲t̲i̲v̲e̲ ̲C̲I̲F̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Reserve OCD and search specified CIF ID. If found,
and storage status is STS, the checkpoint is read,
and it is checked if specified View Id is contained
in checkpoint, and represents a View with non-zero
passive handle count. If the CIF is not active,
it is activated.
Now OCD is released and an attempt is made to open
the CIF and reserve OCD. If the attempt was not
successfull, the whole process is repeated.
The reason for the loop is that another command
may have made the CIF passive while current coroutine
was waiting for the CIF to be opened.
Flowgram: Figure 4.2.2.4.4.5-3
PROCEDURE LOCK ̲VIEW
CASE GET ̲CIF ()(CIFCB,VCB,CC): ERROR ̲OK
ERROR?
END CASE
CASE OPEN ̲CIF(CIFCB,TRUE)(LOCK,CC): ERROR ̲OK
ERROR?
END CASE
VCB.CHECKPOINT ̲STATUS EQ FALSE?
CC = VIEW ̲NOT ̲CHECKPOINTED
ADD ̲PASSIVE ̲HANDLE(CIFCB,VCB.VIEW ̲ID)
INCREMENT(VCB.PASSIVE ̲HANDLE ̲COUNT)
PUT VIEW ̲NAME from CIFCB,VCB into reply
CC = OK
CLOSE ̲CIF(LOCK)
RETURN
Figure 4.2.2.4.4.5-1…01…Lock View Flowgram
PROCEDURE STOP ̲CIF
DONE = FALSE
SEGMENT LOOG
FOR ALL SEGMENT DO
ENSURE ̲SEGMENT (SEGMENT ̲ID)
FOR ALL ELEMENTS IN SEGMENT DO
CIF REFERENCE NONE FOUND? EXIT
END SEGMENT LOOP
STOP ̲CIF LOOP
FOR ALL ELEMENTS IN CIFCB ̲ARRAY LOOP
CIFCB.STATE NE ACTIVE OR
CIFCB.CHECKPOINT ̲STATUS NE TRUE OR ?
CIFCB.STOPPED ̲STATUS EQ TRUE
CIFCB.CIF ̲REFERENCE ̲NUMBER NE
OPERATION.CIF ̲REFERENCE ̲NUMBER?
CASE OPEN ̲CIF(CIFCB,TRUE)(LOCK,CC): ERROR ̲OK
ERROR?
END CASE
CIFCB.STOPPED ̲STATUS = TRUE
SET ̲STOPPED ̲STATUS ̲IN ̲CHECKPOINT(CIFCB)
CLOSE ̲CIF(LOCK)
EXIT
LAST CIFCB? DONE = TRUE
END CIFCB ̲ARRAY LOOP
DONE EQ TRUE? EXIT
END STOP ̲CIF LOOP
CC = OK
RETURN
Figure 4.2.2.4.4.5-2…01…Stop CIF Flowgram
PROCEDURE GET ̲ACTIVE ̲CIF (VIEW ̲NAME)
(CIFCB,VCB,LOCK,CC): ERROR ̲OK
GET ACTIVE ̲CIF LOOP
RESERVE ̲OCD
CASE SEARCH ̲OCD(VIEW ̲NAME.CIF ̲ID)(ENTRY): ERROR ̲OK
ERROR? CC = UNKNOWN ̲VIEW ̲NAME
END CASE
ENTRY.STORAGE ̲STATUS NE STS? CC = CIF ̲NOT ̲IN ̲STS
READ ̲CHECKPOINT(ENTRY)(IO ̲BUF)
CASE CHECK ̲VIEW ̲IN ̲CHECKPOINT(IO ̲BUF,VIEW NAME.VIEW ̲ID
(AHC,PHC): ERROR ̲OK
ERROR? CC = UNKNOWN ̲VIEW ̲NAME
RELEASE ̲BUFFER(IO ̲BUF)
END CASE
PHC EQ 0? CC = NO ̲MATCHING ̲LOCK
RELEASE ̲BUFFER(IO ̲BUF)
CASE CHECK ̲CIF ̲STATUS(IO ̲BUF)(CIFCB): ERROR ̲OK
ERROR? ACTIVATE ̲CIF(IO ̲BUF)(CIFCB)
END CASE
RELEASE ̲BUFFER(IO ̲BUF)
RELEASE ̲OCD
CASE OPEN ̲CIF(CIFCB,TRUE)(LOCK,CC):ERROR ̲OK
ERROR?
END CASE
Search view in VCB list
CC = OK, EXITNO = OK, EXIT RELEASE ̲OCD, EXITNO=ERROR
END LOOP EXIT
RETURN
Figure 4.2.2.4.4.5-3
Get Active CIF Flowgram
4.2.2.4.5 V̲i̲e̲w̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲ ̲M̲o̲d̲u̲l̲e̲
4.2.2.4.5.1 F̲u̲n̲c̲t̲i̲o̲n̲a̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The module performs the commands GET VIEW ATTRIBUTES
and CHANGE ATTRIBUTES, and Sends View Attributes to
application process on request from the modules.
4.2.2.4.5.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module contains the following subpackage interfaces:
a) Get View Attributes refer 4.2.2.7.9
b) Change Attributes refer 4.2.2.7.10
c) Put Attributes refer 4.2.2.7.17
d) Next Addr Element
e) Prev Addr Element
f) Get Field Descriptor
g) Locate Field Descriptor
h) Find Field Descriptor
4.2.2.4.5.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
The module consists of the following procedues
a) Get View Attributes
b) Change Attributes
c) Put Attributes
d) Next Addr Element
e) Prev Addr Element
f) Get Field Descriptor
g) Locate Field Descriptor
h) Find Field Descriptor
4.2.2.4.5.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
a) D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
Refer source list.
SEND ̲WORDS
GET ̲FIELD ̲
DESCRIPTOR
GET ̲VIEW PUT ̲ NEXT ̲ADDR ̲
ATTRIBUTES ATTRIBUTES ELEMENT
PREV ̲ADDR ̲
ELEMENT
CHANGE ̲ GET ̲CIF
ATTRIBUTES OPEN ̲CIF
CLOSE ̲CIF
CHECK ̲ACCESS
Figure 4.2.2.4.5.3-1
View Attributes Control Flow
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
b1) OPERATION
b2) CC (m)
b3) CIF Control Block (m)
b4) VIEW ̲CONTROL ̲BLOCK
b5) FIELD ̲DESCRIPTOR
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
None
4.2.2.4.5.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
E̲x̲t̲e̲r̲n̲a̲l̲ ̲P̲r̲o̲c̲e̲d̲u̲r̲e̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
- Check Access (i) 4.1.1.10
- Open CIF 4.1.5.2
- Close CIF 4.1.5.3
- Get CIF 4.1.5.1
- MMS Send Words 4.1.5.11
a) G̲e̲t̲ ̲V̲i̲e̲w̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Opens the CIF and returns attributes to application.
Close the CIF.
Flowgram: None.
b) C̲h̲a̲n̲g̲e̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲
N̲a̲r̲r̲a̲t̲i̲v̲e̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
The CIF is located and opened. If CIFCB.SEC ̲PROFILE
is not contained in OPERATION.SECURITY ̲PROFILE,
the calling application must be trusted.
If all checks are positive the new profile and
security profile are inserted into CIFCB, which
is then closed.
Flowgram: Figure 4.2.2.4.5.5-1
c) P̲u̲t̲ ̲A̲t̲t̲r̲i̲b̲u̲t̲e̲s̲
View Attributes are collected from CIF Control
Block, View Control Block and Address List, and
sent to calling application.
Flowgram: Figure 4.2.2.4.5.5-2
d) N̲e̲x̲t̲ ̲A̲d̲d̲r̲ ̲E̲l̲e̲m̲e̲n̲t̲
Given an address element, the next in list is fetched.
e) P̲r̲e̲v̲ ̲A̲d̲d̲r̲ ̲E̲l̲e̲m̲e̲n̲t̲
Given an address element, the previous in list
is fetched.
f) G̲e̲t̲ ̲F̲i̲e̲l̲d̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲o̲r̲
The field descriptor identified by field group
and field id is fetched.
g) L̲o̲c̲a̲t̲e̲ ̲F̲i̲e̲l̲d̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲o̲r̲
The field descriptor corresponding to specified
NEW ̲
FG and NEW ̲FID is found and delivered.
If CURRENT ̲FID = 0 the field descriptor corresponding
to NEW ̲FG is delivered.
If NEW ̲FID = 0 first FID of field group is delivered.
If current FG is unequal 0 and NEW ̲FG = 0 next
field descrptor is delivered.
Current field descriptor must be described by
FD ̲ELEMENT ̲NO, FD, CURRENT ̲FG, VCB and FD ̲AB ̲ADDRESS.
On return FD ̲ELEMENT ̲NO, FD, and FD ̲AB
ADDRESS are updated.
h) F̲i̲n̲d̲ ̲F̲i̲e̲l̲d̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲o̲r̲
Find and check the field descriptor corresponding
to field group of current FSE. The search is forward
or backwards from the FD specified by
FD ̲ADDR.
If FG = 0 first field descriptor is delivered.
The FD ̲ADDR is updated with new FD.
The following checks are done:
- 1 LT FIELD ̲GROUP LE CIFCB.NO ̲OF ̲FG
- FG referenced by VCB and FID NE 0
- If CHECK ̲WRITE ̲ACCESS, the field must be included
with read access.
A CC is returned if any checks fails.
CHANGE ̲ATTRIBUTES
START
CASE GET ̲CIF () (CIFCB, VCB, CC): ERROR ̲OK
ERROR ?
END CASE
CASE OPEN ̲CIF (CIFCB, FALSE) (LOCK, CC): ERROR ̲OK
ERROR ?
END CASE
CIF's security profile contained in applications security profile
or application is trusted?
insert access and security
CC = SECURITY ̲VIOLATION profile into CIFCB
CC = OK
CLOSE ̲CIF (LOCK)
RETURN
STOP
Figure 4.2.2.4.5.5-1
Change Attributes Flowgram
PUT ̲ATTRIBUTES (VCB : VIEW ̲CONTROL ̲BLOCK)
START
initialize VIEW ̲ATTRIBUTES
with : access profile, CIF reference no,
CIF version, view id, retrieve status,
recovery info
FG ̲NO = O
LOOP through all field groups
INCREMENT (FG ̲NO)
put into VIEW ̲ATTRIBUTES:
REFERENCED, WRITE ̲ACCESS,
PERMANENT,
get relevant field descriptor
put in: ALLOCATED ̲LENGTH,
USED ̲LENGTH
EXIT FG ̲NO = MAX ̲FIELD ̲GROUPS
END LOOP field groups
MMS ̲SEND ̲WORDS (VIEW ̲ATTRIBUTES)
RETURN
STOP
Figure 4.2.2.4.5.5-2
Put Attributes Flowgram