Skip to content

241B NewUser

Stub   MON 241B (161 decimal) · Mnemonic SUSCN · Group: File Operations (manual section 2.4)

Available from: Background programs (manual compatibility box)

Emulation source: src/handlers/mon_241B_NewUser.c

Description

Switches the user name you are logged in under. The command is similar to logging out and then logging in as another user. Your program continues under this user name.

  • Restore the old user name with OldUser.
  • OldUser always resets the first user name. From the ND-100 you may execute NewUser more than once without OldUser in between. This is not the case from the ND-500.
  • If originally logged in as user RT, it is not possible to log in as user SYSTEM.

Parameters

Name Type Direction Description
UserName STRING In New user name.
UserPassword INTEGER2 In Password. Use the contents of the password location in the user entry.
ProjectPassword STRING In Project password.
UserType INTEGER2 Out Return status. Public users return 0. User SYSTEM returns 1. User RT returns 2.

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

See also

OldUser, @ENTER

Compatibility

Machines Users Programs
ND-100 and ND-500 User RT and user SYSTEM Background 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 ReturnStatus, UserPasswd
CHARACTER UserName*16, ProjPasswd*16
...
Monitor_Call1('NewUser', UserName(1:16), UserPasswd,
C ProjPasswd(1:16), ReturnStatus)
IF (ErrCode .NE. 0) THEN ...
UserName, ProjPasswd : PACKED ARRAY [0..15] OF CHAR;
UserPasswd : INTEGER2;
ReturnStatus : INTEGER2;
...
NewUser(UserName, UserPasswd, ProjPasswd, ReturnStatus);
IF ErrCode <> 0 THEN ...
01 UserName PIC X(16).
01 UserPasswd COMP.
01 ProjPasswd PIC X(16).
01 RetStat COMP.
01 ErrCode COMP.
...
MONITOR-CALL "NewUser" USING UserName, UserPasswd, ProjPasswd, RetStat.

CALL "CbError" USING ErrCode.
IF ErrCode NOT = 0 GO ...
UserType : W BLOCK 1
UserName : STRINGDATA 'A-HANSEN'''
UserPasswd : W BLOCK 1
ProjPasswd : STRING 40B
ErrCode : W BLOCK 1
NewUser : EQU 37B9 + 241B

...

CALLG NewUser, 4, UserName, UserPasswd, ProjPasswd, UserType
IF K GO ERROR

...

ERROR : W1 =: ErrCode      %ErrorCode in W1 register.
LDT (PROJP     %Address of project password.
LDX (USER     %Address of string containing user name.
LDA (PASSW    %User password coded as integer.
MON 241       %Monitor call NewUser.
JMP ERROR     %Error return from monitor call.
STA STAT      %Normal return, store status returned.

...


ERROR, ...     %Error number in register A.
USER, 'A-HANSEN'     %Use A-HANSEN as user name.
PASSW, ...     %Password as represented in the user entry.
PROJP, ...
STAT, 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_241B_NewUser
Code lines 8 (non-blank, non-comment lines in the file)

Source

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