com.ibm.as400.util.commtrace

Class CommTrace

  • java.lang.Object
    • java.awt.event.WindowAdapter
      • com.ibm.as400.util.commtrace.CommTrace
  • All Implemented Interfaces:
    java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.util.EventListener


    public class CommTrace
    extends java.awt.event.WindowAdapter
    Provides a front end for the Format class, to display and transfer a communications trace file.
    The trace must originate from a system (running OS/400 V5R2 or greater) and reside in the IFS directory structure.
    The trace should be created with the following sequence of commands:
     STRCMNTRC
     ENDCMNTRC
     DMPCMNTRC
     
    The next step is to either format the trace file, or transfer it to the local PC. The format can be done in two different ways.
    • Using the "Format" button on the main window.
    • Using the Commtrace->Format menu option
    The two options are equivalent.
    The format that will be performed can be affected by changing the selection of the "Remote" and "Local" radio button.

    If Remote is selected:
    The file will be formatted remotely on the IBM i system using JavaCommandCall. The output file will be an IFS file in the same directory as the trace but with a .bin extension appended. The progress of the format operation is not relayed to the Commtrace program unless the -verbose option is specified. A dialog will appear when the format has completed.
    The file will then be displayed on the local PC. Any previous format can be displayed by selecting the "Display" button or using the Commtrace->Display menu option.
    The formatted file could also be transfered to the local PC using the "Transfer" button or Commtrace->Transfer menu option and then displayed locally using the "Display" method.

    If Local is selected:
    The file must be transfered to the local PC using the transfer methods described above. A progress dialog will appear showing the transfer as it progresses.
    The file can then be formatted by selecting the Format button or menu option.
    A progress dialog will appear when formatting and display the progress of the format.
    After the formatting is complete the trace will be displayed as described in the FormatDisplay class.

    CommTrace can be run as an application as follows:
     java com.ibm.as400.commtrace.Commtrace [options]
     
    Options:
    -verbose/-v [true|false]
    Specifies whether to print status and other information to System.out
    • Constructor Summary

      Constructors 
      Constructor and Description
      CommTrace(java.lang.String[] args)
      Base constructor which creates a Commtrace.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] args)
      Called by the JVM to start the CommTrace Utility.
      void windowClosing(java.awt.event.WindowEvent e)
      Invoked when a window is in the process of being closed.
      • Methods inherited from class java.awt.event.WindowAdapter

        windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommTrace

        public CommTrace(java.lang.String[] args)
        Base constructor which creates a Commtrace.
        Parameters:
        args - The command line arguments
    • Method Detail

      • windowClosing

        public void windowClosing(java.awt.event.WindowEvent e)
        Invoked when a window is in the process of being closed.
        Specified by:
        windowClosing in interface java.awt.event.WindowListener
        Overrides:
        windowClosing in class java.awt.event.WindowAdapter
        Parameters:
        e - The event for this window.
      • main

        public static void main(java.lang.String[] args)
        Called by the JVM to start the CommTrace Utility.
        Parameters:
        args - The arguments from the command line.