Get System Name

GetSysName

The GetSysName procedure returns the system name.

The GetSysName procedure can be used to retrieve the system name as seen by APPC/APPN protocols. The CL command DSPNETA can be used to display the Current System Name which is the same value returned by this procedure. This is a high-speed interface and does not use the QWCRNETA API.

char-value GetSysName(
  nReserved        5I 0   Const Options(*NOPASS)
)

See also: GetSysValue GetCPUCount

Parameters

nReserved [ optional ]
[ input Int(2) const ] This parameter is reserved for future use, no value is required, or a value of zero (0) may be specified.

Return Value

If the function succeeds, the return value is the name of the system. As of this writing, system names are eight (8) positions in length.

If the function fails, the return value is empty.

Remarks

This procedure can not change the existing system name.

Example

To retrieve the system name and serial number, the following code may be used:

      /INCLUDE qcpysrc,sysvalue
.....DName+++++++++++EUDS.......Length+TDc.Functions++++++++++++++++++++++++++
     D SysName         S             10A   
     D SrlNbr          S             10A   
.....CSRn01..............OpCode(ex)Extended-factor2+++++++++++++++++++++++++++
     C                   eval      SysName = GetSysName()
     C                   eval      SrlNbr = GetSrlNbr()
 

The first calculation specification retrieves the system name, the second line retrieves the CPU serial number.