Input Processing Output o Initialize the program. 2 Issue starting message.
3 If card input, read control statements
from card reader, otherwise issue
prompting message so that operator
enters control statements on
console.
At end, exit. I EXIT 4 Request volume label. 5 If format function, format the
specified cylinders. (See Diagram
3-2 for details'! 6 If Allocate function, read and
verify the volume label, then
perform the allocation specified.
(See Diagram 3-3 for details.)
7 If label only operation, write the
new CP volume label on cylinder
o head 0 record 3. Notes Module Label Ref Notes
1 DM KFMT sets up registers 15, 11, and DMKFMT DMKFMT ENTER DEVICE ADDRESS (ccu):
12 as base registers, gets the IPL device
address from the I/O old PSW, and
stores it in IPLDEV. Next, DMKFMT
prompts the entering of the device
address. locates the console by testing 009 and 01 F. If neither of these devices is availa- ble, it enters the wait state until an If the device address entered is valid, the device type is requested.
attention interruption is received from ENTER DEVICE TYPE:
the console.
The high cylinder address, highest
2 The program title DMKFMT STMSG record, and device type are initialized
depending on the device type entered. VM/370 FORMAT/ALLOCATE PROGRAM VERSION n.n If the device address entered is not
is displayed at the console. available, the error message DMKFMT730E DEV xxx NOT 3 If the switch (CDSW2) contains I'FF', DMKFMT GETCARD OPERATIONAL the reader enters the wait state until an I/O interrupt occurs. The CONSINT CONSINT routine reads the control statements
is issued and the request for a device
is repeated.
and the VALIDATE routine checks VALIDATE
that they are valid. 4 The message
ENTER DEVICE LABEL:
The prompter messages are issued. If SELECT is displayed.
the control statements are entered
through the card reader, the prompter 5 If the function being performed by
messages include the response that was the Format/Allocate program is the already specified in cards. format operation, then, if cylinder 0 is to be formatted, DMKFMT
The message DEVICEAD branches to FMT; otherwise, it
ENTER FORMAT OR ALLOCATE: REGFORM1. prompts the operator. If the operator
correctly enters FORMAT (F) or ALLOCATE (A), one of the following 6 The volume label is read and verified
by the LBLREC CCW string, then
DMKFMT branches to the
messages ALLOCATE routine.
FORMAT FUNCTION SELECTED ALLOCATE FUNCTION SELECTED 7 The CP volume label is written by
appears on the console.
Otherwise, the prompter message is
reissued. Then, the message
the LABWRITE CCW string.
Processing continues by reading the
next control statement (see Step 3). riagram 3-1. Overview of the Format/Allocate Prograa 66 IBM VM/370 Service Routines Program Logic 8 Formatted Allocated or Labeled Disk Module Label Ref DEVICEAC DEVTYPE
DMKFMT LAB
DMKFMT LAB
DMKFMT LAB
DMKFMT LABONLY
I Processing I OIL 1 If cylinder 0 is to be formatted,
read existing as Format 4 label, if present.
2 Print format message.
3 If cylinder 0 is starting cylinder,
format and write system records. I I V
FORMAT STARTED Disk
Notes
1
2 If cylinder 0 is to be formatted,
any existing as Format 4 label is
read to preserve (for IBCDASDI) the CCHH address of the next
unassigned alternate track and
also the count of the remaining
unassigned alternates. This data will be put in the new OS Format
4 label on track O. DMKFMT branches and links to the
message writing (WMSG) routine to
display
FORMAT STARTED Then It updates the I/O new PSW so
that the 10lNT routine executes when
an I/O interrupt occurs.
3 If cylinder 0 is the starting cylinder,
the FORMAT program formats
cylinder 0 by setting up the CCWs appropriate to the device type and
then branching to the STIO routine
to perform the I/O operation. Once cylinder 0 is formatted, system
records are written on it. The branch
to the CH ECKO routine is set to Nap
so that CHECKO is executed only once.
The records written on cylinder 0 are
Record Description
o Page bit map
1 IPL record
2 Checkpoint record
3 Vol1 label 4 Allocation bit map
5 Format 4 label 6 Format 5 label F3 Page size filler F4 Filler record for 2314/2319
Moduie
DMKFMT.
DMKFMT I DMKFMT
4 Format the specified cylinders.
5 If an error occurs, record it in the
cylinder bit map in Record 0 track 0 of that cylinder.
6 Print end of format message. III I II I 8 Disk (formatted) Label Ref FMT
REGFORM1 I II STORE CHECKO Notes 4
5
The appropriate device type CCWs are
set up by the Format program. Page
size records are written and verified
by the STIO routine. Control returns
to the RESUMP routine if no error
occurs. The RESUMP routine up-
dates the record numbers and the STIO routine again writes and
verifies the record. This loop con-
tinues until the last cylinder specified
is completely formatted. If an error occurs in the STIO routine, control is transferred to the 10lNT routine. The error is retried
up to 9 tImes before the message
DMKFMT736E 10 ERROR xxx CCHH R= SENSE= is displayed. The Page bit map is
updated to indicate a bad surface.
The errors that cause the Format
function to terminate are:
seek error
error in writing or reading the
home address
error writing or reading record 0 error setting file mask
error in reading count, key, data
The message
DMKFMT735E FATAL DASD I/O ERROR
is displayed and control returns to
the GETCARD routine.
6 DMKFMT displays the message
FORMAT DONE to indicate that the specified
cylinders are formatted, and then
summarizes the errors with the
message
xxx PAGE RECORDS FLAGGED
FORMAT DONE Module Label DMKFMT STORE STIO I RESUMP DMKFMT 10lNT DMKFMT CLEANUP
Ref
Diagram 3-2. The Format Function Chapter 3. The Format Service Program 67
Previous Page Next Page