NET/MASTER Network Control Language (NCL) Programmer's Guide
Accessing the User ID Management Services (UMS) Database
Advanced NCL Programming
106160 Tandem Computers Incorporated 18–5
Example. The following NCL procedure adds a new user to the UMS database:
zex1801n: PROCEDURE EXTPARSE SMART NOFOLD
/* Adds a new record to the UMS database */
/* &1 = User ID Required by SECCALL ADD */
/* &2 = Password Required by SECCALL ADD */
/* &3 = Class Required by SECCALL ADD */
/* &4 = Username Required by UMS */
/* &5 = GUID group Required by UMS */
/* &6 = GUID user Required by UMS */
/* &7 = User menu Required for main menu display */
/* &8 = OCS access Required for OCS access */
/* &9 = Edit access Required for Edit Services access */
/* &10 = Extlog Required for dynamic log on access */
SAY Creating an MDO variable with map $SEC
ASSIGN MDO=&abc. OPT=VALUE MAP=$SEC
&abc.username = &4
&abc.guardian_id{2} = D2C(&5,1) || D2C(&6,1)
&abc.user_menu = &7
&abc.ocs_access = &8
&abc.edit_access = &9
&abc.ext_log = &10
SAY Writing a record to the UMS database
SECCALL ADD USERID=&1 NEWPWD=&2 TYPE=&3 MDO=&abc.
SELECT &SYS.RETCODE
WHEN 0 THEN DO
SAY "0 Record added successfully"
SECCALL GET USERID=&1 MDO=&ums.
IF &SYS.RETCODE = 0 THEN
SAY "0 Record retrieved successfully"
ELSE
SAY "&SYS.RETCODE is "&SYS.RETCODE
END /*do*/
WHEN 4 THEN SAY "4 Record not added "&SYSMSG
OTHERWISE
SAY "&SYS.RETCODE is "&SYS.RETCODE
END /*select*/
END zex1801n
The user ID, password, class of user, username, the name of the NCL procedure to
invoke the main menu panel, and permissible options are specified as parameters
when the NCL procedure is executed.
Note Since passwords are case-sensitive, you must specify NOFOLD in the procedure declaration if you are
passing a password as a parameter to an NCL procedure executed using the EXEC or START command.