I want to know the name of the iSeries system. How can I retrieve the system name in the CL program?
Sorry, you do not have permission to ask a question, You must login to ask a question.
Sorry, you do not have permission to ask a question.
I want to know the name of the iSeries system. How can I retrieve the system name in the CL program?
To retrieve the iSeries system name, you can call a simple CL program and retrieve the value in the output parameter.
Here is a sample CL program source code:
Here is the explanation of the program
Line 1: Begin the CL program with parameters. Based on program logic, each parameter can be input or output, whether we supply a value to be used in a program or get back a value from the program. Here,
SYSNAME
is an output parameter, i.e., this program will return the iSeries system name.Line 2: Declare a variable
& SYSNAME
of type character and length 10.Line 3: Use the Retrieve network attributes (
RTVNETA
) command with the optional parameterSYSNAME
to retrieve the system name of the iSeries in variable& SYSNAME
. This will return the iSeries system name in variable& SYSNAME
.Line 4: End of CL program.