of SC20-1819-2 Rev March 30# 1979 by Supp. SD23-9024-1 for 5748-XX8 arting address for NSL routines that are TEXT files. The CMS loader ,ads such files for you at an address that does not cause an overlay.
Although any user may write his own NSL routine# it is expected that
system programmer will usually write such routines and then other
'ogrammers in the installation will use them. Before writing an NSL 'utine, read the Introduction to CMS# Interrupt Handling# and ces .nctional Information sections in Part 3 of the In order to ensure proper communication with the ces stem routines, you must use the linkage described below when you write
,nstandard label routines. When an NSL tape label processing routine gets control, register 1
ints to a 16-byte parameter list with the following format:
,
te 0 Type Caller Tape Mode-Reserved I call id Set Byte I I ·te 4 TAPID I I -, ID parameter ·te 8 FCBSECT address I I for 1 I TAP:EMAC and c.e 12 DCB address I , TAPPDS --I The Type call field is a code telling the type of label processing
ing done: x·OO' x'04' x'OS' x'OC' x' 10' is OPEN input
is OPEN output
is CLOSE input
is CLOSE output
is End of Tape output
The Caller id is a one-byte code which is one of the following: x'80' x'20' Call by OS simulation Call by CMS TAPEMAC or TAPPDS commands
Tape modeset byte is used to communicate with the CMS tape I/O utines. It is a one byte hexadecimal code that depends on the type of
pe (7 or 9 track), tape density# etc. For further information on the
de Set, see the TAPE command description in the (You probably will pass this byte to the CMS tape
ntrolling module to read and write your tape labels and will never ed to know what its codes mean.) FCBSECT address is the address of the CMSCE (FCBSECT) for the tape
le you are processing. DCB address is the address of the DCB for the tape file you are
')cessing.
Note that for the TAPEMAC and TAPPDS commands, the same interface is except that instead of the FCBSECT and LCB address fields, the qht character identifier specified in the ID=identifier field in the
'mmand is passed. This identifier enables you to identify which file are precessing since the TAPEMAC and commands do not work th CMSCBs or DCBs. IBM VM/370 eMS User's Guide
Pg. of GC20-1819-2 Rev March 30, 1979 by Supp. SD23-9024-1 for 5748-1 Control is passed to your NSL routine by a BALR14,15 instruction
register 15 contains the address of your routine when you recei
control. Register 14 contains the address you should return to when y are finished processing the nonstandard labels. You can return with
BR 14 instruction. When you receive control, register 13 points to
save area in which to store the callers register. The save area linka
is standard OS/VS linkage. You receive control with a PSi key of X' which allows you to modify only user storage. When you are finish
processing, place a code in register 15 to the CMS label processi
routine that called your routine. Place the value 0 (zero) in regist
15 if there have been no errors and you want processing to contin
normally and the data set to be opened. If you return a nonzero val
in register 15, a message is issued to your terminal and the data set
not opened.
If you write the following FILEDEF statement:
filedef tapf1 tap1 nsl readlab
and have a program called READLAB as a MODULE or TEXT file, your progr
will receive control when the data set called tapf1 is opened. Wh your program gets control, register 1 contains the address of t
parameter list described above. Using the data in this parameter lis
you are able to read or write your own tape header labels. When t
same data set is closed, your program again receives control and you c
read or write your own trailer labels. Your program can test whether
is getting control for OPEN or CLOSE by examining the type call byte
the parameter list passed to you. If the type call byte is x'10', yo NSL routine is being invoked while you are writing an output data s and you have reached the reflective mark that indicates end of tap You may wish to do special processing in this case. See the "End Tape
fi
and fiEnd of section in this publication for furth
information on end of tape processing.
There are a few minor differences in the way CMS OS simulation process
tapes and the way OS/VS processes them. These differences are list
below. If you are using OS/VS and you do not specify any label parameter
your JCL statement, the default is SL or standard labels. When 1 use as simulation under CMS and do not specify any label informati
on a FILEDEF statement, the default is LABOFF. LABOFF turns label processing and nothing is done to position the tape or labels. Thus, if you specify no label information on FILEDEF, t
system will process your tape files exactly the same way they a processed on a CMS system that has no tape label processi
facilities. You must specify CLOSE to process all trailer labels. No automat CLOSE occurs at end of data or after reading a tape mark. There
no EOV monitor to process labels before a data set is closed. If
input tape is positioned at an EOF1 or EOV1 record when CLOSE issued, the label is processed. If a tape file is closed before a
data records are read, the trailer label is not processed. OutF tapes have EOF records written only at CLOSE time. There is no deferred label processing under as siaulation in CMS. Section 7. Using Real Printers, Punches, Readers, and Tapes 122
Previous Page Next Page