com.ibm.as400.access

Class CommandList

  • All Implemented Interfaces:
    Serializable


    public class CommandList
    extends Object
    implements Serializable
    The CommandList class represents a list of CL command (*CMD) objects on the system. This class allows the user to retrieve a list of Command objects which can then be used to retrieve information about each individual CL command in the list.

    The following example demonstrates the use of CommandList:

    
        AS400 system = new AS400("mySystem");
    
        // Generate a list of commands that start with "CRT".
        CommandList list = new CommandList(system, "QSYS", "CRT*");
        try
        {
            Command[] cmdList = list.generateList();
        }
        catch (Exception e)
        {
            e.printStackTrace();
        }
      
    See Also:
    Command, Serialized Form
    • Constructor Detail

      • CommandList

        public CommandList()
        Constructs a CommandList object.
      • CommandList

        public CommandList(AS400 system,
                   String library,
                   String command)
        Constructs a CommandList object.
        Parameters:
        system - The system on which the commands resides.
        library - The library in which the commands resides, e.g. "QSYS".
        command - The name of a command or list of commands, e.g. "CRTUSRPRF" or "CRT*". Wildcards or the CommandList.ALL constant can be used.