Running Format as a standalone program

In addition to using the Format class in your Java™ programs, you can run it as a standalone, command line utility to format a communications trace. The program connects an IFSFileOutputStream to the specified outfile and writes the data to that file.

Running format as a standalone utility enables you to format files by using the processing power and storage space of your iSeries™ server.

Running Format from a command line

To run the Format utility from a command line prompt, use the following command:

     java com.ibm.as400.commtrace.Format [options]

where [options] equals one or more of the available options. Options include:

For a complete list of available options, see the following information:

Javadoc reference documentation for the Format class

Running Format remotely

To run this class remotely use the JavaApplicationCall class:

     // Construct a JavaApplicationCall object.
     jaCall = new JavaApplicationCall(sys);
     // Set the Java application you want to run.
     jaCall.setJavaApplication("com.ibm.as400.util.commtrace.Format");
     // Set the classpath environment variable used by the JVM on
     // the server, so it can find the class to run.
     jaCall.setClassPath("/QIBM/ProdData/OS400/JT400/lib/JT400Native.jar");

     String[] args2 =
     { "-c", "true", "-t", "/path/to/trace", "-o", "/path/to/trace.extension"};

     jaCall.setParameters(args2);

     if (jaCall.run() != true) {
       // Call Failed
     }