Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.jzos.sample
Class MvsJobOutput

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

    public class MvsJobOutput

extends java.lang.Object

Sample program which reads all sysout data for a MvsJob (jobname and jobid), and writes the output to a specified Writer.

The class relies on the sample Rexx script "jobOutput", spawned as a child process via the `Exec` class.

Field Summary
`static java.lang.String` | `JOB_OUTPUT_CMD`

Constructor Summary
`MvsJobOutput()`

Method Summary
`protected static java.lang.String[]` | `getEnvironment()`
`protected static java.lang.String` | `getJobOutputCommand(MvsJob mvsJob)`
`static void` | `main(java.lang.String[] args)` A sample main method that writes sysout output for a job to System.out (STDOUT).
`static void` | `writeJobOutput(MvsJob mvsJob, java.io.Writer writer)` Writes all of the output for a given job to a writer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### JOB_OUTPUT_CMD

    public static final java.lang.String JOB_OUTPUT_CMD

See Also:
  Constant Field Values

Constructor Detail

### MvsJobOutput

    public MvsJobOutput()

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.io.IOException

  A sample main method that writes sysout output for a job to System.out (STDOUT).

  The first argument is the jobname, and the second argument is the jobid (JOBnnnnn).

  Throws:
    `java.io.IOException`

### writeJobOutput

    public static void writeJobOutput(MvsJob mvsJob,
                                      java.io.Writer writer)
                               throws java.io.IOException

  Writes all of the output for a given job to a writer. Note: this method flushes the writer, but does not close it; it is the callers' responsibility to close the writer.

  Throws:
    `java.io.IOException`

### getJobOutputCommand

    protected static java.lang.String getJobOutputCommand(MvsJob mvsJob)

### getEnvironment

    protected static java.lang.String[] getEnvironment()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD