250B GetDefaultDir¶
Stub MON 250B (168 decimal) · Mnemonic FDFDI · Group: File System Operations (manual section 2.9)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_250B_GetDefaultDir.c
Description¶
Gets the user’s default directory. The directory index and the user index are returned.
- Use ExecutionInfo to get the user index and the directory index of the user executing the program.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
UserName |
STRING | In | User name string (16 chars). May identify remote user. |
DirectoryIndex |
INTEGER | Out | Directory index. |
UserIndex |
INTEGER | Out | User index in the directory. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
See also¶
GetDirUserIndexes, GetDirNameIndex, GetFileIndexes, GetDirEntry, GetUserEntry, GetObjectEntry, and GetAllFileIndexes
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).
INTEGER : DirectoryIndex, UserIndex
BYTES : UserName(0:15)
...
ON ROUTINEERROR DO
IF ErrCode >0 THEN ...
ENDON
Monitor_Call('GetDefaultDir', UserName, DirectoryIndex, UserIndex)
INTEGER DirIndex, UserIndex
CHARACTER UserName*16
...
Monitor_Call('GetDefaultDir', UserName(1:16), DirIndex, UserIndex)
IF (ErrCode .NE. 0) THEN ...
DirectoryIndex, UserIndex : INTEGER2;
UserName : PACKED ARRAY [0..15] OF CHAR;
...
GetDefaultDir(UserName, DirectoryIndex, UserIndex);
IF ErrCode <> 0 THEN ...
01 DirectoryIndex COMP.
01 UserIndex COMP.
01 UserName PIC X(16).
01 ErrCode COMP.
...
MONITOR-CALL "GetDefaultDir" USING UserName, DirectoryIndex, UserIndex.
CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
DirectoryIndex : W BLOCK 1
UserIndex : W BLOCK 1
UserName : STRINGDATA 'A-HANSEN'''
ErrCode : W BLOCK 1
GetDefaultDir : EQU 37B9 + 250B
...
CALLG GetDefaultDir, 3, UserName, DirectoryIndex, UserIndex
IF K GO ERROR
...
ERROR : W1 =: ErrCode %ErrorCode in W1 register.
LDX (USER %Address of string containing user name.
MON 250 %Monitor call GetDefaultDir.
JMP ERROR %Error return from monitor call.
STT DIRIX %Normal return, store directory index.
STX USRIX %Store user index in default directory.
...
ERROR, ... %Error number in register A.
...
USER, 'A-HANSEN' %To find default directory of user A-HANSEN.
DIRIX, 0
USRIX, 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_250B_GetDefaultDir |
| Code lines | 6 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 229.