You can use both CnzConv and CONVCON macros to determine the name
or ID of a console.
Using CnzConv: To obtain the console ID for an input console
name, do the following steps:
- Clear the CnzConv parameter list by setting it to zeros.
- Specify the following parameters:
- CnzConv InConsoleName=MyConsoleName
- OutConsoleId=OutConsoleId
- Rtncode=CnzConvReturnCode
- Rsncode=CnzConvReasonCode
- Issue the CnzConv macro.
When CnzConvReturnCode is equal to CnzConvRc0_Ok, OutConsoleId
contains the output console id.
To obtain the console name for an input console ID, do the following
steps:
- Clear the CnzConv parameter list by setting it to zeros.
- Specify the following parameters:
- CnzConv InConsoleId=MyConsoleId
- OutConsoleName=OutConsoleName
- Rtncode=CnzConvReturnCode
- Rsncode=CnzConvReasonCode
- Issue the CnzConv macro.
When CnzConvReturnCode is equal to CnzConvRc0_Ok, OutConsoleName
contains the output console name.
Using CONVCON: To obtain the console ID for an input console
name, do the following steps:
- Clear the CONVCON parameter list by setting it to zeros.
- Initialize the following fields in the parameter list:
- The version ID (CONVVRSN)
- The acronym (CONVACRO)
- The console ID (CONVID)
- The flag indicating that you are supplying the console ID (flag
CONVPID in CONVFLGS)
- Issue the CONVCON macro.
When CONVCON completes, the console name is in the parameter
list field CONVNAME, and register 15 contains a return code.
To obtain the console name for an input console ID, do the following
steps:
- Clear the CONVCON parameter list by setting it to zeros.
- Initialize the following fields in the parameter list:
- The version ID (CONVVRSN)
- The acronym (CONVACRO)
- The console name (CONVFLD)
- The flag bit indicating that you are supplying the console name
(flag CONVPFLD in CONVFLGS)
If the console name in CONVFLD is less than 10 characters,
pad the name with blanks.
The installation defines console
names at initialization time in the CONSOLxx member of parmlib. You
can use the DISPLAY CONSOLES command to receive a list of defined
names.
- Issue the CONVCON macro.
When CONVCON completes, the console ID will be in the parameter
field CONVID.