Exploring the sample files
Within this documentation we refer to a set of sample files that you can use to explore the editor features. These samples are provided on Github.com.
Get the sample files
Assuming that you have Git installed as described in the Prerequisites, create a work directory somewhere on your machine and clone the sample repository:
git clone https://github.com/IBM/zopeneditor-sample.git
Then open the directory zopeneditor-sample
using the File > Open... menu. The sample files in this directory will be referred to throughout the rest of the documentation.
Understand the Git repository branches
The sample Git repository contains four branches.
master: provides code and configuration file examples that can be used with the basic IBM Z Open Editor installation obtains from the VS Code Marketplace.
tutorial_complete: extends the examples from the master branch with code changes that you can use to simulate a before and after view of making changes to source code.
wazi-master: provides additional configuration file examples for commercial extensions to IBM Z Open Editor such as IBM Open Debug or User Build with IBM Dependency-Based Build. The Knowledge Center on ibm.com has more details for using these tools and examples.
wazi-tutorial-complete: provides an after-changes-view of the examples in wazi-master with the same advanced configurations files.
Examine the sample files
The sample application consists of the following files:
COBOL programs:
SAM1
,SAM2
, andSAM1LIB
SAM1
reads in both theCUSTFILE
andTRANFILE
data files, and then performs different actions on theCUSTFILE
based on transactions from theTRANFILE
. Valid transactions areADD
,UPDATE
, andDELETE
. When anUPDATE
transaction is processed,SAM1
callsSAM2
to perform the requested update.SAM2
includes some base code in place forCRUNCH
transactions, which can be enhanced using instructions provided later in this document . At the end of processing theTRANFILE
,SAM1
generates a report on the transactions processed and produces an updatedCUSTFILE
.SAM1LIB
is included to demonstrate the editor's ability to resolve copybooks that are part of a library. It is a copy ofSAM1
with the exception of the library-based copybooks.Copybooks:
CUSTCOPY
,REGISTRS
, andTRANREC
Libraries Copybooks:
DATETIME
(local) andREPTTOTL
(MVS™). These copybooks demonstrate using the libraries option in aCOPY <copybook> IN <library>
statement for local and MVS copybooksPL/I programs:
PSAM1
,PSAM2
, andPSAM1LIB
PSAM1
reads in both thePLI.CUSTFILE
andPLI.TRANFILE
data files, and then produces a report with customer information and a Totals summary section. Valid transactions arePRINT
andTOTALS
. APRINT
transaction prints the Customer records to the Customer section of the report. WhenPSAM1
reads in aTOTALS
transaction, it generates the Totals Report section. The instructions, provided later in this document, guide you through making the necessary code changes to allowPSAM1
to process a new type of Customer record called a Product record and generate a new line for the Service Calls in the Totals Report section.PSAM1LIB
is included to demonstrate the editor's ability to resolve includes that are part of a library. It is a copy ofPSAM1
with the exception of the library-based includes.Include files:
BALSTATS
andCUSTPLI
Libraries Includes:
DATETIME
(local) andREPTTOTL
(MVS) - these includes demonstrate using the libraries option in an%INCLUDE <library> (<include>);
statement for local and MVS includesHLASM programs:
ASAM1
andASAM2
ASAM1
reads theASM.FILEIN
data file and will write out the record number, column number heading records, and the input string toASM.FILEOUT
. Instructions provided later in this document will guide you through making the necessary code changes to haveASAM1
callASAM2
which will take the input string, convert it to hexadecimal format and pass it back toASAM1
, which will then write the hex value for the string to theASM.FILEOUT
data file.REXX program:
RSAM1
RSAM1
reads theREXX.FILEIN1
andREXX.FILEIN2
data files and will write out the records toREXX.FILEOUT
. Instructions provided later in this document will guide you through making the necessary code changes to create a new subroutine inRSAM1
to have it read throughREXX.FILEOUT
and display all of the records.JCL members that set up and run the applications:
ALLOCATE
,RUN
,PLIALLOC
,RUNPSAM1
,ASMALLOC
,RUNASAM1
, andREXALLOC
.Data source files:
CUSTFILE
,TRANFILE
,PLI.TRANFILE
,PLI.CUSTFILE
,ASM.FILEIN
,REXX.FILEIN1
, andREXX.FILEIN2
.Script Files:
zowecli-create-profiles.sh
- This shell script will create Zowe CLI RSE and SSH profiles and then set them as the default profiles.Parameters necessary to run the script:
TSO USER ID and Password
Z host address
RSE API port number
SSH port number
zowecli-cobol-upload-run-simple.sh
- This shell script will run the sample COBOL application.Submits the JCL to allocate the required MVS datasets
Uploads the application components from the local directory to the MVS datasets
Submits the JCL to run the application
zowecli-cobol-upload-run-tutorial.sh
- This shell script will run the sample COBOL application and download the output files.Submits the JCL to allocate the required MVS datasets
Uploads the application components from the local directory to the MVS datasets
Submits the JCL to run the application
Downloads the output data files once the JES job is complete
zowecli-cobol-clean.sh
- This shell script will delete the MVS data sets allocated and created during the execution of the sample application.