April 27, 1981
normally located on the system disk. To allow for proper macro
expansion in a system supporting VM/370 System Extensions (Program No. 5748-XE1), CMSBSE MACLIB must be used in addition to CMSLIB 8ACLIB. There are macros to manipulate CMS disk files, to handle terminal
communications, to manipulate unit record and tape input/output, and to
trap interruptions. These macros are discussed in general terms here;
for complete format descriptions, see VM/370 CMS gnd MACROS FOR DISK FILE MANIPULATION Disk files are described in CMS by means of a file system control block (FSCB). The macro instructions that manipulate disk files use FSCBs to identify and describe the files. When you want to manipulate a CMS file, you can refer to the file either by its file identifier,
specifying 'filename filetype filemode' in quotation marks, or you can
refer to the FSCB for the file, specifying FSCB=fscb, where fscb is the
label on an FSCB macro.
To establish an FSCB for a file, you can use the FSCB macro
instruction specifying a file identifier; for example:
INFILE FSCB 'INPUT TEST A1' You can also provide, on the FSCB macro instruction, descriptive
information to be used by the input and output macros. If you do not
code an FSCB macro instruction for a file, an FSCB is created inline
(following the macro instruction) when you code an FSREAD, FSWRITE, or FSOPEN macro instruction.
The format of an FSCB is listed below, followed by a description of
each of t he fields. LaQ§1 FSCBCOMM FSCBFN FSCBFT FSCBFM FSCBITNO FSCBBUFF FSCBSIZE FSCBFV FSCBFLG FSCBNOIT FSCBNORD FSCBAITN FSCBANIT FSCBWPTR FSCBRPTR DC DC DC DC DC DC DC DC EQU DC DC DC DC DC DC CL8' , CL8' , CL8' , CL2' , H'O' A'O' F'O' CL2'F' FSCBFV+1 H' 1 '
AL4 (0) AL4 (0) AL4 (1)
AL4 (0) AL4 (0) De,§cri:Q1io,!! File system command
Filename
F iletype
Filemode
Relative record number (RECNO) Address of buffer (BUFFER) Number of bytes to read or write (BSIZE) Record format -F or V (RECFf'!) Flag byte
Number of records tc read or write (NOREC) Number of bytes actually read
Extended FSCB relative record number
Extended FSCB relative number of records
Extended FSCB relative write pointer
Extended FSCB relative read pointer
The fields FSCBAITN, FSCBANIT, FSCBWPTR, and FSCBRPTR are only generated
in the FSCB when the extended format FSCB is requested (FORM=E is coded
on the FSCB macro instruction). In this case, the fields FSCBITNO and FSCBNOIT are reserved fields. Extended format FSCBs must be used to
manipulate files larger than 65,533 items.
The labels shown above are not generated by the FSCB macro; to reference
fields within the FSCB by these labels, you must use the FSCBD macro
instruction to qenerate a DSECT. 244 IBM VM/370 CMS User's Guide
April 27, 1981 When the FSCBFN, FSCBFT, and FSCBFM fields are filled in, you
can fill in the FSCBCOMM field with the name of a CMS command and use
the FSCB as a parameter list for an SVC 202 instruction. (You must
place a delimiter to mark the end of the command line.) The filename, filetype and filemode fields
identify the CMS file to be read or written. You can code the fileid on
a macro line in the format 'filename filetype filemode' or you can use
register notation. If you use register notation, the register that you
specify must point to an 18-byte field in the format:
FILEID DC
DC
De
eL8'filename'
CL8'filetype'
CL2'fm'
section 13. Programming for the eMS Environment 244.1
Previous Page Next Page