I GENDIRT directoryname [targetmode [sourcemode]]
where
Establishing the Proper Linkage
directoryname
is the entry point of the auxiliary directory.
targetmode
is the mode of the disk containing the modules referenced in the auxil­
iary directory. The letter is the mode of the disk containing the mod­
ules at execution time, not the mode of the disk at the initialization of
the directory. At directory creation, all modules named in the directory
being generated must be on either the A-disk on a read-only extension
or on the disk specified in the sourcemode parameter. The default val­
ue for targetmode is S, the system disk. It is your responsibility to
determine the usefulness of this operand at your installation and to
inform users of programs using auxiliary directories of the proper
methodes) of access.
sourcemode
is the mode of the disk that contains the modules or files when the
GENDIRT command is issued. If not specified, 'A' is the default.
The CMS module, DMSLAD, entry point DMSLADAD, must be called by a
user program or interface to initialize the directory search order. The subrou­
tine, DMSLADAD, must be called via an SVC 202 with register 1 pointing to
the appropriate PLIST. The disk containing the modules listed in the auxiliary
directory must be accessed as the mode specified, or implied, by the GENDIRT
command before the call is issued. If the GENDIRT command has not been
used, the user receives the message: "File not found" or "Error reading file." The coding necessary for the call is:
LA R1,PLIST SVC 202 DC AL4(error return)
This call must be executed before the call to any module that is to be located
via an auxiliary directory.
The PLIST should be: PLIST DS DC
DC
DC OF CL8'DMSLADAD'
V (directoryname) F'O' The auxiliary directory is copied into nucleus free storage. The Active Disk
Table (ADT) for the targetmode expressed or implied by the GENDIRT com­
mand is found and its file directory address chain (ADTFDA) is modified to
include the nucleus copy of the auxiliary directory. A flag, ADTPSTM, in
ADTFLG2 is set to indicate that the directory chain has been modified.
The address of the nucleus copy of the auxiliary directory is saved in the third
word of the input parameter list and the high order byte of the third word is set
to X'80' to indicate that the directory search chain was modified and that the
next call to DMSLADAD is a clear request.
Auxiliary Directories 459·
Error Handling and Return Codes
To reset the directory search chain, a second call is made to DMSLADAD
using the modified PLIST. DMSLADAD removes the nucleus copy of the aux­
iliary directory from the chain and frees it. DMSLADAD does not, however,
restore the caller's PLIST to it initial state.
An error handling routine should be coded to handle nonzero return codes in
register 15. When register 15 contains 1 and the condition code is set to 2, the
disk specified by the targetmode operand of the GENDIR T command was not
accessed as that mode.
When register 15 contains 2 and the condition code is set to 2, the disk speci­
fied by the targetmode operand of the GENDIRT command has not previously
had its file directory chains modified; therefore, a call to DMSLADAD to
restore the chain is invalid.
An Example of Creating an Auxiliary Directory 460 VM/SP System Programmer's Guide
Consider an application called PAYROLL consisting of several modules. It is
possible to put these modules in an auxiliary directory rather than in the resi­
dent directory. It is further possible to put the auxiliary directory on a disk oth­
er than the system disk. In this example, the auxiliary directory is placed on the
Y-disk.
First, generate the auxiliary directory TEXT deck for the payroll application
using the DMSFST macro:
PAYDIRT
DIRTBEG
DIRTEND START DC
DC EQU DMSFST DMSFST DMSFST DMSFST DMSFST DMSFST DMSFST DMSFST DMSFST DMSFST DMSFST DC EQU END
o F'40' LENGTH OF FST ENTRY
A (DIRTEND-DIRTBEG) SIZE OF DIRECTORY
* PAYROLL 1 PAYROLL2 PAYROLL3 PAYFICA
PAYFEDTX PAYSTATE PAYCITY PAYCREDU PAYOVERT PAYSICK PAYSHIFT 2A(O) POINTER TO NEXT FST BLOCK *
lNote: F'64' should be used if FORM=E is specified on DMSFST macro.
In this example, the payroll control program (PAYROLL), the payroll auxiliary
directory (P A YDIRT), and all the payroll modules reside on the 194 disk.
In the payroll control module (PAYROLL), the subroutine DMSLADAD must
be called to establish the linkage to the auxiliary directory. This call must be
executed before any call is made to a payroll module that is in the PA YDIRT
auxiliary directory.
Previous Page Next Page