FSCLOSE Macro FSCLOSE Use the FSCLOSE macro instruction to close an open file and save its
current status on disk. The format of the FSCLOSE macro instruction is: .------- I r labe11 I L- __ _
label
fileid FSCLOSE {
fileid(,FSCB=fscb] } [,ERROR=erraddr] FSCB=fscb , I I is an optional statement label.
specifies the CMS file identifier. It may be:
'fn ft fm' fileid enclosed in single quotation marks and
separated by blanks. If fm is omitted, A1 is
assumed.
(reg) a register other than 0 or 1 containing the
address of the fileid (18 characters) When register format is used, the fileid must be
exactly 18 characters in 8 for the
filename, 8 for the filetype, and 2 for the
filemode. Shorter names must be filled with
blanks. FSCB=fscb specifies the address of an FSCB. It may be:
label
(reg)
the label on the FSCB macro instruction.
a register containing the address of an FSCB. ERROR=erraddr 1.
specifies the address of an error routine to be given control
if an error is found. If ERROR= is not coded and an error
occurs, control returns to the next sequential instruction in
the callinq program, as it does if no error occurs.
Although CMS routines close files when a command
completes execution, you must use the FSCLOSE macro
when you are executing a program from within an EXE:, are going to read and write records in the same file.
or program
instruction
or when you
2. If you specify both fileid and FSCB, the fileid is used to fill in
the FSCB. If an error occurs, register 15 contains the following error code: File not open 306 IBM VM/370 CMS Command and Macro Reference
FSERASE Macro FSERASE Use the FSERASE macro instruction to delete a CMS disk file. The format
of the FSERASE macro instruction is: r I [label] FSERASE {
fileid[,FSCB=fscb] } [,ERROR=erraddr]
FSCB=fscb I L- label is an optional statement label.
fileid specifies the CMS file identifier. It may be:
'fn ft fm' fileid enclosed in single quotatinn marks and
separated by blanks. If fm is omitted, A1 is
assumed.
(reg) a register other than 0 or containing the
address of the fileid (18 characters) When register format is used, the fileid must be
exactly 18 characters in length; 8 for the
filename, 8 for the filetype, and. 2 for the
filemode. Shorter names must be filled with
blanks.
FSCB=fscb specifies the address of an FSCB. It may be:
label
(reg)
the label of an FSCB macro instruction.
a register containing the address of an FSCB. ERROR=erraddr 'specifies the address of an error routine to be given control
if an error occurs. If ERROR= is not coded and an error
occurs, control returns to the next sequential instruction in
the calling program, as it does if no error occurs.
1. On return from the FSERASE macro, register 1 points to a parameter
list. The second# third# and fourth words of the list contain the
filename, filetype, and filemode of the file.
2. If fileid and FSCB= are both coded, the fileid is used to fill in
the FSCB. If an error occurs, register 15 contains one of the following error
codes: 24 36 1!eanigg Parameter list error
File not found
Disk not accessed Section 6. CMS Macro Instructions 307
Previous Page Next Page