MORTRAN Pre-Compiler
The version of MORTRAN2 available here was obtained from the SPLA tapes available at https://www.cbttape.org/spla.htm. The eleven datasets were extracted from the SPL602 tape image and copied to a HET format tape image as standard labeled tape files. That tape image is available for download from this site as mortran.tgz [MD5: C24C801396DA4AA6D52570903A75A13C]. The eleven files are all RECFM=FB,LRECL=80,BLKSIZE=1600 and the contents of the files are:
FILE 1 TAPE DESCRIPTION AND INSTALLATION GUIDE [DSN=INSTALL.GUIDE]
FILE 2 USER'S GUIDE [DSN=USERS.GUIDE]
This is the MORTRAN2 User's Guide with both upper and lower case letters, suitable for printing with the IBM TN print train. It has ASA control characters in column 1 and is 34 pages long.
FILE 3 MORTRAN2 OBJECT DECKS [DSN=OBJECT.DECKS]
These are the object decks of the entire MORTRAN2 system. They are the output of the FORTRAN LEVEL-H compiler, and must be link-edited with the FORTRAN library routines to run.FILE 4 MORTRAN2 MACROS (RESERVED WORD VERSION) [DSN=MACROS.RW]
These are the macros which define the MORTRAN2 language as described in the current User's Guide. They are read in from FORTRAN unit 1 by the MORTRAN2 processor as part of its initialization. The last card should have a %% in columns 1-2.
FILE 5 TEST PROGRAM (RESERVED WORD VERSION) [DSN=IVP.RW]
This is a test job for the language implemented by the macros in file 4. It contains JCL to execute MORTRAN and then compile, load, and execute the resulting FORTRAN program. If successful, it will print all primes less than 10000.
FILE 6 MORTRAN2 MACROS (BRACKETED KEYWORD VERSION) [DSN=MACROS.BK]
These are macros which define a superset of the MORTRAN1 language, and may be used to compile MORTRAN1 programs using the MORTRAN2 processor. The primary difference is that MORTRAN1 keywords are enclosed in angle brackets (as in "<do>").
FILE 7 TEST PROGRAM (BRACKETED KEYWORD VERSION) [DSN=IVP.BK]
This is a test job for the bracketed-keyword language implemented by the macros in file 6. It contains JCL to execute MORTRAN and then compile, load, and execute the resulting FORTRAN program. If successful, it will print all primes less than 10000. FILE 8 MORTRAN2 SOURCE DECK [DSN=SOURCE]
This is the FORTRAN source program for MORTRAN. It is the program which was compiled by FORTRAN-H (opt=2) to produce the object decks in file 3. It conforms to the ANSI standard and should be machine independent.
FILE 9 CATALOGUED PROCEDURES [DSN=PROCS]
These are examples of catalogued procedures to facilitate the use of MORTRAN. These procedures conform to SLAC standards and are therefore somewhat unconventional in their use of symbolic parameters. Note, however, that the conventional overriding mechanism may still be used. The names of the cataloged procedures are MORT, MORTHC, MORTGC, MORTHCL, MORTGCL, MORTHCG, MORTGCG, MORTHCLG, AND MORTGCLG. This file contains IEBUPDTE control cards.
FILE 10 SYSTEM PROGRAMMER'S GUIDE [DSN=SYSPROG.GUIDE]
This describes the philosophy behind the implementation of MORTRAN2 as a bootstrapped macro processor. The internal organization and logical flow is discussed. Special macro operators used to implement the MORTRAN language but not described in the User's Guide are explained. This file contains ASA control characters in column one and uses both upper and lower case letters.
FILE 11 BOOTSTRAP PROGRAM FOR RECREATING MORTRAN [DSN=BOOTSTRAP]
MORTRAN2 is implemented as three-step bootstrap. Each step is a processor which reads macro definitions and a program written in the language defined by them. The output of each processor is a FORTRAN program. This file contains the JCL, program, and macros to completely reconstruct the bootstrap process in one job. The output is a FORTRAN program functionally equivalent to that on file 8. (unnecessary 'continue' statements have been removed from file 8). The full bootstrap involves FORTRAN which is machine dependent; it is designed for 32-bit wordsize computers using EBCDIC, such as IBM 360/370 or XDS SIGMA 5/7.
Note: MORTRAN is a pre-compiler that generates FORTRAN code. It requires that the IBM FORTRAN-H compiler be installed prior to the installation of MORTRAN and before the MORTRAN pre-processor may be executed!
Click on the archive - mortran.tgz [MD5: C24C801396DA4AA6D52570903A75A13C] - to download it to your computer. Uncompress the archive (use the tar xvzf <archive> command on Linux or use WinZip or ZipNAll on Windows). The tape image should go into your tape image subdirectory
The following JCL may be used to print the User's Guide, Link-Edit the MORTRAN load module, and install the required MACROS and PROCEDURES:
//MORTRANI JOB (SYS),'INSTALL MORTRAN',CLASS=A,MSGCLASS=X //PRINT EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD UNIT=TAPE,VOL=SER=MORTRN,LABEL=(2,SL), // DISP=(OLD,PASS),DSN='USERS.GUIDE' //SYSUT2 DD SYSOUT=*,DCB=(RECFM=FBA,LRECL=80,BLKSIZE=1600) //SYSIN DD DUMMY //* //LINKED EXEC LKED,REGION=1024K,PARM='XREF,LIST,LET' //LKED.SYSLMOD DD DSN=SYS2.LINKLIB(MORTRAN),DISP=OLD <== TARGET LIBRARY //LKED.SYSLIB DD DSN=SYS1.FORTLIB,DISP=SHR //LKED.SYSIN DD UNIT=TAPE,VOL=SER=MORTRN,LABEL=(3,SL), // DISP=(OLD,PASS),DSN='OBJECT.DECKS' //* //* CREATE THE LANGUAGE-DEFINING MACRO FILE //* //MACROS EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSUT1 DD UNIT=TAPE,VOL=SER=MORTRN,LABEL=(4,SL), // DISP=(OLD,PASS),DSN='MACROS.RW' // DD * //SYSUT2 DD DSN=SYS2.MACLIB(MORTMAC1),DISP=OLD <== TARGET LIBRARY //* //* MOVE THE CATALOGED PROCEDURES //* //PROCS EXEC PGM=IEBUPDTE,PARM=NEW //SYSPRINT DD SYSOUT=* //SYSIN DD DATA,DLM='><' ./ ADD NAME=FORTHCG //FORT EXEC PGM=IEKAA00,REGION=228K //SYSPRINT DD SYSOUT=A //SYSPUNCH DD SYSOUT=B //SYSLIN DD DSNAME=&LOADSET,UNIT=SYSSQ,DISP=(MOD,PASS), // SPACE=(400,(200,50),RLSE) //GO EXEC PGM=LOADER,COND=(4,LT), // PARM='LET,NORES,EP=MAIN' //SYSLIB DD DSNAME=SYS1.FORTLIB,DISP=SHR //SYSLOUT DD SYSOUT=A //SYSLIN DD DSNAME=&LOADSET,DISP=(OLD,DELETE) //FT05F001 DD DDNAME=SYSIN //FT06F001 DD SYSOUT=A //FT07F001 DD SYSOUT=B >< // DD UNIT=TAPE,VOL=SER=MORTRN,LABEL=(9,SL), // DISP=(OLD,PASS),DSN='PROCS' //SYSUT2 DD DSN=SYS2.PROCLIB,DISP=OLD <== TARGET LIBRARY
Note that the target libraries in the jobstream above - SYS2.LINKLIB, SYS2.MACLIB, and SYS2.PROCLIB - must be defined on your system before executing the job.
The following JCL may be used to execute the test program to verify that the installation has completed successfully:
//MORTRANV JOB (SYS),'INSTALL MORTRAN',CLASS=A,MSGCLASS=X //TEST EXEC PGM=MORTRAN,REGION=160K //FT01F001 DD DSN=SYS2.MACLIB(MORTMAC1),DISP=SHR,LABEL=(,,,IN) <== MACRO LIBRARY //FT05F001 DD UNIT=TAPE,VOL=SER=MORTRN,LABEL=(5,SL), // DISP=(OLD,PASS),DSN='IVP.RW' //FT06F001 DD SYSOUT=* //FT07F001 DD UNIT=SYSALLDA,DSN=&FORTRAN,DISP=(NEW,PASS), // SPACE=(TRK,(20,10)), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=1600) //COMPILGO EXEC FORTHCG,COND=(0,NE) //FORT.SYSIN DD DSN=&FORTRAN,DISP=(OLD,DELETE) //
Note that FT01F001 in the jobstream above refers to the target where the MORTRAN macros were loaded during installation. If you modified the installation job to use a library other than SYS2.MACLIB you must alter this jobstream as well.
The complete JES2 output for this job may be viewed at morttest.
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: