Skip to main content

IBM i NetServer

API mini-guide

IBM i NetServer is normally administered through the user interface provided in iSeries Navigator. However, you can also access the administration functions by calling the IBM i NetServer APIs. This page contains brief reference information to get you started. You may also visit the Information Center for complete API documentation in order to build your own administration interface.

Note: Starting in V5R2, you have the option of installing a green screen command menu of IBM i NetServer function. Click here for details.

Following is a partial list of the APIs available for administration of the IBM i NetServer. They do not include the latest parameter options, however, they demonstrate the use for all the required parameters. The error code structure is always the last parameter and in these examples x'00000000' is being used instead of the actual structure. For more information about the error code structure reference the iSeries System API guide, SC41-4801-00.

Note: Server configuration changes will take place the next time IBM i NetServer is started. All share addition, changes and removal, will take place immediately.

Start/Stop IBM i NetServer

CALL QZLSSTRS PARM('0' x'00000000')

Start IBM i NetServer. See the QZLSSERVER job under the QSERVER subsystem. The QZLSSERVER is automatically started every time the QSERVER subsystem is started.

Parameters:

 CALL QZLSENDS PARM(x'00000000')

End IBM i NetServer.

Parameters:

Add/change a file share

CALL QZLSADFS PARM(MYSHARE '/Data' x'00000005' x'00000000'
 'My shared data folder' x'00000001' x'ffffffff' x'00000000')

CALL QZLSCHFS PARM(MYSHARE '/Data' x'00000005' x'00000000'
 'My shared data folder' x'00000002' x'ffffffff' x'00000000')

The first command adds the file share MYSHARE, which shares the /Data folder read-only. The second command changes the file share properties to be read-write.

Parameters:

Add/change a printer share

CALL QZLSADPS PARM(LASEROQ 'QPRINT    QGPL      '
 'Default iSeries outq' x'00000001' 'IBM 4039 LaserPrinter' 
  x'00000000')

CALL QZLSCHPS PARM(LASEROQ 'QPRINT    QGPL      '
 'LASEROQ iSeries outq' x'00000001' 'IBM 4039 LaserPrinter' 
  x'00000000')

Add or change a print server share. Takes effect immediately.

Parameters:

Remove share

CALL QZLSRMS PARM(MYSHARE x'00000000')

Remove a server share. Takes effect immediately.

Parameters:

Change Guest

CALL QZLSCHSG PARM(NETGUEST x'00000000')

Change server guest profile. The initial configuration is to disallow guest users from accessing shares. Note: The requested changes will take place the next time IBM i NetServer is started.

Change server information

CALL QZLSCHSI PARM(RequestVar x'00000112' ZLSS0100 x'00000000')

Change IBM i NetServer information/properties.

Parameters:

Change server name

CALL QZLSCHSN PARM(AWESERVE SMBMANIA 'demo server' x'00000000')

Change server name. Note: The requested changes will take place the next time IBM i NetServer is started.

Parameters:

List server information

CALL QUSCRTUS PARM('OUTDATA   QGPL      '
 PF 2048 X'00' *ALL 'API output space')
CALL QZLSLSTI PARM('OUTDATA   QGPL      '
 ZLSL0100 *ALL x'00000000')
DSPF STMF('/qsys.lib/qgpl.lib/outdata.usrspc')

List server information. Data is dumped to a user space. A program could be written to interpret the data.

QUSCRTUS Parameters:

QZLSLSTI Parameters:

DSPF Parameter:

End session

CALL QZLSENSS PARM(BUCKY x'00000000')

End server session(s) from workstation BUCKY.

Parameters:

We're here to help

Easy ways to get the answers you need.


or call us at
1-866-883-8901
Priority code:
101AR13W