About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Troubleshooting
Problem
This document provides the source code to create a program and command to easily enable a disabled NetServer user.
Resolving The Problem
A user can be enabled for use by NetServer by using the GO NETS menu, IBM Navigator for i, or by writing a program that makes use of the QZLSCHSI API. Because many people want a simple command-line option available to them to perform this task, IBM Support created a simple CL program to call the QZLSCHSI API. IBM is also providing the command source so that the program and command can be compiled to make it easier to use. The program takes a single user profile as an input parameter.
NOTE: Use of the QZLSCHSI API requires that you have *IOSYSCFG special authority. To use format ZLSS0200 to enable an IBM i NetServer user, you must also have *SECADM special authority and *OBJMGT and *USE authority to the system user profile.
NOTE: Use of the QZLSCHSI API requires that you have *IOSYSCFG special authority. To use format ZLSS0200 to enable an IBM i NetServer user, you must also have *SECADM special authority and *OBJMGT and *USE authority to the system user profile.
The QZLSCHSI API is documented in IBM Documentation.
README.TXT:
/**
* The information contained in this document has not been submitted
* to any formal tests and is distributed on an 'As is' basis
* without any warranty either expressed or implied. The use of this
* information or the implementation of any of these techniques is a
* customer responsibility and depends on the customer's ability to
* evaluate and integrate them into the customer's operation
* environment. While each item may have been reviewed by IBM
* for accuracy in a specific situation, there is no guarantee that the
* same or similar results will be obtained elsewhere. Customers
* attempting to adapt these techniques to their environments do so
* at their own risk.
*/
Use the commands below to compile the program and the command.
The following command has to be modified to reflect the name of the library where you have restored
the source file and the library that you want to compile the program to. I would recommend that
the program be compiled to a library that is in the system portion of your library list. Change
YOURSYSLIB with the system library that the command and program should be created in and change
YOURSCRLIB to the name of the library where the source file has been restored.
If you want users without *IOSYSCFG and *JOBCTL special authority to be able to run the command,
you need to make sure that the owner that compiles the program and command have those authorities
and then use the options below to allow the program to adopt that authority.
CRTBNDCL PGM(YOURSYSLIB/RSTNETUSRP) SRCFILE(YOURSRCLIB/RSTNETUSR)
SRCMBR(RSTNETUSRP) OPTION(*EVENTF) USRPRF(*OWNER) REPLACE(*YES)
AUT(*USE) DBGVIEW(*SOURCE)
CRTCMD CMD(YOURSYSLIB/RSTNETUSR) PGM(YOURSYSLIB/RSTNETUSRP) SRCFILE(YOURSRCLIB/RSTNETUSR)
SRCMBR(RSTNETUSR) ALWLMTUSR(*YES) AUT(*USE) REPLACE(*YES)
Contents of the RSTNETUSRP.CLLE member
PGM PARM(&USRPRF)
/**************************************************************************/
/* */
/* The information contained in this document has not been submitted */
/* to any formal tests and is distributed on an 'As is' basis */
/* without any warranty either expressed or implied. The use of this */
/* information or the implementation of any of these techniques is a */
/* customer responsibility and depends on the customer's ability to */
/* evaluate and integrate them into the customer's operation */
/* environment. While each item may have been reviewed by IBM */
/* for accuracy in a specific situation, there is no guarantee that the */
/* same or similar results will be obtained elsewhere. Customers */
/* attempting to adapt these techniques to their environments do so */
/* at their own risk. */
/* */
/**************************************************************************/
/***********************************************************/
/* This program calls the QZLSCHSI API to re-enable a */
/* disabled NetServer user profile. */
/* */
/* Change Server Information (QZLSCHSI) API */
/* */
/* Required Parameter Group: */
/* */
/* 1 Request variable Input Char(*) */
/* 2 Length of request variable Input Binary(4) */
/* 3 Format Input Char(8) */
/* 4 Error Code I/O Char(*) */
/* */
/* Default Public Authority: *USE */
/* */
/* Threadsafe: No */
/* */
/***********************************************************/
DCL VAR(&USRPRF) TYPE(*CHAR) STG(*AUTO) LEN(10)
DCL VAR(&RQSVAR) TYPE(*CHAR) LEN(14)
DCL VAR(&RQSLEN) TYPE(*INT) VALUE(14)
DCLPRCOPT TEXT('Reset NetServer User') USRPRF(*OWNER)
/* Note that the first part of the value below is four */
/* (4) spaces. This sometimes appears compressed to */
/* when viewed on the web. */
CHGVAR VAR(&RQSVAR) VALUE(' ' *CAT &USRPRF)
CHGVAR VAR(%BINARY(&RQSVAR 1 4)) VALUE(&RQSLEN)
CALL QSYS/QZLSCHSI PARM(&RQSVAR &RQSLEN ZLSS0200 X'00000000')
ENDPGM
Contents of the RSTNETUSR.CMD member
CMD PROMPT('Enable a NetServer User')
PARM KWD(USER) TYPE(*CHAR) LEN(10) PROMPT('User Profile +
To Enable')
A save file with a source file with the three members listed above can be obtained from the following URL: https://public.dhe.ibm.com/services/us/igsc/cs2/ApiSamples/
Related Information
[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"ARM Category":[{"code":"a8m0z0000000CLSAA2","label":"Integrated File System-\u003ENetServer"}],"ARM Case Number":"","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"All Versions"}]
Historical Number
633149683
Was this topic helpful?
Document Information
More support for:
IBM i
Component:
Integrated File System->NetServer
Software version:
All Versions
Operating system(s):
IBM i
Document number:
684479
Modified date:
16 May 2025
UID
nas8N1010992
Manage My Notification Subscriptions