Skip to content

274B GetFileIndexes

Stub   MON 274B (188 decimal) · Mnemonic FOBJN · Group: File System Operations (manual section 2.9)

Available from: All programs (manual compatibility box)

Emulation source: src/handlers/mon_274B_GetFileIndexes.c

Description

Gets the directory index, the user index, and the object index of a file. These are indexes in the file system. See the SINTRAN III System Supervisor {ND-830003} for more details.

  • The file need not be open.

Parameters

Name Type Direction Description
FileName STRING In File name. Abbreviated file names are less efficient.
FileType STRING In File type. Not used on the ND-100. Do not include the colon.
DirIndex INTEGER2 Out Directory index.
UserIndex INTEGER2 Out User index.
ObjectIndex INTEGER2 Out Object index.
NextObjectIndex INTEGER2 Out Object index of the next file version. Equal to object index if no more versions exist.

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

See also

GetAllFileIndexes, GetDirUserIndexes, GetDirNameIndex, GetDirEntry, GetUserEntry, GetObjectEntry, and GetDefaultDir

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

BYTES : FileName(0:63), FileType(0:3)
INTEGER : DirIndex, UserIndex, ObjectIndex, NextObjectIndex
...
ON ROUTINEERROR DO
  IF ErrCode >< 0 THEN ...
ENDON
Monitor_Call('GetFileIndexes', FileName, FileType, DirIndex, &
             UserIndex, ObjectIndex, NextObjectIndex)
CHARACTER  FileName*64, FileType*4
INTEGER DirIndex, UserIndex, ObjectIndex, NextObjectIndex
...
Monitor_Call('GetFileIndexes', FileName(1:64), FileType(1:4),
 C      DirIndex, UserIndex, ObjectIndex, NextObjectIndex)
IF (ErrCode .NE. 0) THEN ...
FileName : PACKED ARRAY [0..63] OF CHAR;
FileType : PACKED ARRAY [0..3] OF CHAR;
DirIndex, UserIndex, ObjectIndex, NextObjectIndex : INTEGER2;
...
FindFileIndexes(FileName, FileType, DirIndex, UserIndex,
  ObjectIndex, NextObjectIndex); [Note routine name.]

IF ErrCode <> 0 THEN ...
01 FileName PIC X(64).
01 FileType PIC X(4).
01 DirIndex COMP.
01 UserIndex COMP.
01 ObjectIndex COMP.
01 NextObjectIndex COMP.
01 ErrCode COMP.
...
MONITOR-CALL "GetfileIndexes" USING FileName, FileType, DirIndex,
  UserIndex, ObjectIndex, NextObjectIndex.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
FileName : STRING 64
FileType : STRING 4
DirIndex : W BLOCK 1
UserIndex : W BLOCK 1
ObjectIndex : W BLOCK 1
NextObjectIndex : W BLOCK 1
ErrCode : W BLOCK 1
GetFileIndexes : EQU 37B9 + 274B
...
  CALLG GetFileIndexes, 6, FileName, FileType, DirIndex, &
        UserIndex, ObjectIndex, NextObjectIndex
  IF K GO ERROR
...

ERROR : W1 =: ErrCode                     %ErrorCode in W1 register.
LDX  (FILE            %Address of file name string.
MON  274              %Monitor call GetFileIndexes.
JMP  ERROR            %Error return from monitor call.
STT  INDEX            %Normal return, store obtained indexes.
STA  OBJIX            %Store object index.
COPY SD DA
STA  NEXTO            %Store object index of next version.
...
ERROR, ...            %Error number in register A.

FILE,   'EXAMPLE:SYMB' %Obtain object index of file EXAMPLE:SYMB.
INDEX,  0             %Directory index in left byte. User index right.
OBJIX,  0
NEXTO,  0

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

Source

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