Skip to content

54B DeleteFile

Validated   MON 54B (44 decimal) · Mnemonic MDLFI · Group: File Operations (manual section 2.4)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_54B_DeleteFile.c

Description

Deletes a file. The pages of the file are released.

  • You must have directory access to the file in order to delete it. RT programs can delete a file if user RT has directory access to it.
  • Include a version number in the file name to delete specific versions of a file. Otherwise, all versions are deleted.

Parameters

Name Type Direction Description
FileName STRING In File name to delete. Include version number to delete specific version, otherwise all versions deleted.

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

See also

@DELETE-FILE, @DELETE-USERS-FILES, and CreateFile

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 No No No

Examples

From the manual (OCR text, not corrected).

BYTES : FileName(0:63)
...
ON ROUTINEERROR DO
    IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('DeleteFile', FileName)
CHARACTER FileName*64
...
Monitor_Call('DeleteFile', FileName(1:64))
IF (ErrCode .NE. 0) THEN ...
FileName : PACKED ARRAY [0..63] OF CHAR;
...
DeleteFile(FileName);
IF ErrCode <> 0 THEN ...
01 FileName PIC X(64).
01 ErrCode COMP.
...
MONITOR-CALL "DeleteFile" USING FileName.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
FileName : STRINGDATA 'EXAMPLE:SYMB'
ErrCode : W BLOCK 1
DeleteFile : EQU 37B9 + 54B

...
CALLG DeleteFile, 1, FileName
IF K GO ERROR
...
ERROR : W1 =: ErrCode
LDX   (FILE        %Load register X with address of file name.
MON   54           %Monitor call DeleteFile.
JMP   ERROR        %Error return from monitor call.
...                %Normal return.
ERROR, ...         %Error number in register A.
...
FILE, 'EXAMPLE:SYMB' %Delete file EXAMPLE:SYMB.




Scanned by Jonny Oddene for Sintran Data © 2020

ndmonlib implementation

Validated Registered MON_STATUS_VALIDATED in src/core/mon_registry.c: implemented, tested and working.

Handler mon_54B_DeleteFile
Code lines 42 (non-blank, non-comment lines in the file)

Notes from the handler source

src/handlers/mon_54B_DeleteFile.c line 37

Read filename string.
ND-500 passes filename args as DESCRIPTORS ([len, ptr]) - the same shape
MON 50B OPEN reads via mon_read_descriptor_string. The old raw-inline
mon_read_sintran_string read the descriptor words as characters and got an
empty string, so NC's scratch cleanup/finalization (its 54B deletes) all
failed silently. Read as a descriptor first; fall back to the raw reader
only if the descriptor is not usable.

Emulation research

Source

This section comes from the emulation: block of the call's YAML file in the NDInsight repo. It records what was learned while implementing the call in nd500x; its status is nd500x's, not ndmonlib's.

Status (nd500x) implemented
nd500x handler nd500x/src/libmon/handlers/mon_54B_DeleteFile.c
Last updated 2026-07-17

Return contract

  • Success: K flag cleared; the host file is removed.
  • Errors

    Code Octal Meaning
    46 056B No such file name
    111 157B Missing parameter
    124 174B Illegal parameter (empty file name, or host remove failed)

Verified

Claim Evidence
An empty name returns 174B (124 decimal) and a valid-but-nonexistent name returns 056B (46 decimal). Audited against the NC path; recorded as MATCH in nd500x/docs/MON_COMPLETENESS_MATRIX.md row 54B ("empty->124dec, valid+nomatch->46dec").

Unverified

  • Version handling is NOT modelled. The manual says: include a version number to delete a specific version, otherwise ALL versions are deleted. nd500x removes exactly one host file.
  • "You must have directory access to the file in order to delete it" and the RT-user rule are not modelled - there is no access-rights model.
  • "The pages of the file are released" has no meaning here - there is no page allocator.
  • Unlike 50B OPEN, this handler reads the name with mon_read_sintran_string (inline), NOT with the [len][ptr] descriptor reader. Whether real callers pass DeleteFile's name as a descriptor - as they demonstrably do for 50B OPEN, 221B CreateFile, 317B UECOM and 12B SETCM - has NOT been observed. If they do, this handler would read an empty name.
  • 54B has NOT been audited against the carve. nd500x/docs/HANDOFF_MON_COMPLETENESS.md lists 54B among the calls "NOT yet audited vs carve".

Sources

Doc Note
SINTRAN III Monitor Calls (ND-860228.2 EN) The manual page this YAML was extracted from.
nd500x/docs/MON_COMPLETENESS_MATRIX.md Row 54B MDLFI/DeleteFile - MATCH.

Source

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