Below is a small example of a Jol job.
A few things to notice are:
1. Jol Code is similar to PL/I. Each statement is ended by a semi-colon.
2. Lower or upper case is acceptable.
3. Essentially, you declare data sets and programs, and use
instructions to use the declared items.
4. The Data Set Declare uses minimal keywords to specify the required
details.
5. In this example, Jol Macros copy and print the data sets.
6. Jol displays results on the Job Log. See the edited Jes2
Job Log below.
7. Symbolic Parameter processing can be used anywhere.
Note the use of the '%' symbol instead of the '&' symbol.
====================
/* This small Jol job copies a data set to volume WORK03
and catalogs and then deletes the data set.
*/
Ibmusera: job c.clarke 1024k msgclass x; /* Make a job card */
dcl testds ds clarke.testdel.ds
vol work03 sysda
fb 80,800
1 track;
copy sys1.maclib(call) to clarke.testdel.ds; /* or testds */
catalog testds;
if %day='THURSDAY' /* Is today Thursday? */
then do;
print testds; /* Print the file */
type 'Today is Thursday';
end;
delete testds;
======================
J E S 2 J O B L O
G
JOLE98-05 STEP IEBGENER LM IEBGENER RETURNED 0000 (SSI=41290343) AT
274
JOLE05-01 DSID 'TESTDS ' DSNAME 'CLARKE.TESTDEL.DS' CATALOGED ON
VOL(S) WORK03 AT 278
JOLE98-05 STEP IEBGENER LM IEBGENER RETURNED 0000 (SSI=41290343) AT
377
JOLE10-01 'Today is Thursday' AT 379
JOLE08-01 DSID 'TESTDS ' DSNAME 'CLARKE.TESTDEL.DS '
SCRATCHED FROM WORK03 AT 381
JOLE66-01 DSID 'TESTDS ' DSNAME 'CLARKE.TESTDEL.DS '
UNCATALOGED AT 381
------ JES2 JOB STATISTICS ------
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN