|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.as400.access.Command
public class Command extends Object implements Serializable
Represents information about a CL command (*CMD) object on the system.
To actually execute a CL command, use the
CommandCall
class.
To generate HTML help for a CL command, see the
CommandHelpRetriever
utility.
Modifier and Type | Field and Description |
---|---|
static byte |
ACTION_ESCAPE_MESSAGE
Constant indicating that the multithreaded job action used by the command is not to run the command, but issue an escape message instead. |
static byte |
ACTION_INFO_MESSAGE
Constant indicating that the multithreaded job action used by the command is to run the command and issue an informational message. |
static byte |
ACTION_NO_MESSAGE
Constant indicating that the multithreaded job action used by the command is to run the command and issue no messages. |
static byte |
ACTION_SYSTEM_VALUE
Constant indicating that the multithreaded job action used by the command is specified by the QMLTTHDACN system value. |
static int |
ALLOW_ALL
Constant indicating that the command is allowed to run in all environments. |
static int |
ALLOW_BATCH_JOB
Constant indicating that the command is allowed to run in a batch job (*BATCH). |
static int |
ALLOW_BATCH_PROGRAM
Constant indicating that the command is allowed to run in a batch program (*BPGM). |
static int |
ALLOW_BATCH_REXX_PROCEDURE
Constant indicating that the command is allowed to run in a batch REXX procedure (*BREXX). |
static int |
ALLOW_EXEC
Constant indicating that the command is allowed to run using QCMDEXC, QCAEXEC, or QCAPCMD (*EXEC). |
static int |
ALLOW_INTERACTIVE_JOB
Constant indicating that the command is allowed to run in an interactive job (*INTERACT). |
static int |
ALLOW_INTERACTIVE_PROGRAM
Constant indicating that the command is allowed to run in an interactive program (*IPGM). |
static int |
ALLOW_INTERACTIVE_REXX_PROCEDURE
Constant indicating that the command is allowed to run in an interactive REXX procedure (*IREXX). |
static int |
MODE_ALL
Constant indicating that the command will run in all modes. |
static int |
MODE_DEBUG
Constant indicating that the command will run in debug mode of the operating environment. |
static int |
MODE_PRODUCTION
Constant indicating that the command will run in production mode of the operating environment. |
static int |
MODE_SERVICE
Constant indicating that the command will run in service mode of the operating environment. |
static String |
SYSTEM_STATE
Constant indicating that a program is called from system state. |
static byte |
THREADSAFE_CONDITIONAL
Constant indicating that the command is threadsafe under certain conditions. |
static byte |
THREADSAFE_NO
Constant indicating that the command is not threadsafe. |
static byte |
THREADSAFE_YES
Constant indicating that the command is threadsafe. |
static String |
USER_STATE
Constant indicating that a program is called from user state. |
Constructor and Description |
---|
Command()
Constructs a Command object. |
Command(AS400 system,
String path)
Constructs a Command object. |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a PropertyChangeListener. |
boolean |
allowsLimitedUser()
Indicates whether or not a user with limited authorities is allowed to run this command. |
int |
getCCSID()
Returns the coded character set ID (CCSID) associated with this command. |
String |
getCommandProcessingProgram()
Returns the fully qualified integrated file system path of the program that accepts parameters from this command processes this command. |
String |
getCommandProcessingState()
Returns the state from which the command processing program is called. |
String |
getCurrentLibrary()
Returns the library used as the current library during the processing of this command. |
String |
getDescription()
Returns the user text used to briefly describe this command and its function. |
String |
getHelpIdentifier()
Returns the name of the general help module for the names of the help identifiers for this command. |
PanelGroup |
getHelpPanelGroup()
Returns the fully integrated file system path of the help panel group in which the online help information exists for this command. |
String |
getHelpSearchIndex()
Returns the fully qualified integrated file system path of the help search index used for this command. |
int |
getMaximumPositionalParameters()
Returns the maximum number of parameters that can be coded in a positional manner for this command. |
MessageFile |
getMessageFile()
Returns a MessageFile object representing the message file from which messages identified on the DEP statements used to define the command are retrieved. |
byte |
getMultithreadedJobAction()
Returns the action taken when a command that is not threadsafe is called in a multithreaded job. |
String |
getPath()
Returns the path name of this Command object. |
String |
getProductLibrary()
Returns the library that is in effect during the processing of the command. |
MessageFile |
getPromptMessageFile()
Returns a MessageFile object representing the message file that contains the prompt text for this command. |
String |
getPromptOverrideProgram()
Returns the fully qualified integrated file system path of the program that replaces default values on the prompt display with the current actual values for the parameter. |
String |
getPromptOverrideState()
Returns the state from which the prompt override program is called. |
String |
getRestrictedRelease()
Returns the version, release, and modification level to which this command is restricted. |
String |
getSourceFile()
Returns the fully qualified integrated file system path of the source file member that contains the command definition statements used to create this command. |
AS400 |
getSystem()
Returns the system object for this command. |
byte |
getThreadSafety()
Returns the type of threadsafety for this command; that is, whether or not this command can be used safely in a multithreaded job. |
String |
getValidityCheckProgram()
Returns the fully qualified integrated file system path of the program that performs additional user-defined validity checking on the parameters for this command. |
String |
getValidityCheckState()
Returns the state from which the validity check program is called. |
String |
getWhereAllowedToRun()
Returns the API string for the "where allowed to run" field. |
String |
getXML()
Retrieves the XML source for this CL command. |
String |
getXMLExtended()
Retrieves the extended XML source for this CL command. |
PanelGroupHelpIdentifier[] |
getXMLHelpIdentifiers()
Parses the XML source for this CL command and returns the help identifiers. |
String |
getXMLHelpText()
Parses the XML source for this CL command and returns the help text. |
String |
getXMLHelpText(PanelGroup panelGroup)
Parses the XML source for this CL command and returns the help text. |
String |
getXMLPanelGroup()
Parses the XML source for this CL command and returns the name of the panel group. |
String |
getXMLProductLibrary()
Parses the XML source for this CL command and returns the product library. |
boolean |
isAllowedToRun(int environment)
Indicates whether the command is allowed to run in the specified environment. |
boolean |
isAllowedToRunBatch()
Indicates whether or not this command is allowed to run in one or more of the batch environments: ALLOW_BATCH_PROGRAM
ALLOW_BATCH_JOB
ALLOW_BATCH_REXX_PROCEDURE
|
boolean |
isAllowedToRunInteractive()
Indicates whether or not this command is allowed to run in one or more of the interactive environments: ALLOW_INTERACTIVE_PROGRAM
ALLOW_INTERACTIVE_JOB
ALLOW_INTERACTIVE_REXX_PROCEDURE
|
boolean |
isEnabledForGUI()
Indicates whether or not the command prompt panels are enabled for conversion to a graphical user interface. |
boolean |
isOperatingMode(int mode)
Indicates if this command applies to the specified mode of operating environment. |
void |
refresh()
Refreshes the information for this Command object. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the PropertyChangeListener. |
void |
setPath(String path)
Sets the path name of the command. |
void |
setSystem(AS400 system)
Sets the system from which to retrieve the command list. |
String |
toString()
Returns a String representation of this Command. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final byte ACTION_ESCAPE_MESSAGE
getMultithreadedJobAction()
,
Constant Field Valuespublic static final byte ACTION_INFO_MESSAGE
getMultithreadedJobAction()
,
Constant Field Valuespublic static final byte ACTION_NO_MESSAGE
getMultithreadedJobAction()
,
Constant Field Valuespublic static final byte ACTION_SYSTEM_VALUE
getMultithreadedJobAction()
,
Constant Field Valuespublic static final int ALLOW_ALL
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_BATCH_JOB
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_BATCH_PROGRAM
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_BATCH_REXX_PROCEDURE
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_EXEC
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_INTERACTIVE_JOB
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_INTERACTIVE_PROGRAM
isAllowedToRun(int)
,
Constant Field Valuespublic static final int ALLOW_INTERACTIVE_REXX_PROCEDURE
isAllowedToRun(int)
,
Constant Field Valuespublic static final int MODE_ALL
isOperatingMode(int)
,
Constant Field Valuespublic static final int MODE_DEBUG
isOperatingMode(int)
,
Constant Field Valuespublic static final int MODE_PRODUCTION
isOperatingMode(int)
,
Constant Field Valuespublic static final int MODE_SERVICE
isOperatingMode(int)
,
Constant Field Valuespublic static final String SYSTEM_STATE
USER_STATE
,
Constant Field Valuespublic static final byte THREADSAFE_CONDITIONAL
THREADSAFE_NO
,
THREADSAFE_YES
,
getThreadSafety()
,
Constant Field Valuespublic static final byte THREADSAFE_NO
THREADSAFE_CONDITIONAL
,
THREADSAFE_YES
,
getThreadSafety()
,
Constant Field Valuespublic static final byte THREADSAFE_YES
THREADSAFE_CONDITIONAL
,
THREADSAFE_NO
,
getThreadSafety()
,
Constant Field Valuespublic static final String USER_STATE
SYSTEM_STATE
,
Constant Field ValuesConstructor Detail |
---|
public Command()
setPath(java.lang.String)
,
setSystem(com.ibm.as400.access.AS400)
public Command(AS400 system, String path)
system
- The system on which the command resides.path
- The fully qualified integrated file system path of the command,
e.g. "/QSYS.LIB/CRTUSRPRF.CMD".QSYSObjectPathName
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener.public boolean allowsLimitedUser() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public int getCCSID() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getCommandProcessingProgram() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getCommandProcessingState() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
SYSTEM_STATE
- The command processing program is called from system state.
USER_STATE
- The command processing program is called from user state.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getCurrentLibrary() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getDescription() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getHelpIdentifier() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public PanelGroup getHelpPanelGroup() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getHelpSearchIndex() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public int getMaximumPositionalParameters() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public MessageFile getMessageFile() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public byte getMultithreadedJobAction() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
ACTION_SYSTEM_VALUE
- Use the action specified
in the QMLTTHDACN system value.
ACTION_NO_MESSAGE
- Run the command. Do not
send a message.
ACTION_INFO_MESSAGE
- Send an informational
message and run the command.
ACTION_ESCAPE_MESSAGE
- Send an escape
message and do not run the command.
THREADSAFE_YES
or THREADSAFE_CONDITIONAL
,
then the multithreaded job action will be returned as ACTION_NO_MESSAGE
.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
getThreadSafety()
public String getPath()
setPath(java.lang.String)
public String getProductLibrary() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public MessageFile getPromptMessageFile() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getPromptOverrideProgram() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getPromptOverrideState() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
SYSTEM_STATE
- The prompt override program is called from system state.
USER_STATE
- The prompt override program is called from user state.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getRestrictedRelease() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
AS400.getVRM()
public String getSourceFile() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public AS400 getSystem()
public byte getThreadSafety() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
THREADSAFE_NO
- This command is not threadsafe and should not be
used in a multithreaded job. The value for the multithreaded job action defines the action
to be taken by the command analyzer when the command is used in a multithreaded job.
THREADSAFE_YES
- This command is threadsafe and can be used
safely in a multithreaded job.
THREADSAFE_CONDITIONAL
- This command is threadsafe
under certain conditions. See the documentation for the command to determine the conditions
under which the command can be used safely in a multithreaded job.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
getMultithreadedJobAction()
public String getValidityCheckProgram() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getValidityCheckState() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
SYSTEM_STATE
- The validity check program is called from system state.
USER_STATE
- The validity check program is called from user state.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getWhereAllowedToRun() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getXML() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public String getXMLExtended() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
getXML()
.
Note: This method uses the CMDD0200 format on the QCDRCMDD API. If the system does not support this format, an AS400Exception will be thrown with a message ID of CPF3C21, and you should use the getXML() method instead.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
getXML()
public PanelGroupHelpIdentifier[] getXMLHelpIdentifiers() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
public String getXMLProductLibrary() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
public String getXMLPanelGroup() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
public String getXMLHelpText() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
public String getXMLHelpText(PanelGroup panelGroup) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException
getXMLHelpText()
.
panelGroup
- The panel group used to generate the help text, instead of the Command's defined panel group.AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
getXMLPanelGroup()
public boolean isAllowedToRun(int environment) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
environment
- The environment to check. Possible values are:
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public boolean isAllowedToRunBatch() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
isAllowedToRun(int)
public boolean isAllowedToRunInteractive() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
isAllowedToRun(int)
public boolean isEnabledForGUI() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public boolean isOperatingMode(int mode) throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException
mode
- The operating mode to check. Possible values are:
MODE_PRODUCTION
- Production mode.
MODE_DEBUG
- Debug mode.
MODE_SERVICE
- Service mode.
MODE_ALL
- All of the above modes.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
public void refresh() throws AS400Exception, AS400SecurityException, ErrorCompletingRequestException, IOException, InterruptedException, ObjectDoesNotExistException, SAXException, ParserConfigurationException
getXMLExtended()
method.
The necessary information is implicitly refreshed by the various getter methods. The system and path must be set before refresh() is called.
AS400Exception
AS400SecurityException
ErrorCompletingRequestException
IOException
InterruptedException
ObjectDoesNotExistException
SAXException
ParserConfigurationException
setPath(java.lang.String)
,
setSystem(com.ibm.as400.access.AS400)
public void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener.public void setPath(String path)
path
- The command path, e.g. "/QSYS.LIB/CRTUSRPRF.CMD".getPath()
public void setSystem(AS400 system)
system
- The system from which to retrieve the commands.getSystem()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |