java.lang.Object
com.ibm.jzos.sample.MvsJobOutput
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.- Since:
- 2.1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the job status using the TSO "status" command, which is invoked via the "jobStatus" REXX USS script.static voidA sample main method that writes sysout output for a job to System.out (STDOUT).static voidwriteJobOutput(MvsJob mvsJob, Writer writer) Writes all of the output for a given job to a writer.
-
Field Details
-
JOB_STATUS_CMD
- See Also:
-
JOB_OUTPUT_CMD
- See Also:
-
-
Constructor Details
-
MvsJobOutput
public MvsJobOutput()
-
-
Method Details
-
main
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:
IOException
-
getStatus
Returns the job status using the TSO "status" command, which is invoked via the "jobStatus" REXX USS script.- Returns:
- String the TSO "STATUS" command status
- Throws:
IOException- if there was an error communicating with the child REXX script process
-
writeJobOutput
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 caller's responsibility to close the writer.- Throws:
IOException
-