New notes about Jol - Dec 19, 2024 and May 12, 2025 by Clement Clarke
==============
JOB1: JOB Class A msgclass X;
Print Sys1.Maclib(call);
Jol is essentially a compiler that uses a free-format language to run jobs. It has interactive instructions dynamic alteration of jobs.
For longish or repetitive jobs the input is a member of a .JOL PDS. Short jobs typically use the JOL TSO Input Panel. The output can be JCL or a job that can be run using Dynamic Allocation, or run immediately under TSO.
NOTE: To create a userid.TEST.JOL PDS, execute the ALLOCJOL Clist.
The free format language is similar to a PL/1 or C style language. This means it needs semi-colon at the end of each statement except when using the TSO input panel. More later.
The Jol compiler can be run under TSO in an interactive mode, or under TSO and use prewritten Jol commands, or executed in the background using JCL.
Let's suppose we want to print the CALL macro from SYS1.MACLIB. We need a job card and a PRINT instruction. Perhaps something like this:
JOB1: JOB Class A msgclass X;
Print Sys1.Maclib(call);
if %day='MONDAY' then submit Jobmon;
These statements need to be compiled and say JCL created and run.
We can do this in two main ways - through the JOL TSO Panel, or by storing the two statements in our userid.TEST.JOL Pds.
Note that we MUST have a PDS called userid.TEST.JOL to store our Jol statements in, just a PL/I program needs a .PLI pds, or Assembler needs a .ASM PDS.
You can create a TEST.JOL PDS by executing the ALLOCJOL clist in TSO. It asks for the size of the PDS and creates it for us. The JOL TSO command requires a TEST.JOL PDS. The alternative JOLPROD TSO Command does not require a TEST.JOL PDS as it uses the JOL.JOL60.INCLUDE PDS for Production procedures.
Let's assume that we have copied those Jol statements into member TEST01 of our JOL PDS. Then we can simply use the Jol TSO Command to compile and submit the job.
JOL (TEST01) from TSO will do that for us.
Or, we could type JOL * and Jol will present us with a TSO Panel and we could type commands directly into Jol. End with a /* if necessary.
If you are coming from a JCL backgound, then here are some of the major differences:
Jol is a free format language based on PL/I. Unlike REXX, semi-colons are required to separate statements.
Jol will do most JCL functions. In addition:
a) Has a full Symbolic Parameter Processing language builtin. You may test, assign and perform arithemetic on Symbolic Variables.
b) The incredibly simple Panel instruction can be used to input Symbolic Variables through TSO.
c) Symbolic Variables may be saved and reused in data sets, and passed from job to job.
c) Symbolic Variables may be used in card image files to generate system utility commands.
d) Instructions to Allocate, Copy and Move Data Sets are builtin and maybe used interactively via TSO.
e) An INCLUDE facility allows nested procedures to be used.
f) A powerful Macro facility can be used to build new instructions.
If you are a Data Space Administrator, you can use the Jol Data Set Data Base to define to Jol all the characteristics of data sets. Programmers writing Jol Code may simply reference a data set name, and Jol can use these details to allocate or create the data set when necessary.
Programmers can store information about programs in the Program Data Base. Details such as the language the program is written in and the DDnames are stored. The a simple Complile and Link command is used to make an executable program. And an EXEC instruction will match the DDnames to Data Sets to run tests.
For JCL writers of complicated procedures, Jol offers several methods.
A method very similar to Unix, Linux and Windows Command line procedures. You simply code the name of the program you wish to execute, followed by the Data Set Names and Printer names. These are then matched to the program in the Program data base to get the appropriate DDnames, and then the Data Set Name data base is accessed to get the data set details, and create the data set if neccessary. The interactive BUILDJOB facility may be used to create such a Jol job which may be edited to add more features, if necessay.
The original Jol method of creating jobs may be used. Here, all data sets are declared with their attributes such as space, record formats and sp on. Programs are declared with their DDnames indicating which data sets are to be connected to which data sets. Then RUN instructions are used to actually execute the programs.
A combination of the two methods may be used.
See the examples for more details.