RetrieveCommandInformation()
method
Description
The RetrieveCommandInformation
method queries the QCDRCMDI API for detailed information about a CL command.
It returns a CommandInformation
object containing attributes associated with the command, such as the associated processing program, source file and other relevant information.
This method uses the CMDI0100 format to retrieve basic information about the command.
Syntax
RetrieveCommandInformation(string commandName, string commandLibrary = "*LIBL")
Parameters
Name | Type | Description |
---|---|---|
commandName |
string |
The name of the command to query ( max 10 characters). |
commandLibrary |
string |
The library containing the command (max 10 characters, default: *LIBL ). |
Return
Returns a CommandInformation
object containing detailed information about the specified CL command.
CommandInformation
Class
Property | Type | Description |
---|---|---|
CommandName | string |
Name of CL command. |
CommandLibraryName | string |
Name of the library containing the command. |
CommandProcessingProgram | string |
Name of the order processing program (associated CL program). |
CommandProcessingProgramLibraryName | string |
Name of the library containing the order processing program. |
SourceFileName | string |
Name of the source file associated with the command. |
SourceFileLibraryName | string |
Name of the library containing the source file. |
SourceFileMemberName | string |
Name of the member of the source file associated with the command. |
ValidityCheckProgramName | string |
Name of the validity check program for the order. |
ValidityCheckProgramLibraryName | string |
Name of the library containing the validity check program. |
ModeInformation | string |
Command information mode (indicates how the command is executed). |
WhereAllowedToRun | string |
Indicates where the command is authorised to run (e.g. *BATCH, *INTERACTIVE, etc.). |
AllowLimitedUser | string |
Indicates whether the limited user can execute the command. |
MaximumPositionalParameters | int |
Maximum number of positional parameters accepted by the command. |
PromptMessageFileName | string |
Name of the prompt message file used by the command. |
PromptMessageFileLibraryName | string |
Name of the library containing the prompt message file. |
MessageFileName | string |
Name of the message file associated with the command. |
MessageFileLibraryName | string |
Name of the library containing the message file. |
HelpPanelGroupName | string |
Name of the group of help panels associated with the command. |
HelpPanelGroupLibraryName | string |
Name of the library containing the group of help panels. |
HelpIdentifier | string |
Command help identifier. |
SearchIndexName | string |
Name of the search index associated with the command. |
SearchIndexLibraryName | string |
Name of the library containing the search index. |
CurrentLibrary | string |
Name of the library active when the command is run. |
ProductLibrary | string |
Name of the product library associated with the order. |
PromptOverrideProgramName | string |
Name of the prompt replacement program for the order. |
PromptOverrideProgramLibraryName | string |
Name of the library containing the prompt replacement program. |
RestrictedToTargetRelease | string |
Indicates whether the command is restricted to a specific target version. |
TextDescription | string |
Text description of the order. |
CommandProcessingProgramCallState | string |
Call status for the order processing program. |
ValidityCheckProgramCallState | string |
Call status for the validity check program. |
PromptOverrideProgramCallState | string |
État d’appel pour le programme de remplacement de prompt. |
OffsetToHelpBookshelfInformation | int |
Offset to access Help Bookshelf information in the data block. |
LengthOfHelpBookshelfInformation | int |
Length of information on the help shelf. |
CodedCharacterSetID | int |
Coded character set identifier (CCSID) for the order. |
EnabledForGUIIndicator | string |
Activation indicator for the graphical user interface (GUI). |
ThreadsafeIndicator | string |
Thread safety indicator, specifying whether the command is compatible with multi-threaded execution. |
MultithreadedJobAction | string |
Action defined when the command is executed in a multi-threaded job. |
ProxyCommandIndicator | string |
Indicator showing whether the order is a proxy order. |
PromptMessageFileTextIndicator | string |
Text indicator for the prompt message file, specifying the source of the help text. |
Exceptions
- InvalidOperationException : Thrown when the size of the returned data is insufficient.
Examples of use
var commandInfo = conn.RetrieveCommandInformation("CRTLIB", "QSYS");
Console.WriteLine($"Command: {commandInfo.CommandName}, Processing Program: {commandInfo.CommandProcessingProgram}");
References
For more information on the QCDRCMDI API, see the official IBM documentation.