Sample Java programs for the IBM JZOS toolkit:
- jzos_sample_2.3.0.zip (source and compiled Java samples) Download
Javadoc for the IBM JZOS toolkit:
- jzos_2.3.0_javadoc.zip (javadoc source) Download
A summary of sample programs (all in package com.ibm.jzos.sample) follows:
Sample program that uses BPXWDYN to dynamically allocate a new dataset with the same attributes as a given dataset, and then copy the original to the new dataset. The name of the source dataset and target dataset names are given as arguments.
Sample program that uses the FileFactory class to copy a text file or dataset. The input and output file names are given as arguments to main, and they may be either POSIX (HFS) file names or MVS dataset names.
Simple class that says hello on System.out and System.err.
Sample program that lists a PDS directory.
Sample program that dumps 500 bytes from the CVT to System.out.
Simple class used to display Java system properties and selected system environment variables.
Sample program that uses the ZFile class to copy an MVS dataset in record mode from DD INPUT to DD OUTPUT.
Sample program that inserts, updates, locates, and deletes records in a VSAM KSDS using a JZOS ZFile.
Sample program that prints an EBCDIC MVS dataset pointed to by //INPUT DD to System.out (stdout).
Samples added in JZOS 2.2.1
This sample shows how JZOS can be used to interact with the MVS console.
This sample demonstrates a main program that can be used to wrap another main program while redirecting System.in and System.out to the MVS console.
Sample program that uses CatalogSearch, LOCATE and OBTAIN to display information about datasets matching a filter key.
Sample program which reads all sysout data for a MvsJob (jobname and jobid), and writes the output to a specified Writer.
Sample program which submits a job to the internal reader, returning a MvsJob object containing the jobname and jobid.
Sample classes which use the com.ibm.jzos.fields converter classes to map a z/OS format 5 DSCB into a java record.
Sample classes which use the com.ibm.jzos.fields converter classes to map some components of an Smf83 record.