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

5 pts.
Tags:
AS/400 administration
AS/400 system administration
CL programming
CL programs
how to retrieve system name on which I am working in as/400??

Software/Hardware used:
as/400
ASKED: November 25, 2010  12:06 PM
UPDATED: November 29, 2010  2:13 PM

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:<pre>
dcl &SysName *char 10
rtvneta sysname( &SysName )</pre>
In HLLs such as RPG, the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fqwcrneta.htm”>Retrieve Network Attributes (QWCRNETA) API</a> 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” <b>is not</b> the same as the system’s <i>host name</i>. To retrieve the host name, use the <a href=”http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Fapis%2Fghostn.htm”>gethostname() — Retrieve Host Name — API</a> 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: 1  Reply

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • jinteik
    wrkjob then the system name will be shown like qpadev******
    16,930 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following