Skip to content

236B SetPermanentOpen

Stub   MON 236B (158 decimal) · Mnemonic SPERD · Group: File Operations (manual section 2.4)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_236B_SetPermanentOpen.c

Description

Sets a file permanently open. The file is not closed by CloseFile with -1 as file number. You have to specify the file number or -2.

  • The file must already be open.
  • Only mass-storage files can be set permanently open.
  • The file is not closed when your program terminates.

Parameters

Name Type Direction Description
FileNumber INTEGER In File number returned from earlier open.

Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.

See also

OpenFile, CloseFile, and @SET-PERMANENT-OPEN

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).

INTEGER : FileNumber
...
ON ROUTINEERROR DO
     IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('SetPermanentOpen', FileNumber)
INTEGER FileNumber
...
Monitor_Call('SetPermanentOpen', FileNumber)
IF (ErrCode .NE. 0) THEN ...
FileNumber : INTEGER2;
...
SetPermanentOpen(FileNumber);
IF ErrCode <> 0 THEN ...
01 FileNumber COMP.
01 ErrCode COMP.
...
MONITOR-CALL "SetPermanentOpen" USING FileNumber.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
FileNumber : W BLOCK 1
ErrCode : W BLOCK 1
SetPermanentOpen : EQU 3789 + 236B
...
CALLG SetPermanentOpen, 1, FileNumber
     IF K GO ERROR
...
ERROR : W1 =: ErrCode       %ErrorCode in W1 register.
LDT     FILNO       %File number returned from earlier open.
MON     236         %Monitor call SetPermanentOpen.
JMP     ERROR       %Error return from monitor call.
...                 %Normal return.
ERROR, ...          %Error number in register A.
...
FILNO, ...

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_236B_SetPermanentOpen
Code lines 6 (non-blank, non-comment lines in the file)

Source

SINTRAN III Monitor Calls (ND-860228.2 EN), page 459.