231B ExpandFile¶
Stub MON 231B (153 decimal) · Mnemonic EXPFI · Group: File Operations (manual section 2.4)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_231B_ExpandFile.c
Description¶
Expands the file size. You use this monitor call to increase the size of contiguous and allocated files. The space following the file on the disk must be free.
- Indexed files created with 0 pages may be expanded.
- Public users must have directory access to the file. User RT and SYSTEM can expand any file.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
FileName |
STRING | In | File name. It may be abbreviated, but this slows down execution. |
NoOfPages |
INTEGER2 | In | Number of additional pages. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
CreateFile, @EXPAND-FILE
Compatibility¶
| Machines | Users | Programs |
|---|---|---|
| ND-100 and ND-500 | All users | All programs |
The manual's compatibility box for this call, word for word.
Yes/no fields from the YAML extraction (not in the manual's words):
| ND-100 | ND-500 | User programs | RT programs | System programs |
|---|---|---|---|---|
| Yes | Yes | Yes | Yes | No |
Examples¶
From the manual (OCR text, not corrected).
INTEGER4 : NoOfPages
BYTES : FileName(0:63)
...
ON ROUTINEERROR DO
IF ErrCode >‹ O THEN ...
ENDON
Monitor_Call('ExpandFile', FileName, NoOfPages)
INTEGER*4 NoOfPages
CHARACTER FileName*64
...
Monitor_Call('ExpandFile', FileName(1:64), NoOfPages)
IF (ErrCode .NE. 0) THEN ...
NoOfPages : LONGINT;
FileName : PACKED ARRAY [0..63] OF CHAR;
...
ExpandFile(FileName, NoOfPages);
IF ErrCode <> 0 THEN ...
01 NoOfPages COMP PIC S9(10).
01 FileName PIC X(64).
01 ErrCode COMP.
...
MONITOR-CALL "ExpandFile" USING FileName, NoOfPages.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
NoOfPages : W BLOCK 1
FileName : STRING 64
ErrCode : W BLOCK 1
ExpandFile : EQU 37B9 + 231B
...
CALLG ExpandFile, 2, FileName, NoOfPages
IF K GO ERROR
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDX (FILE %Address of file name string.
LDT (PAGES %Address of double word with number of pages.
MON 231 %Monitor call ExpandFile.
JMP ERROR %Error return from monitor call.
... %Normal return.
ERROR, ... %Error number in register A.
...
FILE, 'EXAMPLE:SYMB' %File name.
PAGES, ... %A double word.
... %
ndmonlib implementation¶
Stub Registered MON_STATUS_NOT_IMPLEMENTED: the handler is a stub. mon_dispatch() in src/core/mon_dispatch.c reports the call as unimplemented without calling it.
| Handler | mon_231B_ExpandFile |
| Code lines | 7 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 191.