Jazz Batch Programming with Micro Focus

Jazz Batch Programming with Micro Focus. 1

Import COBOL definitions into Jazz. 1

Create File IN1. 2

Create file FR.. 4

Create VSAM Cluster 4

Create Test Data. 6

Print FR.. 7

Aanexmpl and Report1. 8

Custf and Orders. 8

Create CustF Cluster 8

Load CustF. 10

Create the AIX and Path. 11

Orders. 11

Glossary. 11

Disclaimer:  This material is written by and represents the opinions of Jazz Software Ltd. The use of Micro Focus examples in this and related Help pages do not imply any contractual relationship between Micro Focus and Jazz Software, nor that Micro Focus supports or recommends Jazz.  

This 5 minute video shows you the basic features of Jazz.  In this video Jazz is communicating with a z/OS mainframe using FTP.  COBOL may be read from the mainframe or locally and converted to Jazz, Jazz programs are created that are sent to the mainframe for compiling and running, and job results are downloaded and examined within the Jazz workbench.  

In this Users’ Guide chapter we show how to do similar tasks using Visual Studio and Micro Focus Enterprise Developer.  You will have completed the previous chapter, Set Up Jazz with Micro Focus, and we’ll continue using the MFJazz1 project that was set up in that chapter.  We cover these topics: -

·         Import COBOL definitions into Jazz

·         How to create files (sequential and VSAM) to be used in Jazz demonstrations and tutorials,

·         Write and test programs like Aanexmpl that read sequential and look-up files to produce a report with control breaks

·         How to create COBOL copy books for use by manually-written COBOL programs. 

Later chapters will deal with Classical CICS development and Web Services.

Import COBOL definitions into Jazz

To convert a COBOL record layout to Jazz, menu New or button [JazzGen] initiates a dialog. Choose the option Data/Import COBOL Definition. 

This functions normally, except that with the setting Test Environment = IDE (Jazz Configuration, Language tab) there is no option to download from z/OS, nor to delete the COBOL after conversion.  You can navigate to any folder within range of your Windows system, so that you can easily convert layouts from other projects.  The converted items will end up as xxxx.jzc in your Jazz Copy Book folder for the current project.

Create Sequential File IN1

File IN1 is used in some examples: it is a basic sequential file containing 300 records.   Program IN1W.jzz, one of the objects available within the folder of Training Objects, will create this file for you.

If program IN1W.jzz is not already in your Jazz Programs folder, click [Configure] and download it, and also IN1.jzc, IN1R.jzz, FR.jzc, FRR.jzz, FRW.jzz, and Aanexmpl.jzz  from [Add Training].  Open and [Process] program IN1W.jzz. 

Click [MFJazz1] to open the Micro Focus project, and with Add/Existing Item add IN1W.CBL and IN1W.JCL to the project.

Edit IN1W.JCL (as required by message #378), changing the //IN1   DD   statement from

//IN1      DD DSNAME=JAZZUSER.FILES.IN1,DISP=SHR

to

//IN1      DD DSNAME=JAZZUSER.FILES.IN1,DISP=(NEW,CATLG),

//            SPACE=(TRK,(1,1))

Save the edited IN1W.JCL, Build the solution, and then submit IN1W.JCL.

Now open Jazz program IN1R and [Process] it.  As above, you might need to download it from [Add Training]: -

As with IN1W, Click [MFJazz1] to open the Micro Focus project, add IN1R.CBL and IN1R.JCL to it, build the solution, then submit the JCL.  Results will look something like this: -

Create VSAM File FR

This is similar, using programs FRW to write the file and FRR to read it, but a difference is that FR is a VSAM file so a VSAM cluster is needed.  

Create VSAM Cluster

The record FR has already been defined to Jazz (FR.jzc is one of the items downloaded when you clicked [Add Training]): -

DEFINE FR VSAM DATA(

    Region PIC '999' KEY RANGE (1:20),

    Name CHAR(30) VALUE('No Record found') HEADING 'Region Name',

    Fill CHAR(47))

    DSNAME 'JAZZUSER.VSAM.Region';

This makes creating a VSAM cluster for it easy.  Click [JazzGen] and Select /Data/VSAM to open the VSAM form: -

Click [Browse] and browse to the definition fr.jzc.  It’s in the \Jazz_CopyDefs subfolder of your project folder

Check [  ] Cluster

Set the number of 1ry records you expect to have in the file.  FR is very small, 10 will do.

Click [JCL]

The VSAM form closes and you’re returned to the Jazz workbench. The button [MFJazz1] is now green. Click this, and the MFJazz1 COBOL project is opened.  Solution explorer shows that FR.JCL has been added.

Submit this.   If necessary the server MFJazz starts, the job runs, and the job output will show that IDCAMS has created the cluster.

Create Test Data

Open program FRW.  Click Process]: -

Click [MFJazz1] to [re]open this COBOL project.  With Add/Existing Item add FRW.CBL and FRW.JCL to the project: -

Build the project, then submit FRW.JCL

Print FR

Repeat this process with program FRR to print the file: -

 

Click [Process], then [MFJazz1].

In project MFJazz1, add (Add/Existing Item) FRR.CBL and FRR.JCL to the project, build the project, and submit the JCL.  Here is the report printed in the job output, showing that we’ve created the test data as expected: -

Aanexmpl and Report1

With files IN1 and FR created the data exists to run these programs. 

Open Aanexmpl.jzz in the Jazz workbench, click [Process], and then [MFJazz1].

In project MFJazz1 add Aanexmpl.CBL and Aanexmpl.jcl to the project, build the project, and then submit Aanexmpl.jcl.  View the job output, file RepNbr1, to see the results.

Repeat this process with program Report1.jzz.  This uses the Jazz Report Designer to control the report layout, but like Aanexmpl it produces a report.

Glossary 

.NET

Microsoft’s development framework – a series of support classes used by programs generated with Visual Studio.

FTP

File Transfer Protocol

FTPS

File Transfer Protocol (Secure)

IDE

Integrated Development Environment.   For example Visual Studio (Microsoft), Eclipse (Open Source)

JCL

Job Control Language    A language used to control jobs (particularly batch jobs) in z/OS systems

MF

Micro Focus

MFED

Micro Focus Enterprise Developer

VS

Visual Studio

VS2017

Visual Studio 2017

z/OS

Z-system Operating System.  Controls IBM Mainframes