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, and SAM1LIB

    SAM1 reads in both the CUSTFILE and TRANFILE data files, and then performs different actions on the CUSTFILE based on transactions from the TRANFILE. Valid transactions are ADD, UPDATE, and DELETE. When an UPDATE transaction is processed, SAM1 calls SAM2 to perform the requested update.

    SAM2 includes some base code in place for CRUNCH transactions, which can be enhanced using instructions provided later in this document . At the end of processing the TRANFILE, SAM1 generates a report on the transactions processed and produces an updated CUSTFILE.

    SAM1LIB is included to demonstrate the editor's ability to resolve copybooks that are part of a library. It is a copy of SAM1 with the exception of the library-based copybooks.

  • Copybooks: CUSTCOPY, REGISTRS, and TRANREC

  • Libraries Copybooks: DATETIME (local) and REPTTOTL (MVS™). These copybooks demonstrate using the libraries option in a COPY <copybook> IN <library> statement for local and MVS copybooks

  • PL/I programs: PSAM1, PSAM2, and PSAM1LIB

    PSAM1 reads in both the PLI.CUSTFILE and PLI.TRANFILE data files, and then produces a report with customer information and a Totals summary section. Valid transactions are PRINT and TOTALS. A PRINT transaction prints the Customer records to the Customer section of the report. When PSAM1 reads in a TOTALS transaction, it generates the Totals Report section. The instructions, provided later in this document, guide you through making the necessary code changes to allow PSAM1 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 of PSAM1 with the exception of the library-based includes.

  • Include files: BALSTATS and CUSTPLI

  • Libraries Includes: DATETIME (local) and REPTTOTL (MVS) - these includes demonstrate using the libraries option in an %INCLUDE <library> (<include>); statement for local and MVS includes

  • HLASM programs: ASAM1 and ASAM2

    ASAM1 reads the ASM.FILEIN data file and will write out the record number, column number heading records, and the input string to ASM.FILEOUT. Instructions provided later in this document will guide you through making the necessary code changes to have ASAM1 call ASAM2 which will take the input string, convert it to hexadecimal format and pass it back to ASAM1, which will then write the hex value for the string to the ASM.FILEOUT data file.

  • REXX program: RSAM1

    RSAM1 reads the REXX.FILEIN1 and REXX.FILEIN2 data files and will write out the records to REXX.FILEOUT. Instructions provided later in this document will guide you through making the necessary code changes to create a new subroutine in RSAM1 to have it read through REXX.FILEOUT and display all of the records.

  • JCL members that set up and run the applications: ALLOCATE, RUN, PLIALLOC, RUNPSAM1, ASMALLOC, RUNASAM1, and REXALLOC.

  • Data source files: CUSTFILE, TRANFILE, PLI.TRANFILE, PLI.CUSTFILE, ASM.FILEIN, REXX.FILEIN1, and REXX.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.