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

View Comments

Recent Posts

Managing Locked Display Files on IBM i: An Effective Solution

We are pleased to receive and share this "tip & trick" from Patrick Rizzi, which introduces a technique that allows…

2 weeks ago

Monitoring QSYSOPR Messages: SQL to Retrieve Messages and Replies

I take inspiration from a response by Michael Mayer on the Midrange.com mailing lists to someone who asked how to…

2 weeks ago

Why ERP is the Key to Success for Modern Businesses

Businesses are increasingly seeking tools to enhance efficiency, collaboration, and resource management. Enterprise Resource Planning (ERP) systems provide a comprehensive…

2 months ago

ACS Access Client Solution 1.1.9.5

Early April saw the release of the "Spring Version" of ACS Access Client Solution, version 1.1.9.5 Interesting new features especially…

7 months ago

Tim Rowe and Scott Forstie for CEC 2024 – Milan

If the packed agenda of sessions at Common Europe Congress 2024, June 3-6 Milan, wasn't enough for you, here's another…

7 months ago

Code for IBM i 2.10.0 – Debug IBM i App with Visual Studio Code

Debugging functions with Visual Studio Code have been available for some time but this new version 2.10.0 simplifies the handling…

7 months ago