top - download
⟦ccdbc5af9⟧ Wang Wps File
Length: 41786 (0xa33a)
Types: Wang Wps File
Notes: CPS/SDS/031
Names: »1578A «
Derivation
└─⟦023bb28d7⟧ Bits:30005809 8" Wang WCS floppy, CR 0114A
└─ ⟦this⟧ »1578A «
WangText
…00……00……00……00……00…#…02……00……00…#
#…05…#…06…"…08…"…0a…"…0b…"…00…" "…05…"…06…!…0b…!…0f…!…05…!…07… …09… …0b… …0d… …0f… …01…
…05… …07……1f……09……1f……0a……1f……0c……1f……0d……1f……0f……1f……01……1f…
…1f… …1f……07……1e……09……1e……0a……1e……0c……1e……0e……1e……00……1e… …1e……06……1e……86…1 …02… …02… …02…
…02…CPS/SDS/031
…02…RIM/820505…02……02…
STATISTICS
DETAILED DESIGN SPECIFICATION …02…CAMPS
4.2.1.5 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲-̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
Common sub-package data is specified in section
4.2.1.4.1.4. The STP shared data area in relation
to process data room is shown in figure 4.2.1.5-1.
Fig. 4.2.1.5-1…01…Layout of Protected Area of a Process
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̲
No common sub-package procedures have been identified
for the collect sub-package.
4.2.1.7 S̲u̲b̲-̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Refer to section 4.2.1.4.1.2 module interface and section
4.1.7.2.1 package collect interface.
4.2.2 S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲M̲a̲i̲n̲ ̲P̲r̲o̲g̲r̲a̲m̲ ̲S̲u̲b̲-̲P̲a̲c̲k̲a̲g̲e̲
This sub-package handles the main activities related
to the statistics i.e. dump of SDA, generation of statistics
and delivery of statistics.
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̲s̲
The functions performed are shown in figure 4.2.2.1-1
and are as follows:
- receive next QEL from STP time-out and request
queue
- detect type of QEL
- activation of sub-packages.
Fig. 4.2.2.1-1…01…FUNCTIONAL SPECIFICATIONS
4.2.2.1.1 R̲e̲c̲e̲i̲v̲e̲ ̲N̲e̲x̲t̲ ̲Q̲E̲L̲
Main control QELs are sent to the STP time-out
and request queue. QELs are received from this
queue by use of CSF QMON functions.
4.2.2.1.2 D̲e̲t̲e̲c̲t̲ ̲T̲y̲p̲e̲ ̲o̲f̲ ̲Q̲E̲L̲
QELs received in STP time-out request queue are
checked for type of QEL. Following types will be
recognized:
- 6 minutes interval time-out from CSF
- storage occupancy request from TEP
- delivery acknowledge
4.2.2.1.3 A̲c̲t̲i̲v̲a̲t̲i̲o̲n̲ ̲o̲f̲ ̲A̲c̲t̲i̲v̲i̲t̲y̲
If the QEL received is of type timeout, dump is
performed. Depending of time a number of activities
are activated. If time is equal to full hour:
- generation of hourly statistics
If time is equal to full day:
- hourly delivery
- previous day delivery
- generation of daily statistics
- current day delivery
If time is equal to full week:
- 7 day delivery
- previous week delivery
- generating weekly statistics
- current week delivery
If time is equal to full month (4 week)
- previous month (4 weeks) delivery
- generating month (4 weeks) statistics
- current month (4 weeks) delivery
The second kind of QEL detected is of the kind: storage
occupancy request. If this is detected, the delivery
sub-package, i.e. its storage occupancy module, is
started. If QEL is of delivery acknowledge the delivery
sub-package is activated. This causes the next statistics
CIF to be delivered to the printer process.
4.2.2.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
The software structure consists of one module performing
the functions:
- dump of SDA
- statistics generation
- statistics delivery
Refer to figure 4.2.2.2-1.
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̲
Control of this sub-package is achieved by the QELs
arriving in STPs time-out request queue and by return
code from the calling procedures. An overview diagram,
refer to figure 4.2.2.3-1, shows this control.
Figure 4.2.2.2-1…01…Main Program Software Structure
Figure 4.2.2.3-1
4.2.2.4 M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The Main Program Module is pertinent for the main
program sub-package.
4.2.2.4.1 M̲a̲i̲n̲ ̲P̲r̲o̲g̲r̲a̲m̲ ̲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̲
Refer to section 4.2.2.1
4.2.2.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
This module is being activated by either the timer
monitor, printer process or supervisor function
control sub-package. Invocation is via the return
call from receive first QEL to QMON.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
RECEIVE ̲FIRST ̲QEL (TRUE,STPRQ)
(STPRQ ̲ATTR,STPRQ,APP ̲Q,CC):ERROR
̲OK
Main program module activates the dump module by
calling the dump procedure STP ̲DUMP
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
STP ̲DUMP ( )( )
Main program module activates a number of generation
activities belonging to the statistics generation
sub-package. The procedure activation is:
PERFORM ̲GENERATION
(GENERATION:GENERATION ̲TYPE
PARAM:GENER ̲PARAM)
( )
Main program module activates a delivery procedures
belonging to the delivery sub-package. The procedure
activated is PERFORM ̲DELIVERY.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
PERFORM DELIVERY
(DELIVERY:DELIVERY ̲TYPE,
CURRENT ̲DELIVERY:CUR ̲DEL ̲TYPE
PARAMETER:DEL ̲PARAM)
( )
4.2.2.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Not applicable for the main program module.
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̲
TIME ̲TYPE refer to CPS/DBD/001 sec. 4.2
GENERATION ̲TYPE refer to sec. 4.1.4
DELIVERY ̲TYPE refer to sec. 4.1.4
QUEUE ̲REFERENCE refer to CPS/SDS/024 sec. 4.1.6.1.2.2
QEL ̲ATTRIBUTES refer to CPS/SDS/024 sec. 4.1.6.1.2.2
MAINTYPE,SUBTYPE,FLAGS refer to CPS/SDS/024 sec.
4.1.6.1.2.2
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
DELIVERY (m)
PARAMETER (m)
STPRQ ̲ATTR (m)
STPRQ (m)
APP ̲Q (m)
GENERATION (m)
PARAM (m)
STORAGE ̲OCC ̲DEL (m)
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
VAR STP ̲TIME = TIME ̲TYPE
VAR FULL ̲HOUR = INTEGER
VAR FULL ̲DAY = INTEGER
VAR STPRQ = QUEUE ̲REFERENCE
VAR STPRQ ̲ATTR = QEL ̲ATTRIBUTES
VAR TIMEOUT,
SUPERVISOR ̲COMMANDS,
ACK = MAINTYPE
VAR TIME ̲EVENT,
STORAGE ̲OCCUPANCY ̲REQUEST,
DELIVERY ̲ACK= SUBTYPE
VAR DELIVERY ̲TYPE= (DAILY,WEEKLY,MONTHLY,STORAGE
̲OCC ̲DEL)
VAR LAST ̲DELIVERY= (HOUR,
PREVIOUS ̲DAY,
CURRENT ̲DAY,
DAY,
PREVIOUS ̲WEEK,
CURRENT ̲WEEK,
PREVIOUS ̲MONTH,
CURRENT ̲MONTH)
VAR GENERATION ̲TYPE=(HSG,DSG,WSG,MSG)
VAR GENER ̲PARAM = INTEGER
VAR DEL ̲PARAM = INTEGER
CONST MAX ̲FIELD ̲DESCR ̲NO = 9
identifies the maximum number of field descriptors
in either one of the groups.
4.2.2.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Refer to flowgrams figure 4.2.2.4.1.5-1-1. QEL
is received from STPRQ. The type of QEL is detected,
either a timeout, storage occupancy or delivery
ack, and corresponding action performed.
If QEL is of type timeout the dump, may be generation
and delivery modules are called. If storage occupancy
the storage occupancy part of delivery module is
called. If delivery ack the delivery module is
called indicating that the next statistics CIF
shall be generated and sent.
MAIN ̲PROGRAM
INITIALIZE ̲STP(START ̲TYPE) (CC)
MAIN ̲PROGRAM LOOP
R̲E̲C̲E̲I̲V̲E̲ ̲Q̲E̲L̲ ̲F̲R̲O̲M̲
S̲T̲P̲R̲Q̲ ̲A̲P̲P̲ ̲Q̲
Select type of activity according to QEL received.
D̲E̲T̲E̲C̲T̲ ̲Q̲E̲L̲ ̲T̲Y̲P̲E̲
S̲E̲L̲E̲C̲T̲ ̲A̲C̲T̲I̲V̲I̲T̲Y̲
END MAIN ̲PROGRAM LOOP
Figure 4.2.2.4.1.5-1a
INITIALIZE ̲STP (INIT ̲TYPE: START ̲UP ̲TYPE)
(CC)
MON (STP, INITIALIZE, INIT ̲TYPE)
CASE INIT ̲TYPE OF
DEAD1: PERFORM ̲DEAD1 ̲INIT ( ) ( )
DEAD2: PERFORM ̲DEAD2 ̲INIT ( ) ( )
COLD: PERFORM ̲COLD ̲INIT ( ) ( )
WARM1: PERFORM ̲WARM1 ̲INIT ( ) ( )
WARM2: PERFORM ̲WARM2 ̲INIT ( ) ( )
END CASE
INIT ̲TIMEOUT ( ) ( )
RETURN
FIG. 4.2.2.4.1.5-1b
INIT ̲TIMEOUT ( ) ( )
INITIALIZE ̲REQUEST ̲TIME ̲PARAMS
CASE REQUEST ̲TIME ̲OUT (STP ̲PARAMS)
(CC):
ERROR:? ANALYZE ̲ERROR (CC,0)
OK?
END CASE
FIG. 4.2.2.4.1.5-c
R̲E̲C̲E̲I̲V̲E̲ ̲Q̲E̲L̲ ̲F̲R̲O̲M̲
S̲T̲P̲R̲Q̲ ̲A̲P̲P̲ ̲Q̲
CASE RECEIVE ̲FIRST ̲QEL (TRUE,STPRQ)
(STPRQ ̲ATTR,STPRQ,
APP ̲Q, CC):
ERROR ? ANALYSE ̲ERROR(CC,O)
OK ?
END CASE
Figure 4.2.2.4.1.5-2
D̲E̲T̲E̲C̲T̲ ̲Q̲E̲L̲ ̲T̲Y̲P̲E̲
S̲E̲L̲E̲C̲T̲ ̲A̲C̲T̲I̲V̲I̲T̲Y̲
STPRQ ̲ATTR.HEADER.MAIN ̲TYPE EQ
TIMEOUT? DO ̲TIMEOUT
STPRQ ̲ATTR.HEADER.MAIN ̲TYPE EQ
SUPERVISOR ̲COMMANDS?
STPRQ ̲ATTR.HEADER.SUBTYPE EQ
STORAGE ̲OCCUPANCY ̲REQUEST?
DO ̲STORAGE ̲OCCUPANCY
STPRQ ̲ATTR.HEADER.MAIN ̲TYPE EQ
ACK? STPRQ ̲ATTR.HEADER.SUBTYPE EQ
STP ̲ACK ̲DELIVERY?
DO ̲DELIVERY ̲ACK
OTHERS ERROR
Figure 4.2.2.4.1.5-3
T̲I̲M̲E̲O̲U̲T̲
STP ̲DUMP ( )( )
R̲E̲A̲D̲ ̲C̲U̲R̲R̲E̲N̲T̲ ̲T̲I̲M̲E̲
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲H̲O̲U̲R̲ ̲?̲ - PERFORM ̲GENERATION
(HSG, STP ̲TIME)()
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲4̲ ̲W̲E̲E̲K̲S̲ ̲?̲ - DELIVERY = MONTHLY
P̲E̲R̲F̲O̲R̲M̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲W̲E̲E̲K̲ ̲?̲ - DELIVERY = WEEKLY
P̲E̲R̲F̲O̲R̲M̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲D̲A̲Y̲?̲ - DELIVERY = DAILY
P̲E̲R̲F̲O̲R̲M̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
Figure 4.2.2.4.1.5-4
R̲E̲A̲D̲ ̲C̲U̲R̲R̲E̲N̲T̲ ̲T̲I̲M̲E̲
CASE READ ̲TIME (F ̲TIME ̲TYPE)
(STP ̲TIME,CC): ERROR ̲OK
ERROR?-ANALYSE ̲ERROR (CC, O)
OK ?
END CASE
STP ̲TIME contains current time
Figure 4.2.2.4.1.5-5
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲H̲O̲U̲R̲ ̲?̲
FULL ̲HOUR = (STP ̲TIME/36oo) * 3600
FULL ̲HOUR EQ STP ̲TIME?
full
hour
not full hour
Figure 4.2.2.4.1.5-6
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲4̲ ̲W̲E̲E̲K̲ ̲?̲
FULL ̲4WEEK = (STP ̲TIME/4*7*24*60*60) *4*7*24*60*60
FULL ̲4WEEK EQ STP ̲TIME?
not full 4 week full 4 week
Figure 4.2.2.4.1.5-7
P̲E̲R̲F̲O̲R̲M̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
PERFORM DELIVERY (DELIVERY, CURRENT ̲DELIVERY, STP ̲HOUR)()
STP ̲HOUR = STP ̲HOUR + 1
PERFORM DELIVERY (DELIVERY, CURRENT DELIVERY, STP HOUR)()
LAST ̲DELIVERY = HOUR
Figure 4.2.2.4.1.5-8
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲D̲E̲L̲I̲V̲E̲R̲Y̲
STP ̲HOUR = 1
STP ̲DAY = 1
CURRENT ̲DELIVERY = HOUR
Figure 4.2.2.4.1.5-9
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲W̲E̲E̲K̲ ̲?̲
FULL ̲WEEK = (STP ̲TIME/7*24*60*60) *7*24*60*60
FULL ̲WEEK EQ STP ̲TIME?
not full week
full week
Figure 4.2.2.4.1.5-10
T̲I̲M̲E̲ ̲E̲Q̲ ̲F̲U̲L̲L̲ ̲D̲A̲Y̲ ̲?̲
FULL ̲DAY = (STP ̲TIME/24*60*60) *24*60*60
FULL ̲DAY EQ STP ̲TIME?
not full day full day
Figure 4.2.2.4.1.5-11
S̲T̲O̲R̲A̲G̲E̲ ̲O̲C̲C̲U̲P̲A̲N̲C̲Y̲
Delivery sub-package called
which implements the storage occupancy
function
PERFORM ̲DELIVERY (STORAGE ̲OCC ̲DEL)()
Figure 4.2.2.4.1.5-12
D̲E̲L̲I̲V̲E̲R̲Y̲ ̲A̲C̲K̲
CASE LAST ̲DELIVERY
HOUR H̲O̲U̲R̲L̲Y̲ ̲P̲R̲E̲V̲I̲O̲U̲S̲ ̲D̲A̲Y̲ ̲D̲E̲L̲
PREVIOUS ̲DAY C̲U̲R̲R̲E̲N̲T̲ ̲D̲A̲Y̲ ̲D̲E̲L̲
CURRENT ̲DAY D̲A̲Y̲ ̲D̲E̲L̲
DAY P̲R̲E̲V̲I̲O̲U̲S̲ ̲W̲E̲E̲K̲ ̲D̲E̲L̲
PREVIOUS ̲WEEK C̲U̲R̲R̲E̲N̲T̲ ̲W̲E̲E̲K̲ ̲D̲E̲L̲
CURRENT ̲WEEK P̲R̲E̲V̲I̲O̲U̲S̲ ̲M̲O̲N̲T̲H̲ ̲D̲E̲L̲
PREVIOUS ̲MONTH C̲U̲R̲R̲E̲N̲T̲ ̲M̲O̲N̲T̲H̲ ̲D̲E̲L̲
CURRENT ̲MONTH
END CASE
Figure 4.2.2.4.1.5-13
H̲O̲U̲R̲L̲Y̲ ̲P̲R̲E̲V̲I̲O̲U̲S̲ ̲D̲A̲Y̲ ̲D̲E̲L̲
STP ̲HOUR GE 25 ? PERFORM ̲DELIVERY
(DELIVERY,PREVIOUS ̲DAY,PREVIOUS
̲DAY) ()
PERFORM ̲DELIVERY LAST ̲DELIVERY=PREVIOUS
̲DAY
(DELIVERY,HOUR,
STP ̲HOUR)()
PERFORM ̲GENERATION
STP ̲HOUR = STP ̲HOUR+1 (DSG,STP ̲TIME)()
LAST ̲DELIVERY = HOUR
Figure 4.2.2.4.1.5-14
C̲U̲R̲R̲E̲N̲T̲ ̲D̲A̲Y̲
PERFORM DELIVERY
(DELIVERY, CURRENT ̲DAY,CURRENT ̲DAY)()
LAST ̲DELIVERY = CURRENT ̲DAY
Figure 4.2.2.4.1.5-15
D̲A̲Y̲ ̲D̲E̲L̲
DELIVERY ̲TYPE EQ DAILY ?
STP ̲DAY EQ 7 ?
PERFORM ̲DELIVERY
PERFORM ̲DELIVERY (WEEKLY,DAY,STP ̲DAY
(WEEKLY,DAY,STP ̲DAY) ()
()
STP ̲DAY = 1
STP ̲DAY=STP ̲DAY + 1
LAST ̲DELIVERY = DAY
LAST ̲DELIVERY
=
CURRENT ̲DAY
CASE DISMANTLE
(VIEW)
(CC): ERROR ̲OK
ERROR? ANALYSE
̲ERROR ̲OK
OK
END CASE
Figure 4.2.2.4.1.5-16
P̲R̲E̲V̲I̲O̲U̲S̲ ̲W̲E̲E̲K̲ ̲D̲E̲L̲
PERFORM DELIVERY (DELIVERY, PREVIOUS ̲WEEK, PREVIOUS
̲WEEK)()
LAST ̲DELIVERY = PREVIOUS ̲WEEK
PERFORM ̲GENERATION (WSG,STP ̲TIME)()
Figure 4.2.2.4.1.5-17
C̲U̲R̲R̲E̲N̲T̲ ̲W̲E̲E̲K̲ ̲D̲E̲L̲
PERFORM DELIVERY (DELIVERY,CURRENT ̲WEEK,CURRENT ̲WEEK)()
LAST ̲DELIVERY = CURRENT ̲WEEK
Figure 4.2.2.4.1.5-18
P̲R̲E̲V̲I̲O̲U̲S̲ ̲M̲O̲N̲T̲H̲ ̲D̲E̲L̲
DELIVERY ̲TYPE EQ WEEKLY ?
PERFORM DELIVERY (DELIVERY, PREVIOUS ̲MONTH, PREVIOUS
̲MONTH)()
LAST DELIVERY = PREVIOUS ̲MONTH
PERFORM GENERATION (MSG)()
LAST ̲DELIVERY=
CURRENT ̲MONTH
CASE DISMANTLE (VIEW)
(CC): ERROR
̲OK
ERROR? ANALYSE ̲ERROR
̲OK
OK
END CASE
Figure 4.2.2.4.1.5-19
C̲U̲R̲R̲E̲N̲T̲ ̲M̲O̲N̲T̲H̲ ̲D̲E̲L̲
PERFORM ̲DELIVERY (DELIVERY,CURRENT ̲MONTH, CURRENT ̲MONTH)()
LAST ̲DELIVERY = CURRENT ̲MONTH
CASE DISMANTLE (VIEW)
(CC): ERROR ̲OK
ERROR? ANALYSE ̲ERROR ̲OK
OK
END CASE
Figure 4.2.2.4.1.5-20
4.2.2.5 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲-̲P̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
Refer to section 4.2.2.4.1.4
4.2.2.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̲
Not applicable for this sub-package.
4.2.2.7 S̲u̲b̲-̲P̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Refer to section 4.2.2.4.1.2.
4.2.3 S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲D̲u̲m̲p̲ ̲S̲u̲b̲-̲P̲a̲c̲k̲a̲g̲e̲
Subpackage 1.2 statistics dump handles the transfer
of accumulated data from shared data area to statistics
dump area. The shared data area layout has previously
been outlined in paragraph 4.1.4.1.
4.2.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̲
The overview diagram on figure 4.2.3.1-1 depicts
the 5 functions carried out under a statistics
dump process.
They are:
- request data area access
- complete SDA
- transfer data to dump area
- initiate SDA
- release SDA
4.2.3.1.1 R̲e̲q̲u̲e̲s̲t̲ ̲A̲c̲c̲e̲s̲s̲ ̲t̲o̲ ̲S̲h̲a̲r̲e̲d̲ ̲D̲a̲t̲a̲ ̲A̲r̲e̲a̲
After incarnation of dump of SDA, access to the
shared data area must be granted by CSF. A RESERVE
VARIABLE function call with input parameters, shared
data area, is sent to CSF. STP can now access the
shared data area, knowing that no update will take
place until the area is released again.
4.2.3.1.2 C̲o̲m̲p̲l̲e̲t̲e̲ ̲S̲D̲A̲
The channel availability and occupancy area is
completed the following way.
If OPEN ̲CLOSE ̲INDIC indicates open, current time
is added to the SUMDTG field. The time in which
the channel has been open i.e. in use is then contained
in SUMDTG.
If channel indicator indicates close, nothing is
performed as SUMDTG already contains the open i.e.
in use, time.
Figure 4.2.3.1-1…01…Functional Specification
4.2.3.1.3 T̲r̲a̲n̲s̲f̲e̲r̲ ̲o̲f̲ ̲S̲D̲A̲ ̲D̲a̲t̲a̲
Two steps are carried out. Determination of SDA
start address and data area size. Second transfer
of the addressed data area.
4.2.3.1.3.1 G̲e̲t̲ ̲T̲r̲a̲n̲s̲f̲e̲r̲ ̲I̲n̲f̲o̲r̲m̲a̲t̲i̲o̲n̲
Consulting SDA, refer figure 4.1.4.1.1.1-1, from
where the SDA start data address can be found.
The amount of bytes to be transferred during dumps
is contained in data area size location.
4.2.3.1.3.2 T̲r̲a̲n̲s̲f̲e̲r̲ ̲D̲a̲t̲a̲
The I/O instruction modify bytes does the transfer
of SDA to an interval section in the STP file.
Interval in question is derived from STP file information
area byte address A which contains status of current
interval area, refer figure 4.1.4.2-1.
4.2.3.1.4 I̲n̲i̲t̲i̲a̲t̲e̲ ̲S̲D̲A̲
After transfer of SDA to STP file, SDA is initiated.
An initial version of SDA is loaded from disk into
main-memory. This version is ready for being updated
during the next 6 minutes interval. The channel
availability area is initialized i.e. the OPEN
̲CLOSE ̲INDIC set according to channel availability
status area. SUMDTG is supplied with current time
in case channel is open.
Figure 4.2.3.1.3-1…01…Transfer data from shared data area to statistic
dump.
4.2.3.1.5 R̲e̲l̲e̲a̲s̲e̲ ̲o̲f̲ ̲S̲h̲a̲r̲e̲d̲ ̲D̲a̲t̲a̲ ̲A̲r̲e̲a̲
After completion of data transfer from shared data
area it shall be released. A RELEASE VARIABLE function
call to CSF with input parameter, SDA, acknowledges
statistics collector that collection statistic
record can be continued.
4.2.3.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
The dump subpackage software structure consists
of a module performing the functions listed in
4.2.3.1. The module consists of one procedure.
4.2.3.3 D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲
This dump module is being activated by the main
program module. Figure 4.2.3.3-1 presents the control
logic.
Figure 4.2.3.3-1…01…Control Logic
4.2.3.4 M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The statistics dump module will be described during
this module specification.
4.2.3.4.1 S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲D̲u̲m̲p̲ ̲M̲o̲d̲u̲l̲e̲
4.2.3.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̲
Refer 4.2.3.1
4.2.3.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
The module interfaces to the main program module which
activates this module:
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
STP ̲DUMP ( ) ( )
Before the actual transfer of data the statistics data
area is reserved by use of a CSF function call.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
RESERVE ̲VARIABLE (STAT ̲VAR, WAIT) (CC)
After the transfer of data the area is released by
use of a CSF function call:
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
RELEASE ̲VARIABLE (STAT ̲VAR) (CC)
4.2.3.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Not applicable to the STP dump module.
4.2.3.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̲
FDCB ̲INDEX, refer SDS/DBD/001 4.2
FILE ̲ADDRESS, refer SDS/DBD/001 4.2
BLE, refer SDS/DBD/001 4.2
b) E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
MAX ̲EXCS SDS/DBD/001 4.2
MAX ̲VDUS SDS/DBD/001 4.2
INC ̲CHN ̲AVAIL refer 4.1.4.3
OUTG ̲CHN ̲AVAIL refer 4.1.4.3
SHARED ̲DATA ̲AREA refer 4.1.4.1
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
VAR CHN ̲COUNT = INTEGER
VAR STP ̲DUMP ̲FD = FDCB ̲INDEX
VAR DUMP ̲FIL ̲ADD = FILE ̲ADDRESS
VAR SDA ̲BLE = BLE
initialized to point to SDA
VAR INIT ̲SDA ̲FD = FDCB ̲INDEX
VAR INIT ̲SDA ̲BLE = BLE
initialized to point to INIT ̲SDA
VAR INIT ̲SDA ̲FIL ̲ADD = FILE ̲ADDRESS
VAR INIT ̲SDA = BASIC ̲DATA ̲TYPE;
4.2.3.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
Refer flowgram 4.2.3.4.1.5-1.
This flowgram presents the main activities during dump
of shared data area (SDA) to disk.
Flowgram 4.2.3.4.1.5-2 presents the reservation of
SDA before the dump takes place.
Flowgram 4.2.3.4.1.5-3 presents the completion of the
channel availability area i.e. adding of current time
in case channel status area shows an open channel and
no action in case of closed channel.
Flowgram 4.2.3.4.1.5-4 presents the actual transfer
of SDA to disk.
Flowgram 4.2.3.4.1.5-5-6 presents the initialization
of SDA i.e. transfer of a reset SDA from disk to memory
and presetting of channel availability areas.
Flowgram 4.2.3.4.1.5-7 presents the release of SDA
after dump and initialization.
STP ̲DUMP ( ) ( )
R̲E̲S̲E̲R̲V̲E̲ ̲S̲D̲A̲
C̲O̲M̲P̲L̲E̲T̲E̲ ̲S̲D̲A̲
T̲R̲A̲N̲S̲F̲E̲R̲ ̲S̲D̲A̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲S̲D̲A̲
R̲E̲L̲E̲A̲S̲E̲ ̲S̲D̲A̲
RETURN
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲1̲
R̲E̲S̲E̲R̲V̲E̲ ̲S̲D̲A̲
CASE RESERVE ̲VARIABLE (STAT ̲VAR, WAIT) (CC): ERROR
̲OK
ERROR? ̲ANALYSE ̲ERROR (CC, 0)
OK?
END CASE
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲2̲
C̲O̲M̲P̲L̲E̲T̲E̲ ̲S̲D̲A̲
If channel open then add current time
If channel closed then do nothing
CHN ̲COUNT = 1
CHANNEL LOOP
INC ̲CHN ̲AVAIL (CHN ̲COUNT).
OPEN ̲CLOSE ̲INDIC EQ 0?
SHARED ̲DATA ̲AREA.INC ̲CHN ̲AVAIL (CHN ̲COUNT)
=
SHARED ̲DATA ̲AREA.INC ̲CHN ̲AVAIL (CHN ̲COUNT)
+
STP ̲TIME
OUTG ̲CHN ̲AVAIL (CHN ̲COUNT).
OPEN ̲CLOSE ̲INDIC EQ 0?
SHARED ̲DATA ̲AREA.OUTG ̲CHN ̲AVAIL(CHN ̲COUNT)
=
SHARED ̲DATA ̲AREA.OUTG ̲CHN ̲AVAIL(CHN ̲COUNT
+ STP ̲TIME
CHN ̲COUNT = CHN ̲COUNT + 1
CHN ̲COUNT GE MAX ̲EXCS? EXIT
END CHANNEL LOOP
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲3̲
T̲R̲A̲N̲S̲F̲E̲R̲ ̲S̲D̲A̲
DUMP ̲FIL ̲ADD.FIRST ̲BYTE =
STP ̲FILE.INTERVAL ̲DATA(STP ̲FILE.INTERVAL ̲INFO.
SECTION ̲IN ̲USE)
DUMP ̲FIL ̲ADD.BYTE ̲COUNT =
STP ̲FILE.INTERVAL ̲INFO.DATA ̲SIZE
CASE MODIFYBYTES(STP ̲DUMP ̲FD, DUMP ̲FIL ̲ADD,
SDA ̲BLE) (DUMP ̲FIL ̲ADD, CC): ERROR
̲OK
ERROR?-ANALYZE ̲ERROR (CC,0)
OK?
END CASE
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲4̲
I̲N̲I̲T̲I̲A̲T̲E̲ ̲S̲D̲A̲
transfer of initial version of SDA (INIT ̲SDA) from
disk to memory
INIT ̲SDA generated during system initialization
LOAD INIT ̲SDA ̲FIL ̲ADD
CASE READBYTES (INIT ̲SDA ̲FD, INIT ̲SDA ̲FIL ̲ADD,
INIT ̲SDA ̲BLE) (INIT ̲SDA ̲FIL ̲ADD,
CC):
ERROR ̲OK
ERROR?-ANALYSE ̲ERROR (CC, 0)
OK?
END CASE
Preset channel availability area, i.e. if channel
status identifies an open channel SDA is loaded
with -current time
P̲R̲E̲S̲E̲T̲ ̲C̲H̲N̲ ̲A̲V̲A̲I̲L̲
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲5̲
P̲R̲E̲S̲E̲T̲ ̲C̲H̲N̲ ̲A̲V̲A̲I̲L̲
CHN ̲COUNT = 1
CHANNEL LOOP
INC ̲CHN ̲AVAIL(CHN ̲COUNT).
OPEN ̲CLOSE ̲INDIC EQ 0?
SHARED ̲DATA ̲AREA.INC ̲CHN ̲AVAIL(CHN ̲COUNT) =
-STP ̲TIME
OUTG ̲CHN ̲AVAIL(CHN ̲COUNT).
OPEN ̲CLOSE ̲INDIC EQ 0?
SHARED ̲DATA ̲AREA.OUTG ̲CHN ̲AVAIL(CHN ̲COUNT) =
-STP ̲TIME
CHN ̲COUNT = CHN ̲COUNT + 1
CHN ̲COUNT GE MAX ̲EXCS? EXIT
END CHANNEL LOOP
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲6̲
R̲E̲L̲E̲A̲S̲E̲ ̲S̲D̲A̲
CASE RELEASE ̲VARIABLE(STAT ̲VAR) (CC)
ERROR?-ANALYZE ̲ERROR (CC,0)
OK?
END CASE
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲3̲.̲4̲.̲1̲.̲5̲-̲7̲
4.2.3.5 C̲o̲m̲m̲o̲n̲ ̲S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲D̲a̲t̲a̲
Refer section 4.2.3.4.1.4
4.2.3.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̲
Not applicable to this dump Subpackage
4.2.3.7 S̲u̲b̲p̲a̲c̲k̲a̲g̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
Refer section 4.2.3.4.1.2
4.2.4 S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲ ̲G̲e̲n̲e̲r̲a̲t̲i̲o̲n̲ ̲S̲u̲b̲-̲P̲a̲c̲k̲a̲g̲e̲
Sub-package, statistics generation, describes the creation
mechanisms invoked, upon production of hourly, dayly,
weekly and monthly statistics.
4.2.4.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 carried out by this sub-package are;
see overview diagram on figure 4.2.4.1-1.
- detect type of generation
- load generation information
- perform hourly generation
- perform daily generation
- perform weekly generation
- perform monthly generation
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲1̲-̲1̲
4.2.4.1.1 D̲e̲t̲e̲c̲t̲ ̲T̲y̲p̲e̲ ̲o̲f̲ ̲G̲e̲n̲e̲r̲a̲t̲i̲o̲n̲
According to generation type, one of the generators
- hourly
- daily
- weekly and
- monthly
is initiated.
4.2.4.1.2 L̲o̲a̲d̲ ̲G̲e̲n̲e̲r̲a̲t̲i̲o̲n̲ ̲I̲n̲f̲o̲r̲m̲a̲t̲i̲o̲n̲
Before the generation is initiated, generation information
is loaded. The information is copied from the disk
resident STP ̲FILE to a corresponding memory resident
area.
4.2.4.1.3 P̲e̲r̲f̲o̲r̲m̲ ̲H̲o̲u̲r̲l̲y̲ ̲G̲e̲n̲e̲r̲a̲t̲i̲o̲n̲
The 10 intervals in STP ̲FILE contain the source information
to be accumulated. One subgroup at a time is loaded
into the TRANS ̲SUBGROUP area and accumulated to the
ACCUM ̲SUBGROUP area. Subgroup number one from first
interval is the first subgroup to be accumulated. Subgroup
number one from second interval is the second subgroup
to be accumulated etc.
When all intervals are accumulated subgroup is stored
in corresponding hour section on disk.
This procedure is repeated for next subgroup until
all subgroups have been accumulated to the complete
hourly statistics.
4.2.4.1.4 P̲e̲r̲f̲o̲r̲m̲ ̲D̲a̲i̲l̲y̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲
The same mechanism as described under performing hourly
generation is implemented to achieve the daily statistics.
…86…1 …02… …02… …02… …02… …02… …02… …02…
The involved source information is the 24 one hour
statistics which are being accumulated to form the
daily statistics.
4.2.4.1.5 P̲e̲r̲f̲o̲r̲m̲ ̲W̲e̲e̲k̲l̲y̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲
The same mechanism as described under performing hourly
generation is implemented to achieve the weekly statistic.
The involved source information is the 7 one day statistics
which are being accumulated to form the weekly statistics.
4.2.4.1.6 P̲e̲r̲f̲o̲r̲m̲ ̲M̲o̲n̲t̲h̲l̲y̲ ̲S̲t̲a̲t̲i̲s̲t̲i̲c̲s̲
The same mechanism as described under performing hourly
generation is implemented to achieve the monthly statistics.
The involved source information is the 4 one week statistics
which are being accumulated to form the monthly statistics.
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲1̲.̲1̲-̲2̲
4.2.4.2 S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
On figure 4.2.4.2-1 the statistics generation subpackage
software structure is depicted.
The generation subpackage consists of one module performing
the functions listed in 4.2.4.1.
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲2̲-̲1̲
For each of
- perform HSG
- perform DSG
- perform WSG and
- perform MSG
the software structure is shown on figure 4.2.4.2-2.
PERFORM
HSG or DSG or
WSG or MSG
-CALCULATE ̲NO ̲OF ̲SUBGROUPS
-GET ̲SUBGROUP ̲FROM ̲DISK
-PERFORM ̲ACCUMULATE
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲2̲-̲2̲ ̲G̲e̲n̲e̲r̲a̲t̲o̲r̲ ̲S̲o̲f̲t̲w̲a̲r̲e̲ ̲S̲t̲r̲u̲c̲t̲u̲r̲e̲
4.2.4.3 D̲a̲t̲a̲ ̲F̲l̲o̲w̲ ̲a̲n̲d̲ ̲C̲o̲n̲t̲r̲o̲l̲ ̲L̲o̲g̲i̲c̲
Data flow and control logic is presented in section
4.2.3.4.1.5.
4.2.4.4 M̲o̲d̲u̲l̲e̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
The generation module has been identified for the generation
subpackage.
4.2.4.4.1 G̲e̲n̲e̲r̲a̲t̲i̲o̲n̲ ̲M̲o̲d̲u̲l̲e̲
4.2.4.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̲
Refer 4.2.4.1 for functional specifications.
4.2.4.4.1.2 M̲o̲d̲u̲l̲e̲ ̲I̲n̲t̲e̲r̲f̲a̲c̲e̲
This module is being activated by the main program
module when generation of statistics shall be performed.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
PERFORM ̲GENERATION (GENERATOR: GENERATION ̲TYPE,
GEN ̲NO: INTEGER)
( )
4.2.4.4.1.3 M̲o̲d̲u̲l̲e̲ ̲C̲o̲m̲p̲o̲n̲e̲n̲t̲s̲
Following module components have been identified for
this module:
- perform accumulate
- get subgroup from disk
- calculate no of subgroups
a) P̲e̲r̲f̲o̲r̲m̲ ̲A̲c̲c̲u̲m̲u̲l̲a̲t̲e̲
D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
This module component accumulates the contents specified
by TRANS ̲SUBFIELD ̲ADDR to the destination specified
by ACCUM ̲SUBFIELD ̲ADDR.
The accumulation procedure invoked during accumulation
is specified by FIELD ̲PROCEDURE.
Refer flowgram figure 4.2.4.4.1.5-45
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
PERFORM ̲ACCUMULATE(TRANS ̲SUBFIELD ̲ADDR: POINTER ̲TYPE,
ACCUM ̲SUBFIELD ̲ADDR: POINTER
̲TYPE,
FIELD ̲PROCEDURE: PROCEDURE ̲TYPE,
(TRANS ̲SUBFIELD ̲ADDR: POINTER
̲TYPE,
(ACCUM ̲SUBFIELD ̲ADDR: POINTER
̲TYPE)
b) G̲e̲t̲ ̲S̲u̲b̲g̲r̲o̲u̲p̲ ̲F̲r̲o̲m̲ ̲D̲i̲s̲k̲
D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
This module component transfers a subgroup from disk
to memory.
Source is the STP ̲FILE and destination is the TRANS
̲SUBGROUP area which after the call contains the transferred
subgroup.
Refer flowgram figure 4.2.4.4.1.5-46.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
GET ̲SUBGROUP ̲FROM ̲DISK(FIRST ̲BYTE: LONG,
BYTE ̲COUNT: LONG,
SIZE: INTEGER)
(FIRST ̲BYTE: LONG)
c) C̲a̲l̲c̲u̲l̲a̲t̲e̲ ̲N̲u̲m̲b̲e̲r̲ ̲o̲f̲ ̲S̲u̲b̲g̲r̲o̲u̲p̲s̲
D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
This module component calculates the total number of
subgroups to be accumulated during each of the generations,
hourly, daily, weekly or monthly. The number is returned
in NO ̲OF ̲SUBGROUPS.
Refer flowgram figure 4.2.4.4.1.5-47.
C̲a̲l̲l̲ ̲S̲p̲e̲c̲i̲f̲i̲c̲a̲t̲i̲o̲n̲
CALCULATE ̲NO ̲OF ̲SUBGROUPS ( )
(NO ̲OF ̲SUBGROUPS: INTEGER)
4.2.4.4.1.4 D̲a̲t̲a̲ ̲D̲e̲s̲c̲r̲i̲p̲t̲i̲o̲n̲
D̲a̲t̲a̲ ̲R̲e̲f̲e̲r̲e̲n̲c̲e̲s̲
none
E̲x̲t̲e̲r̲n̲a̲l̲ ̲D̲a̲t̲a̲
none
c) L̲o̲c̲a̲l̲ ̲D̲a̲t̲a̲
VAR ACCUM ̲SUBGROUP = ARRAY (1..MAX ̲ACCUM ̲SIZE) OF INTEGER
contains the accumulated subgroups
VAR TRANSF ̲SUBGROUP = ARRAY (1.. MAX ̲TRANSF ̲SIZE) OF
BYTE
contains the transferred subgroup.
Fig. 4.2.4.4.1.4c-1
VAR MEM ̲DESCR ̲AREA =
RECORD
INTERVAL ̲INFO ̲ADDR : POINTER ̲TYPE;
HOUR ̲INFO ̲ADDR : POINTER ̲TYPE;
DAY ̲INFO ̲ADDR : POINTER ̲TYPE;
WEEK ̲INFO ̲ADDR : POINTER ̲TYPE;
MONTH ̲INFO ̲ADDR : POINTER ̲TYPE;
FIELD ̲DESCR ̲ADDR : POINTER ̲TYPE;
INTERVAL ̲INFO : DATA ̲INFO ̲TYPE;
HOUR ̲INFO : DATA ̲INFO ̲TYPE;
DAY ̲INFO : DATA ̲INFO ̲TYPE;
WEEK ̲INFO : DATA ̲INFO ̲TYPE;
MONTH ̲INFO : DATA ̲INFO ̲TYPE;
NO ̲OF ̲GROUPS : INTEGER;
DESCR ̲ADDR = ARRAY (1.. NO ̲OF ̲GROUPS) OF POINTER
̲TYPE;
END;
contains the STP ̲FILE file information and group descriptor
array:
Read bytes parameters
VAR DESCR ̲BLE = BLE
initialized to point to MEM ̲DESCR ̲AREA
VAR DESCR ̲FIL ̲ADD = FILE ̲ADDRESS
VAR SUBGROUP ̲COUNT : INTEGER
VAR MAX ̲SUBGROUP : INTEGER
VAR GROUP ̲COUNT : INTEGER
VAR CURRENT ̲GROUP : STA ̲GROUP ̲NO ̲TYPE
VAR CURRENT ̲SUBGROUP : INTEGER
take on values from either
STA ̲SUBGROUP ̲NO ̲1 or STA ̲SUBGROUP ̲NO ̲2
CONST MAX ̲ACCUM ̲SIZE = ? compile time
CONST MAX ̲TRANSF ̲SIZE = ? compile time
read subgroup parameters
VAR STP ̲FILE ̲FD = FDCB ̲INDEX
VAR STP ̲FILE ̲SUBGROUP ̲ADD = FILE ̲ADDRESS
descriptor transfer params
VAR TRANS ̲SUBGROUP ̲BLE : BLE
transfer subgroup params:
VAR STP ̲FILE ̲INTERVAL ̲ADD : FILE ̲ADDRESS
VAR TRANS ̲BLE : BLE
VAR FIRST ̲BYTE : LONG
VAR BYTE ̲COUNT : LONG
4.2.4.4.1.5 M̲o̲d̲u̲l̲e̲ ̲D̲e̲s̲i̲g̲n̲
The overall module structure is presented in flowgram
figure 4.2.4.4.1.5-1 which shows the main activities.
Flowgram figure 4.2.4.4.1.5-2-3 present the transfer
of the STP ̲FILE descriptor area to the memory resident
MEM ̲DESCR ̲AREA.
Flowgram figure 4.2.4.4.1.5-4-14 present the generation
of the hourly statistics.
Flowgram figure 4.2.4.4.1.5-15-24 present the generation
of the daily statistics.
Flowgram figure 4.2.4.4.1.5-25-34 present the generation
of the weekly statistics.
Flowgram figure 4.2.4.4.1.5-35-44 present the generation
of the monthly statistics.
PERFORM ̲GENERATION (GENERATION: GENERATION ̲TYPE,
GEN ̲NO : INTEGER)
( )
GENERATION EQ MSG?
GEN ̲NO EQ 1?
L̲O̲A̲D̲ ̲G̲E̲N̲E̲R̲A̲T̲I̲O̲N̲ ̲I̲N̲F̲O̲
CASE GENERATION OF
HSG P̲E̲R̲F̲O̲R̲M̲ ̲H̲S̲G̲
DSG P̲E̲R̲F̲O̲R̲M̲ ̲D̲S̲G̲
WSG P̲E̲R̲F̲O̲R̲M̲ ̲W̲S̲G̲
MSG P̲E̲R̲F̲O̲R̲M̲ ̲M̲S̲G̲
END CASE
RETURN
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲
L̲O̲A̲D̲ ̲G̲E̲N̲E̲R̲A̲T̲I̲O̲N̲
The descriptor area from the STP file is loaded
into memory.
L̲O̲A̲D̲ ̲R̲E̲A̲D̲B̲Y̲T̲E̲S̲
A̲D̲D̲R̲E̲S̲S̲ ̲P̲A̲R̲A̲M̲S̲
CASE READBYTES (STP ̲FILE ̲FD, DESCR ̲FIL ̲ADD,
DESCR ̲BLE)
(DESCR ̲FIL ̲ADD, CC): ERROR ̲OK
ERROR?-ANALYZE ̲ERROR (CC, 0)
OK?
END CASE
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲2̲
L̲O̲A̲D̲ ̲R̲E̲A̲D̲B̲Y̲T̲E̲S̲
A̲D̲D̲R̲E̲S̲S̲ ̲P̲A̲R̲A̲M̲S̲
LOAD DESCR ̲BLE to point to memory descriptor area
(copy of STP ̲FILE descriptor)
DESCR ̲FIL ̲ADD.FIRST ̲BYTE = 0
DESCR ̲FIL ̲ADD.BYTE ̲COUNT = SIZE(DESCRIPTOR ̲AREA)
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲3̲
P̲E̲R̲F̲O̲R̲M̲ ̲H̲S̲G̲
CALCULATE ̲NO ̲OF ̲SUBGROUPS ( ) (NO ̲OF ̲SUBGROUPS)
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲H̲S̲G̲
SUBGROUP LOOP
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲I̲N̲T̲E̲R̲V̲A̲L̲ ̲L̲O̲O̲P̲
INTERVAL LOOP
GET ̲SUBGROUP ̲FROM ̲DISK(FIRST ̲BYTE,
BYTE ̲COUNT,
SIZE ̲INTERVAL
(FIRST ̲BYTE)
A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲ ̲I̲N̲T̲E̲R̲V̲A̲L̲
INTERVAL ̲COUNT = INTERVAL ̲COUNT + 1
INTERVAL ̲COUNT GT MAX ̲NO ̲OF ̲INTERVAL? EXIT
END INTERVAL LOOP
S̲T̲O̲R̲E̲ ̲S̲U̲B̲G̲R̲O̲U̲P̲ ̲I̲N̲
C̲O̲R̲R̲ ̲H̲O̲U̲R̲ ̲S̲E̲C̲T̲I̲O̲N̲
SUBGROUP ̲COUNT = SUBGROUP ̲COUNT + 1
SUBGROUP ̲COUNT GT NO ̲OF ̲SUBGROUPS? EXIT
END SUBGROUP LOOP
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲4̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲H̲S̲G̲
SUBGROUP ̲COUNT = 1
calculate 1. subgroup byte address
STP ̲FILE ̲ADD.FIRST ̲BYTE = ADDRESS(MEM ̲DESCR ̲AREA.
INTERVAL ̲INFO.
DATA ̲ADDR)
calculate 1. subgroup size
SIZE ̲INTERVAL = MEM ̲DESCR ̲AREA.
INTERVAL ̲INFO.
DATA ̲SIZE
STP ̲FILE ̲ADD.BYTE ̲COUNT = SHARED ̲DATA ̲AREA.
GROUP ̲DESCR ̲ADDR(GROUP ̲NO).
RECORD ̲LENGTH*
SHARED ̲DATA ̲AREA.
GROUP ̲DESCR ̲ADDR(GROUP ̲NO).
NO ̲OF ̲RECORDS*2
FIRST ̲BYTE = STP ̲FILE ̲ADD.FIRST ̲BYTE
BYTE ̲COUNT = STP ̲FILE ̲ADD.BYTE ̲COUNT
initialize ACCUM ̲SUBGROUP to 0
ACCUM ̲SUBGROUP (1..MAX ̲ACCUM ̲SIZE) = 0
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲5̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲I̲N̲T̲E̲R̲V̲A̲L̲ ̲L̲O̲O̲P̲
INTERVAL ̲COUNT = 1
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲6̲
A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲ ̲I̲N̲T̲E̲R̲V̲A̲L̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲R̲E̲C̲O̲R̲D̲ ̲L̲O̲O̲P̲
NO OF RECORD LOOP
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
NO OF FIELD LOOP
G̲E̲T̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲S̲U̲B̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
NO OF SUBFIELD LOOP
P̲E̲R̲F̲O̲R̲M̲ ̲A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲
A̲C̲C̲O̲R̲D̲I̲N̲G̲ ̲T̲O̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
SUBFIELD ̲COUNT = SUBFIELD ̲COUNT + 1
SUBFIELD ̲COUNT GT SHARED ̲DATA ̲AREA.
DESCR ̲ARRAY(GROUP ̲COUNT).
FIELD ̲DESCR ̲ARRAY(FIELD
̲
COUNT).
NO ̲OF ̲SUBFIELDS? EXIT
END NO OF SUBFIELD LOOP
FIELD ̲COUNT = FIELD ̲COUNT + 1
U̲P̲D̲A̲T̲E̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲ ̲A̲D̲D̲R̲ ̲I̲N̲ ̲S̲D̲A̲
FIELD ̲COUNT GT SHARED ̲DATA ̲AREA.
DESCR ̲ARRAY(GROUP ̲COUNT).
NO ̲OF ̲FIELDS? EXIT
END NO OF FIELD LOOP
RECORD ̲COUNT = RECORD ̲COUNT + 1
RECORD ̲COUNT GT SHARED ̲DATA ̲AREA.
DESCR ̲ARRAY.NO ̲OF ̲RECORDS?
EXIT
END NO OF RECORD LOOP
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲7̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲R̲E̲C̲O̲R̲D̲ ̲L̲O̲O̲P̲
RECORD ̲COUNT = 1
TRANS ̲SUBFIELD ̲ADDR = TRANS ̲SUBGROUP
points to first location in TRANS ̲SUBGROUP
ACCUM ̲SUBFIELD ̲ADDR = ACCUM ̲SUBGROUP
points to first location in ACCUM ̲SUBGROUP
find address on first field procedure
FIELD ̲PROCEDURE ̲ADDR = SHARED ̲DATA ̲AREA.
GROUP ̲DESCR ̲ADDR(GROUP ̲NO) +
FIELD ̲DESCR ̲OFFSET
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲8̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
FIELD ̲COUNT = 1
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲9̲
G̲E̲T̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
FIELD ̲PROCEDURE = FIELD ̲PROCEDURE ̲ADDR +
FIELD ̲PROCEDURE ̲OFFSET ̲SDA
field procedure offset is offset within field
descr type in SDA
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲0̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲S̲U̲B̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
SUBFIELD ̲COUNT = 1
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲1̲
U̲P̲D̲A̲T̲E̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
A̲D̲D̲R̲ ̲I̲N̲ ̲S̲D̲A̲
FIELD ̲PROCEDURE ̲ADDR = FIELD ̲PROCEDURE ̲ADDR +
SDA ̲FIELD ̲DESCR ̲OFFSET
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲2̲
P̲E̲R̲F̲O̲R̲M̲ ̲A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲
A̲C̲C̲O̲R̲D̲I̲N̲G̲ ̲T̲O̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
The subfields are accumulated according to field function
parameters.
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲3̲
S̲T̲O̲R̲E̲ ̲S̲U̲B̲G̲R̲O̲U̲P̲ ̲I̲N̲
C̲O̲R̲R̲ ̲H̲O̲U̲R̲ ̲S̲E̲C̲T̲I̲O̲N̲
STP ̲FILE ̲ADD.FIRST ̲BYTE contains byte address in
STP ̲FILE where modify shall continue
STP ̲FILE ̲ADD.BYTE ̲COUNT = SIZE(SUBGROUP) * 2
I̲N̲I̲T̲ ̲S̲T̲P̲ ̲B̲U̲F̲F̲E̲R̲ ̲B̲L̲E̲ ̲T̲O̲
P̲O̲I̲N̲T̲ ̲O̲U̲T̲ ̲A̲C̲C̲U̲M̲ ̲S̲U̲B̲G̲R̲O̲U̲P̲
CASE MODIFYBYTES (STP ̲FILE ̲FD, STP ̲FILE ̲ADD,
STP ̲BUFFER ̲BLE)
(STP ̲FILE ̲ADD, CC): ERROR ̲OK
ERROR?-ANALYZE ̲ERROR (CC, 0)
OK?
END CASE
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲4̲
P̲E̲R̲F̲O̲R̲M̲ ̲D̲S̲G̲
CALCULATE ̲NO ̲OF ̲SUBGROUPS ( ) (NO ̲OF ̲SUBGROUPS)
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲D̲S̲G̲
SUBGROUP LOOP
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲H̲O̲U̲R̲ ̲L̲O̲O̲P̲
HOUR LOOP
GET ̲SUBGROUP ̲FROM ̲DISK(FIRST ̲BYTE,
BYTE ̲COUNT,
SIZE ̲HOUR)
(FIRST ̲BYTE)
A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲ ̲H̲O̲U̲R̲
HOUR ̲COUNT = HOUR ̲COUNT + 1
HOUR ̲COUNT GT MAX ̲NO ̲OF ̲HOURS? EXIT
END HOUR LOOP
S̲T̲O̲R̲E̲ ̲S̲U̲B̲G̲R̲O̲U̲P̲ ̲I̲N̲
C̲O̲R̲R̲ ̲D̲A̲Y̲ ̲S̲E̲C̲T̲I̲O̲N̲
SUBGROUP ̲COUNT = SUBGROUP ̲COUNT + 1
SUBGROUP ̲COUNT GT NO ̲OF ̲SUBGROUPS? EXIT
END SUBGROUP LOOP
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲5̲
INITIALIZE DSG
SUBGROUP ̲COUNT = 1
calculate first hour subgroup byte address
STP ̲FILE ̲ADD.FIRST ̲BYTE = ADDRESS(MEM ̲DESCR ̲AREA.
HOUR ̲INFO.
DATA ̲ADDR)
calculate subgroup size of first subgroup
STP ̲FILE ̲ADD.BYTE ̲COUNT = MEM ̲DESCR ̲AREA.
DESCR ̲ADDR(SUBGROUP ̲COUNT).
POINTER.NO ̲OF ̲RECORDS *
MEM ̲DESCR ̲AREA.
DESCR ̲ADDR(SUBGROUP ̲COUNT).
POINTER.NO ̲OF ̲FIELDS *2 *2
SIZE ̲HOUR = MEM ̲DESCR ̲AREA.
HOUR ̲INFO.
DATA ̲SIZE
FIRST ̲BYTE = STP ̲FILE ̲ADD.FIRST ̲BYTE
BYTE ̲COUNT = STP ̲FILE ̲ADD.BYTE ̲COUNT
initialize ACCUM ̲SUBGROUP to 0
ACCUM ̲SUBGROUP (1..MAX ̲ACCUM ̲SIZE) = 0
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲6̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲H̲O̲U̲R̲ ̲L̲O̲O̲P̲
HOUR ̲COUNT = 1
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲7̲
A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲ ̲H̲O̲U̲R̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲R̲E̲C̲O̲R̲D̲ ̲L̲O̲O̲P̲
NO OF RECORD LOOP
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
NO OF FIELD LOOP
G̲E̲T̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲S̲U̲B̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
NO OF SUBFIELD LOOP
P̲E̲R̲F̲O̲R̲M̲ ̲A̲C̲C̲U̲M̲U̲L̲A̲T̲E̲
A̲C̲C̲O̲R̲D̲I̲N̲G̲ ̲T̲O̲ ̲F̲I̲E̲L̲D̲ ̲P̲R̲O̲C̲E̲D̲U̲R̲E̲
SUBFIELD ̲COUNT = SUBFIELD ̲COUNT + 1
SUBFIELD ̲COUNT GE SHARED ̲DATA ̲AREA.
DESCR ̲ARRAY(GROUP ̲COUNT).
FIELD ̲DESCR ̲ARRAY(FIELD
̲
COUNT).
NO ̲OF ̲SUBFIELDS? EXIT
END NO OF SUBFIELD LOOP
FIELD ̲COUNT = FIELD ̲COUNT + 1
FIELD ̲PROCEDURE ̲ADDR = FIELD ̲PROCEDURE ̲ADDR
+
FIELD ̲DESCR ̲LENGTH
FIELD ̲COUNT GE SHARED ̲DATA ̲AREA.
DESCR ̲ARRAY(GROUP ̲COUNT).
NO ̲OF ̲FIELDS? EXIT
END NO OF FIELD LOOP
RECORD ̲COUNT = RECORD ̲COUNT + 1
RECORD ̲COUNT GE SHARED ̲DATA ̲AREA.
DESCR ̲ARRAY.NO OF ̲RECORDS? EXIT
END NO OF RECORD LOOP
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲8̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲R̲E̲C̲O̲R̲D̲ ̲L̲O̲O̲P̲
RECORD ̲COUNT = 1
TRANS ̲SUBFIELD ̲ADDR = TRANS ̲SUBGROUP
points to first location in TRANS ̲SUBGROUP
ACCUM ̲SUBFIELD ̲ADDR = ACCUM ̲SUBGROUP
points to first location in ACCUM ̲SUBGROUP
get address on first field procedure
FIELD ̲PROCEDURE ̲ADDR = MEM ̲DESCR ̲AREA.
FIELD ̲DESCR +
2 x (GROUP ̲NO + 1) +
DESCR ̲OFFSET
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲1̲9̲
I̲N̲I̲T̲I̲A̲L̲I̲Z̲E̲ ̲F̲I̲E̲L̲D̲ ̲L̲O̲O̲P̲
FIELD ̲COUNT = 1
F̲i̲g̲u̲r̲e̲ ̲4̲.̲2̲.̲4̲.̲4̲.̲1̲.̲5̲-̲2̲0̲