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.
With Jazz Version 14 and earlier, Jazz copy code (extension .jzc) and programs (extension .jzz) are processed into COBOL, JCL, and other objects, which are then submitted to a mainframe for processing with FTP/FTPS. Jazz Version 15 and later retain this ability, but also provide direct communication (FTP is not needed) with the emulated mainframe environment of Micro Focus Enterprise Developer (MFED)
This chapter shows you how to set up Jazz to use it with Visual Studio and MF Enterprise Developer for mainframe development. Before continuing, you should be familiar with using MF Cobol in this environment: and be aware of the Mainframe Tutorials in Micro Focus Online Documentation. As a minimum you will have been through the first tutorial, “Getting started with Micro Focus Enterprise Developer for Visual Studio 2017”, and the tutorial “JCL”.
You will have downloaded Jazz, and you may have already used it to generate COBOL programs which you sent to a z/OS mainframe for testing.
This material is illustrated using MFED 3.0 and VS2017. There may be detail differences using other versions of MFED and VS, or using Eclipse instead of VS. Please let us know of any issues where we need to upgrade this documentation with alternate examples or more explanation.
This chapter shows you how to set up Jazz so that it works with Micro Focus Enterprise Developer, generating COBOL, JCL, etc into the appropriate folders so that they can be compiled and tested by MFED.
First we set up a COBOL project called MFJazz1 using the Mainframe Server Application template.
We set up a Micro Focus Server to test our programs.
In Step 3 we configure Jazz so that as we process our Jazz programs the resulting objects (COBOL and JCL) are written directly into the project’s folders. For the first test we have to make DTIN1.CBL and DTIN1.JCL known to the MFJazz1 project with Add/Existing Item, but on later changes we only have to rebuild the solution to test the later changes.
If we want to we can use COBOL-level interactive debugging as normal, pausing at checkpoints, stepping through the program, and examining data.
We start with our IDE (Visual Studio) and create a new Native COBOL project with template Mainframe Subsystem Application.
· Give it a name - in this example I’ve called it MFJazz1
· Set its location – here I’ve used the same location, C:\tutorials, as the Micro Focus tutorials
· Uncheck Create Directory for Solution: -
Click OK. This creates the following folders and files within C:\tutorials: -
In Solution Explorer: double click MSJazz1/Properties, and then click the COBOL tab. Check that the project’s COBOL dialect is set = Enterprise COBOL for z/OS, and Character Set = ASCII: -
To test a Mainframe Subsystem Application we need a suitable server. We will create one as we did with the Micro Focus JCL tutorial, except that we’ll call it MFJazz, and it will include an initiator for Class A.
Open Server Explorer, and expand Micro Focus Servers:-
1. Right-click LocalHost, click New Enterprise Server
2. Type MFJazz in the Name field,
1. Select template JCLTemplate.xml for a batch-only project. (Select template CICStemplate.xml if you also want to include CICS and Web Service programs, as in the next chapter)
2. Check Associate with Projects: MFJazz1
3. Click OK
The server is added to the list: -
Right-click Micro Focus Server and choose Administration. Edit MFJazz: -
1. General Page: set Configuration Information to
2. MSS/JES/General. Set program paths to: -
JES Program Path $JCLPROJ\bin\x86\Debug
System Catalog $JCLPROJ\catalog\catalog.dat
Default Allocated Dataset Location $JCLPROJ\catalog\datasets
Click [Apply], then Home
Define an Initiator that will handle class A (unlike the JCL tutorial which has only class B).
Close the Administrator page.
Create folder catalog: In Solution Explorer, right-click the MFJazz1 project, click Add/New Folder. Name the folder “catalog”.
Set COBOL properties: in Solution Explorer, double-click the Properties folder and click the COBOL tab
· Confirm the COBOL dialect is set to Enterprise COBOL for z/OS, source format is Fixed
· Set Character Set to ASCII
Set Active Settings: in the Debug Tab, ensure Active Settings is set to JCL. This setting is appropriate for MFJazz1, which is going to have only batch programs. For other projects you may wish to set this to CICS or Any.
Click <ctrl>S to save these settings
Build the solution: right-click the solution in Solution Explorer, and select Build Solution from the context menu
Start server MFJazz: right-click MFJazz in Server Explorer, click
Start. If the
In about a second the server is started: -
You may choose to test server MFJazz by completing the JCL tutorial using this project and server. See the Micro Focus Tutorial (Mainframe/JCL) for information on how to do this: start at the step “Import the files from the Demonstration Program”, importing them into your MFJazz1 project. If you do this Solution Explorer will show
and when you right-click ESJCL.jcl and click Submit JCL, Server MFJazz will be started if necessary: -
The job will be run, and results returned: -
Clicking the link will show the same output as when the JCL tutorial was run in its own project.
Close project MFJazz1, and continue with Step 3
Next we configure Jazz to work with this project. If you are not familiar with Jazz, more information about configuring Jazz is available here.
Start Jazz, Click [Configure]
Set IDE to Visual Studio,
Click [Set Defaults] to set paths to their default value, and then to initiate dialogs to locate or create them.
Click [Locate] and navigate to the folder that you gave as the location when we created the COBOL project, i.e. C:\tutorials .
Now the same process is followed for the Project folder. On clicking [Locate] the dialog opens within the common folder, showing our current VS projects. Select MFJazz1.
Because we’re using Visual Studio Jazz recognises the VS folder structure and that this folder contains a solution (.sln) and a COBOL Project (.cblproj) file. If we had left “Create Directory for Solution” checked when we created the COBOL project then Visual Studio would have created another folder level for the project file, and the project name would have become MFJazz1\MFJazz1
With Jazz Programs, Jazz Copy Code, and Jazz_LocalJCL click [Create] to create subfolders within the project folder. Generated COBOL is blank, so the COBOL will be written directly into the project folder.
With the folders defined, click [Initialise Project] Jazz to copy some initial objects that may be required. A dialog box appears with the list of possible objects: to select all click the first, then with Shift pressed click the last.
Since MFJazz1 is going to be a tutorial project, click [Add Training] and add some or all of the objects in the list.
If you choose to be selective, you can always return to configuration at any time and click [Initialise Project] or [Add Training] to add the missing objects.
The folder structure from C:\Users\Advanced Computers\source\repos\MFJazz1 is now: -
Click the Lang tab, and check that COBOL Dialect is set to Enterprise COBOL for z/OS, and the Test Environment to IDE: -
Close Configuration. You’ll be returned to the Jazz workbench.
One of the programs put into Jazz_Programs by [Add training] is DTIN1.jzz. Click File/OpenOpen and select it from the Jazz_Programs folder. It opens in the Jazz workbench: -
Note that the 6th button is “MFJazz1”, which is the name of our Visual Studio COBOL project, and also the name that we set as our Jazz Project when we configured Jazz above. Don’t click this – we’ll come back to it later.
Instead, right-click [Process]: the Process Form opens, with options for IDE testing: -
When you click [Process] normally, it is as if this form is opened, and Jazz goes through the four stages of Checking your Jazz program, Generating COBOL, Generating JCL if relevant, and then testing it. With a right-click the form is opened and you can run the individual stages. For example, if you click [Generate] the process stops after COBOL generation, and
· [Find COBOL] becomes [Review COBOL]. You can click this to review and edit the COBOL before continuing.
· The checkbox JCL is checked, so that clicking [JCL] or [Test] will resume using your generated [and edited?] COBOL.
Do this: click [Generate] and then [Review COBOL]. Close Notepad.
Now open a Windows Explorer, and navigate to your Project folder (C:\tutorials\MFJazz1\). You’ll see that it now includes
Now click [JCL] and then [Review JCL]. Because this is a batch program a job has been created to run it. If you wish, use Windows Explorer to navigate to the JCL subfolder (C:\tutorials\MFJazz1\Jazz_JCL\). You’ll see that DTIN1.JCL has been added to this.
Now click [Test]. The Process Form closes, and you return to the Jazz Workbench. Now we click the sixth button, [MFJazz1], which has turned green. A Visual Studio session opens the MFJazz1 project that we created in Step 1 so that we can test our program.
Open Solution Explorer. If necessary, you can open it from the View menu. According to Solution Explorer, DTIN1.CBL is not in our project. All it contains are the objects that we copied into it from the JCL tutorial: -
Yet when we look at the project folder C:\Tutorials\MFJazz1 with Windows Explorer we could clearly see that it is present, together with a lot of other stuff that was copied in when we clicked [Initialise Project] and [Add Training] in Step 3.
What’s going on?
Objects are not part of the project just because they’re in the project folder. If they haven’t been created with Visual Studio as part of the solution editing, then they have to be added.
In Solution Explorer, right-click the project (the highlighted line [cbl] MFJazz1 above) and click Add/Existing Item from the context menu. Windows Explorer opens, initially showing the project folder. Click on DTIN1.CBL. Repeat this, adding DTIN1.JCL from the Jazz_LocalJCL subfolder. Now Solution Explorer looks like this, and we can open either or both of these objects in Visual Studio by double clicking them.
Right-click the solution, and click Build Solution. The output window shows: -
To test batch program DTIN1.CBL, right-click DTIN1.JCL, and click Submit JCL. Now the output window shows: -
<Ctrl>Click the Job Output link. A browser window opens: -
Click JESYSMSG to see the JCL and JES messages: -
and click REPNBR1 to see the output written to this SYSOUT file: -
This is correct: it is the results that we expect from this program, and the same as the results obtained from direct z/OS testing when the COBOL and JCL were sent to a remote mainframe with FTP, and the job results returned with FTP to Jazz in Windows: -
Printed at 16 Feb 2018, 21:52:45 RepNbr1 Page 1
BANFIELD, Nora Joyce Annie
BARKMAN, Olivia Martha
BARNES, Albert Paul
BARNES, Arthur Cyril
BARNES, Edward John
BARNES, Hannah Francis
BARNES, Harold Victor
BARNES, Harriet Francis
BARNES, Henry Maurice
BARNES, Jessie Crawford
Hopefully we won’t need to – if its function is wrong, we’ll go back and change it in Jazz – but as with any similar COBOL program it can be interactively debugged in Visual Studio.
1. In Solution Explorer, double-click DTIN1.CBL to open it
Click in the left-hand column to put a
checkpoint against a statement. Here I’ve
put a checkpoint on the first procedural statement: -
3. Start debugging: click Start in the Visual Studio toolbar, or click menu Debug/Start Debugging, or press F5. The Output Window shows output from Debug, and is currently clear.
Right-click DTIN1.JCL, and click Submit
JCL. Your program starts running in
debug mode: it stops on reaching the first checkpoint: -
As usual you can step through the program with
F10 and F11. F10 will move the current
(= highlighted) line through 5780, 5790, 5800 etc. F11 will take the PERFORM branch on line 5790,
branching to 6730
before eventually returning to 5800. You can examine variables with Watch, and so on. Click Continue to go to the next checkpoint, or finish running the program if there are none.
On completion open the Output Window, and choose
Now that we’ve set up our COBOL Project and Enterprise Server we can continue development with Jazz, modifying program DTIN1 and adding new programs. As we do this the generated COBOL and JCL are written into the MFJazz1 project. For new programs these objects will have to be made known to the project with Add/Existing Item, but once known they will be updated.
For example, let’s make a change to DTIN1, printing the name subscript as well as the name. We make this change, adding “JZ.IX1,” to the PRINT statement. Click [Process] and the message “COBOL Generated” appears, and [MFJazz1] turns green.
Click [MFJazz1] and control is passed to the Visual Studio solution. It will be started if necessary, but if it is already active the current instance will be displayed, with this message: -
Now build the solution (in Solution Explorer, right-click the solution, click Build Solution from the context menu). If you left Visual Studio in debugging mode, you’ll be prompted to end debugging: reply OK.
Then run your program as before, by right-clicking DTIN1.JCL and clicking Submit JCL.
Click the Job Output link in the Output Window to open a browser on the job output, and then examine file REPNBR1. Results are what we expect, with the report now including the index variable
We set up a COBOL project (MFJazz1) with the Mainframe Server Application template. This included a Micro Focus Server to test our programs.
We then configured Jazz so that when we processed program DTIN1.jzz the COBOL (DTIN1.CBL) and JCL (DTIN1.JCL) were written directly into the project’s folders. From the Jazz workbench, [MFJazz1] opens the MFJazz1 project in Visual Studio.
For the first test we have to make DTIN1.CBL and DTIN1.JCL known to the MFJazz1 project with Add/Existing Item. After building the solution we can test it by submitting DTIN1.JCL. We can use COBOL-level interactive debugging as normal, pausing at checkpoints, stepping through the program, and examining data.
If we change our Jazz program then within project MFJazz1 we simply rebuild the solution and retest
The next chapter in this Users’ Guide series shows you how to create files (sequential and VSAM) that are used in Jazz demonstrations and tutorials, and how to use facilities such as Convert COBOL (which reads COBOL record layouts and converts them to Jazz) and create COBOL copy books for use by manually-written COBOL programs.
Integrated Development Environment. For example Visual Studio (Microsoft), Eclipse (Open Source)
Visual Studio 2017
Microsoft’s development framework – a series of support classes used by programs generated with Visual Studio.
File Transfer Protocol
File Transfer Protocol (Secure)
Job Control Language A language used to control jobs (particularly batch jobs) in z/OS systems
Z-system Operating System. Controls IBM Mainframes
 Actually FTPS – secure FTP. Jazz automatically uses FTPS if the FTP port is correctly set up.