XPL - A Compiler Generator


Although most of the links for XPL have disappeared from the Internet, when I was building this page - September, 2008 - a page was still maintained at the University of Toronto which gives some historical information about the compiler:  https://www.cs.toronto.edu/XPL/.

As with other packages distributed as object code packaged with XMIT, the difficult step of installing XPL from the available archives was getting the object code members extracted and then uploaded into a Partitioned Dataset with the appropriate attributes.  Using the members of the source archive, I created two Partitioned Datasets in which the various components from the source archive were installed.  The table below indicates the disposition of each of the members of the source archive:

Source Archive Member

MVS Partitioned Dataset(Member)

$$$$NOTE
- not installed
$$#DATE
- not installed
$$README
(hlq).XPL.SOURCE($$README)
@FILE517
- not installed
ALTER
(hlq).XPL.SOURCE(ALTER) [XPL source]
ALTERPGM
(hlq).XPL.OBJECT(ALTER)
ANALYZER
(hlq).XPL.SOURCE(ANALYZER) [XPL source]
PROSE
(hlq).XPL.SOURCE(PROSE) [description of package/installation instructions]
REFORM
(hlq).XPL.SOURCE(REFORM) [assembler source]
SKELETON
(hlq).XPL.SOURCE(SKELETON) [XPL source]
SYNTAX
(hlq).XPL.OBJECT(ANALYZER
TRACE
(hlq).XPL.SOURCE(TRACE) [assembler source]
XCOM
(hlq).XPL.SOURCE(XCOM) [XPL source]
XCOMCOMP
(hlq).XPL.OBJECT(XCOM)
XMON
(hlq).XPL.SOURCE(XMON) [assembler source]
XPLBNF
(hlq).XPL.SOURCE(XPLBNF) [BNF grammer]
XPLLIBR
(hlq).XPL.SOURCE(XPLLIBR) [XPL source]

In addition to the source and object Partitioned Datasets, I also created a load library which contains the three load modules created by assembling/link-editing the three assembler source programs.  

I have modified the monitor (XPLSM) and the compiler (XCOM) to utilize DCB=(RECFM=F,LRECL=7200,BLKSIZE=7200) for the object and all work files.  You must not change the attributes of the XPL.OBJECT dataset without recompiling the monitor and compiler.  I was not able to successfully change the blocksize to a value greater than 7200, but the penalty running under Hercules/MVS 3.8j is probably not much of an issue.

 

Restoring the XPL Partitioned Datasets to Your System

The archive containing my installation jobstreams, tape images, and documentation is available from this site by clicking on the link:  xpl.tgz [MD5: ee66f1cd12a556083652c1988716b0f2].  The archive contains:

xplxpl.het
A tape image created by IEBCOPY containing the three datasets required to run the compiler.
xplxpl.map 
The SYSOUT from TAPEMAP for the above tape image.
reload.jcl
A jobstream to restore the three datasets from the tape image onto your MVS system.
xplprocs.jcl
A jobstream to install procedures in SYS2.PROCLIB to execute the compiler.
xplbeer.jcl
A jobstream to compile and execute an XPL program to print the "99 bottles of beer" song.

Uncompress the archive (use the tar xvzf xpl.tgz command on Linux, or under CYGWIN; or use WinZip or ZipNAll on Windows/??).  The tape image should go into your tape image subdirectory, and the jobstreams should go into your JCL subdirectory.  You may view and/or print the xplxpl.map file with any text editor.  The jobstreams were created under Windows, so the lines are terminated with x'0d0a'.

Prior to submitting the RELOAD jobstream, you must edit it and change the value of the two default parameters TVOL and THLQ on the PROC statement to specify the Volume Serial of the target volume to which the datasets are to be restored and the High Level Qualifier for the dataset names that will be relevant to your environment.  The target Volume Serial may specify a target volume that is not a 3350, but you must ensure that the blocksizes of the restored datasets will fit on the target device.

Prior to submitting the XPLPROCS jobstream, you must edit it and change all instances of (hlq) to the same value you specified for THLQ in the RELOAD jobstream.  The target library for the XPL Procedures is SYS2.PROCLIB.  If you do not have SYS2.PROCLIB defined on your system, you must change the SYSUT2 DD to SYS1.PROCLIB.

When you have verified that the installation jobstream - reload - and the XPL procedures - xplprocs - conform to your configuration, mount the tape image on a tape device and submit the jobstreams to MVS for execution.  The reload job should take about one minute to execute and the return codes expected for the steps are:

IEF142I IEBCOPY RESTORES - STEP WAS EXECUTED - COND CODE 0000
IEF142I IEBCOPY RESTOREO - STEP WAS EXECUTED - COND CODE 0000
IEF142I IEBCOPY RESTOREL - STEP WAS EXECUTED - COND CODE 0000

The xplprocs job should take less than one minute to execute and the return code expected for the step is:

IEF142I IEBUPDTE IEBUPDTE - STEP WAS EXECUTED - COND CODE 0000

There will be four procedures catalogued in your procedure library by the above job:

XPLCG Executes the compiler and execute the resulting program if no errors occurred during compilation.  Input to the compiler is read via //XPL.SYSIN DD.  If no input files are used by the resulting program, you must include a //GO.SYSIN DD DUMMY statement.
XPLC Executes the compiler.  Input to the compiler is read via //XPL.SYSIN and the object is written to //XPL.FILE1.
XPLG Executes a previously compiled object module.
XPLA Executes the Syntax Analyzer.

There was no test job included on the source tape, so I have coded a source program for the "99 bottles of beer" program and the xplbeer jobstream executes the XPLCG procedure utilizing that source.  The output from that job on my system may be viewed at XPL: "99 bottles".

Here is a list of Abend codes returned by the XPL Submonitor:

ABEND CODES RETURNED BY THE XPL SUBMONITOR
THE SUBMONITOR WILL RETURN THE FOLLOWING USER COMPLETION CODES IN THE EVENT OF ERRORS:
100
ERROR IN OPENING ONE OF THE FILES: PROGRAM, SYSPRINT OR SYSIN
200
UNEXPECTED END OF FILE ENCOUNTERED WHILE READING IN THE XPL PROGRAM FILE.
300
I/O ERROR (SYNAD ERROR) WHILE READING IN THE XPL PROGRAM FILE
400
XPL PROGRAM TO BE LOADED WILL NOT FIT IN THE AMOUNT OF CORE AVAILABLE
500
THE XPL PROGRAM HAS CALLED THE SUBMONITOR WITH AN INVALID REQUEST FOR SERVICE
800+I
I/O ERROR (SYNAD) ON OUTPUTI (MAY BE UNABLE TO OPEN THE FILE)
900+I
REFERENCE TO OUTPUT(I) IN THE XPL PROGRAM SPECIFIES A NONEXISTENT OUTPUT FILE
1000+I
I/O ERROR (SYNAD) IN INPUTI
1200+I
END OF FILE ERROR ON INPUTI (THE XPL PROGRAM TRIED TO READ AFTER THE SUBMONITOR 
HAD PASSED IT AN END OF FILE INDICATION FOR INPUTI)
1400+I
THE XPL PROGRAM SPECIFIED A NONEXISTENT INPUT FILE: INPUT(I)
2000+I
I/O ERROR (SYNAD) ON DIRECT ACCESS FILEI (MAY BE UNABLE TO OPEN THE FILE)
2200+I
END OF FILE ERROR ON DIRECT ACCESS FILEI
4000
THE XPL PROGRAM REQUESTED TERMINATION AND A DUMP BY EXECUTING THE STATEMENT: CALL EXIT ;

I hope that you have found my instructions useful.  If you have questions that I can answer to help expand upon the information I have included here, please don't hesitate to send them to me:


Return to Site Home Page 


This page was last updated on June 10, 2016.