com.ibm.as400.access

Class Command

  • java.lang.Object
    • com.ibm.as400.access.Command
  • All Implemented Interfaces:
    java.io.Serializable


    public class Command
    extends java.lang.Object
    implements java.io.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.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      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 java.lang.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 java.lang.String USER_STATE
      Constant indicating that a program is called from user state.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Command()
      Constructs a Command object.
      Command(AS400 system, java.lang.String path)
      Constructs a Command object.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void addPropertyChangeListener(java.beans.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.
      java.lang.String getCommandProcessingProgram()
      Returns the fully qualified integrated file system path of the program that accepts parameters from this command processes this command.
      java.lang.String getCommandProcessingState()
      Returns the state from which the command processing program is called.
      java.lang.String getCurrentLibrary()
      Returns the library used as the current library during the processing of this command.
      java.lang.String getDescription()
      Returns the user text used to briefly describe this command and its function.
      java.lang.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.
      java.lang.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.
      java.lang.String getPath()
      Returns the path name of this Command object.
      java.lang.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.
      java.lang.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.
      java.lang.String getPromptOverrideState()
      Returns the state from which the prompt override program is called.
      java.lang.String getRestrictedRelease()
      Returns the version, release, and modification level to which this command is restricted.
      java.lang.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.
      java.lang.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.
      java.lang.String getValidityCheckState()
      Returns the state from which the validity check program is called.
      java.lang.String getWhereAllowedToRun()
      Returns the API string for the "where allowed to run" field.
      java.lang.String getXML()
      Retrieves the XML source for this CL command.
      java.lang.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.
      java.lang.String getXMLHelpText()
      Parses the XML source for this CL command and returns the help text.
      java.lang.String getXMLHelpText(PanelGroup panelGroup)
      Parses the XML source for this CL command and returns the help text.
      java.lang.String getXMLPanelGroup()
      Parses the XML source for this CL command and returns the name of the panel group.
      java.lang.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(java.beans.PropertyChangeListener listener)
      Removes the PropertyChangeListener.
      void setPath(java.lang.String path)
      Sets the path name of the command.
      void setSystem(AS400 system)
      Sets the system from which to retrieve the command list.
      java.lang.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