Skip to content

273B GetFileName

Stub   MON 273B (187 decimal) · Mnemonic MGFIL · Group: File System Operations (manual section 2.9)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_273B_GetFileName.c

Description

Gets the name of a file. You specify the directory index, the user index, and the object index. The file name, the file type, and the version are returned.

  • The file need not be open.
  • On the ND-100 you may specify a file on a remote computer system. The computers must be connected through a COSMOS network.

Parameters

Name Type Direction Description
DirIndex INTEGER In Directory index.
UserIndex INTEGER In User index.
ObjectIndex INTEGER In Object index.
FileName STRING Out File name (64 chars).
RemoteFlag INTEGER In 0 for local file, 1 for remote file.
RemoteSystem STRING In/Out Remote system identification if remote flag is 1 (64 chars). Not returned by ND-500.

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

See also

FullFileName

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

Disagreement

The manual box says ND-100 and ND-500, but the yes/no fields say ND-100 = No, ND-500 = No. The manual box is the source.

Examples

From the manual (OCR text, not corrected).

INTEGER : DirIndex, UserIndex, ObjectIndex, RemoteFlag
BYTES : FileName(0:63), RemoteSystem(0:63)
...
ON ROUTINEERROR DO
    IF ErrCode > 0 THEN ...
ENDON
Monitor_Call('GetFileName', DirIndex, UserIndex, ObjectIndex, FileName,&
    RemoteFlag, RemoteSystem)
INTEGER DirIndex, UserIndex, ObjIndex, RemoteFlag
CHARACTER FileName*64, RemoteSystem*64
...
Monitor_Call('GetFileName', DirIndex, UserIndex, ObjIndex,
              FileName(1:64), RemoteFlag, RemoteSystem(1:64))
IF (ErrCode .NE. 0) THEN ...
DirIndex, UserIndex, ObjectIndex : INTEGER2;
FileName : PACKED ARRAY [0..63] OF CHAR;
...
GetFileName(DirIndex, UserIndex, ObjectIndex, FileName);
IF ErrCode <> 0 THEN ...
01 DirIndex COMP.
01 UserIndex COMP.
01 ObjectIndex COMP.
01 FileName PIC X(64).
01 RemoteFlag COMP.
01 RemoteSystem PIC X(64).
01 ErrCode COMP.
...
MONITOR-CALL "GetFileName" USING DirIndex, UserIndex, ObjectIndex,
                FileName, RemoteFlag, RemoteSystem.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DirIndex : W BLOCK 1
UserIndex : W BLOCK 1
ObjectIndex : W BLOCK 1
FileName : STRING 64
SysId : STRING 20 %Optional parameter if bit 7 in DirIndex is set.
ErrCode : W BLOCK 1
GetFileName : EQU 37B9 + 273B
...
CALLG GetFileName, 4, DirIndex, UserIndex, ObjectIndex, FileName
IF K GO ERROR
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDT INDEX %Left byte: dir index. Right byte: user index.
LDA (REMID) %Remote system identification in register D.
COPY SA DD %Used only if bit 15 in register A is set.
LDA OBJIX %Object index.
LDX (BUFF) %Address of buffer to receive file name.
MON 273 %Monitor call GetFileName.
JMP ERROR %Error return from monitor call.
...  %Normal return.
ERROR, ... %Error number in register A.

INDEX, ... %Set bit 15 if remote file.
OBJIX, ...
BUFF, 0 %
*+32/ %Make a buffer big enough to receive file name.
REMID, 0 %Remote identification string.
*+40/  %32 words for string.

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

Source

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