04d - IFS (EN)

NetServer for everyone – part 3

NetTools: manage NetServer from command line

In the first two articles NetServers for everyone we have configured the service And shared IFS resources . We did this using Navigator for io via OS API. There are very few commands available for NetServer. In short, you can start or stop the service via STRTCPSVR SERVER(NETSVR) or ENDTCPSVR SERVER ( NETSVR) .

If you find yourself unable to access Navigator for i, that can be a problem.

In this article we will see a rich set of commands that can be used in a 5250 session to carry out all operations with NetServer: the NetTools .

Install NetTools

The NetTools are available from the IBM version V5R2. It takes a little effort to install these provided tools as-is from IBM in the library QUSRTOOL extension .

If the QUSRTOOL library is not found on your system, you need to install the opt. 7 “Sample program library” of the operating system (product 5770SS1).

Having the library available, proceed with these simple instructions to install the NetTools:

  1. CRTLIB LIB(NETSRVCMD) TEXT('iSeries NetServer menu and commands')
  2. CALL QUSRTOOL/UNPACKAGE PARM('*ALL ' 1)
  3. CRTCLPGM NETSRVCMD/TZLSINST QUSRTOOL/QATTCL
  4. CALL NETSRVCMD/TZLSINST NETSRVCMD

That’s all. Now just add the library to the library list NETSRVCMD extension and view the menu NETS extension to have all these commands available:

Surely the most useful commands are 3. Add File Share ( ADDNSVFSHR ) to add shared resources, 12. Work with NetServer Users ( WRKNSVUSR ) to re-enable users and 15. Work with NetServer Sessions ( WRKNSVSSN ) to monitor all active client sessions on the NetServer.

Go into detail

Furthermore, this utility library is very interesting because we have the sources available, so there is excellent material for studying the operating system APIs.

The member TZLSINFO In the file QATTINFO of the library QUSRTOOL extension contains the NetTools technical documentation. It describes the purpose, installation instructions, and usage details. In the chapter “What is Created” all the sources that make up the NetTools are listed.

The NetServer APIs

In previous articles we had occasion to mention some of the APIs to manage and configure NetServer. Below you will find the complete list:

  • Guest User ID Setting: CALL QZLSCHSG (guest-user-profile X'00000000')
  • Change Server Information ( QZLSCHSI )
  • Change server name ( QZLSCHSN )
  • Start NetServer: CALL QZLSSTRS PARM('0' X'00000000')
  • Shutdown NetServer: CALL QZLSENDS extension PARM(X'00000000')
  • Sharing a folder: CALL QZLSADFS extension PARM(share-name 'folder-path' x'00000005' x'00000000' 'shared-description' x'00000001' x'ffffffff' x'00000000')
    the third parameter is the length of the string ‘folder-path’
    the sixth parameter sets the permission of the share (2 for read/write, 1 for read only)
  • Unsharing a folder: CALL QZLSRMS PARM(share-name x'00000000')
  • Change File Server Share ( QZLSCHFS )
  • Add Print Server Share ( QZLSADPS )
  • Change Print Server Share ( QZLSCHPS )
  • List server information ( QZLSLSTI )
  • Open List of Server Information ( QZLSOLST )
  • End Server Session ( QZLSENSS )

Bibliography

The main page of the IBM documentation on NetServer can be consulted at this link: https://www.ibm.com/docs/en/i/7.5?topic=services-i-netserver . Other useful resources can be found in the attached document:

In the next article we will talk about how access shared resources from a client .

Related Posts
NetServer for everyone – part 1

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

NetServer for everyone – part 2

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

NetServer for everyone – part 4

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

NetServer for everyone – part 5

A mini-serial guide to configuring, managing, using, and troubleshooting the IBM i NetServer

About author

IBM i's mentor IBM Champion 2021 for Power Systems

Leave a Reply

Your email address will not be published. Required fields are marked *