Mainframe express is kind of similar platform like net express , However, we have to organize all the folders for Data set and source code in different
way. Also, we have to create a project under the folders. Mainly, to run the program we need to use a OS/JCL (OPERATING SYSTEM/JOB CONTROL LANGUAGE) is a series of line and instructions to run the COBOL program in mainframe. I use a simple Program Named AUTOS and data set named INVENCNT.DAT to show how to run the program in mainframe and create a JCL accordingly Named AUTORUN.JCL. Here how I Manage and create Folders for the AUTOS showing below:
root:\AUTOREPORT
Then create another folder Under \AUTOREPORT\SIMPLE
Two more folders create under \SIMPLE\DATA and \SIMPLE\SOURCE
Copy and Paste the Data set INVENCNT.DAT in to the folder \AUTOREPORT
JCL and COBOL Program file under \SIMPLE\SOURCE folder
Sample of INVENCNT.DAT file:
COBOL Program AUTOS.CBL is as the same way written in Net express for personal computer in Mainframe only need to modify the
Environment Division assign to statements, Here is the sample of .CBL file for mainframe:
IDENTIFICATION DIVISION.
PROGRAM-ID. AUTOS.
*AUTHOR. NAHAR.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT AUTO-INPUT ASSIGN TO UT-S-AUTOIN.
SELECT AUTO-OUTPUT ASSIGN TO UT-S-AUTOOUT.
UT-S-AUTOIN is for the input .DAT file and UT-S-AUTOOUT is for output report file. these assign to statement using DD State in .JCL file in mainframe to process the data file and send it to the system output and printing the report. Here is an example of .JCL for this Program:
//AUTORUN is the project name also the name of .JCL
PGM=COBOL Program Name "AUTOS"
DSN means Data set given RWINVEN Changed INVENCNT.DAT ASCII file to Mainframe compatible EBCDIC form.
Summary
Create a Project in Mainframe Express, here is an example how to create a project in mainframe:
Add a data set to the project and Converted it from ASCII to EBCDIC (MF) in this project INVENCNT.DAT ASCII format converted in to EBCDIC format and named RWINVEN. showing below how to add and convert Data:
need to click on Catalog tab and right click to add data set
After adding dataset TOOLs=> Datatools=>Convert
Added COBOL program and JCL to the project and setting COBOL Dialect to COBOL for MVS
We add here from our \SOURCE folder AUTOS.CBL program and AUTORUN.JCL
Built the project and Run the JCL, After Built and Run the Program and JCL an application output pane came out showing JCL and Program RAN successfully
A report file created in a spool files
We need to go to SPOOL to print the report file
AUTORUN Report would be like that:
AUTOMOBILE INVENTORY REPORT.
BRAND QTY IN STOCK
HONDA 1
TOYOTA 2
HyuNDAI 3
BMW 4
KIA 5
ROLEX 6
MARCITIES 7
FORD 8
SATURN 9
CHEVORLET 10
Close the Spooler.