How to retrieve system name on which I am working in AS/400?

5 pts.
Tags:
AS/400 administration
CL Program
CL programming
How do I retrieve system name on which I am working in AS/400?

Software/Hardware used:
as/400

Answer Wiki

Thanks. We'll let you know when a new response is added.

A CL program (or module) can retrieve the system name this way:

dcl &SysName *char 10
rtvneta sysname( &SysName )

In HLLs such as RPG, the Retrieve Network Attributes (QWCRNETA) API can retrieve the same info. (The API can also be called in CL, but the RTVNETA command is easier.)

You need to be aware that the “system name” is not the same as the system’s host name. To retrieve the host name, use the gethostname() — Retrieve Host Name — API like you would on any system that runs TCP/IP.

Also be aware that a system name isn’t required to be unique. Some other identifier might be better in some cases. System serial number is an example.

Tom

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • jinteik
    wrkjob then the system name will be shown like qpadev******
    18,965 pointsBadges:
    report
  • Gayathri123
    Please use the command "DSPNETA". The "current system name" parameter will give the name of the system you are working with.
    625 pointsBadges:
    report
  • ToddN2000
    It shows on the AS/400 sign on screen, and if you type DSPPTF it shows in the upper right. As well as other places.
    89,195 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: