Class MvsConsoleInteraction

java.lang.Object
com.ibm.jzos.sample.MvsConsoleInteraction

public class MvsConsoleInteraction extends Object
This sample shows how JZOS can be used to interact with the MVS console.

The main program enters a loop waiting for dataset names to be sent via the MVS modify command.

  • If a modify command with APPL=DSN is received, its record count is written to the console via a WTO and the datasetCount is incremented.
  • If a modify command with APPL=EXIT is received, the loop is abandond, the number of datasets processed is written to the MVS console and the program completes normally.
  • If a stop command is received, the number of datasets processed is written to the MVS console and the program is exited via System.exit()
  • Constructor Details

    • MvsConsoleInteraction

      public MvsConsoleInteraction()
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      This program issues a WTO requesting that a dataset name be sent via an operator modify command. The resulting string is used to open a ZFile that reads the dataset and counts the number of records.

      The program loops until the string "EXIT" is sent via the modify command or a STOP command is received. The STOP command is handled entirely by the mvsCallback.

      Throws:
      Exception