Hercules, OS/360, MVT and COBOL circa 1971

COBOL circa 1971 using the Hercules big iron emulator running a 1971 tape binary of MVT OS/360, a 3270 emulator and JCL. Way fun. …

Well met,

A quest for a sample of early COBOL that would be an equivalent of "Hello, world" (COBOL predates Hello, world, so early COBOL would have used other introductory test source), led to the Hercules System 370 emulator and what is deemed a public domain version of OS/360 materials dated from 1972, version 21.8f the latest and greatest. IBM did the world a nice, so anything you pluck from links here is not really for redistribution. Follow the links instead.

Hercules install on x86_64 Fedora GNU/Linux, was a simple


$ sudo yum install hercules

then after picking /home/me/os360 as a good home for things:


$ mkdir ~/os360
$ cd ~/os360
$ wget http://www.conmicro.com/hercos360/os360ctl.tar.gz
$ wget http://www.jaymoseley.com/hercules/download/zips/os360d.tgz
$ wget http://www.jaymoseley.com/hercules/download/zips/os360s.tgz
$ unzip os360ctl.tar.gz
$ unzip os360d.tgz
$ unzip os360s.tgz
$ cd os360mvt
$ ./makedasd
/home/me/os360

and that's it from the GNU/Linux side setup.

Again, from /home/me/os360/os360mvt, where [herc] is terminal session one and runs the virtual S/370, [cons] is a different tab/window/terminal and acts as the console.


[herc]$ hercules -f gen.cnf

[cons]$ telnet localhost 3270

and start following the instructions in Jay Maynard's install guide at http://www.conmicro.com/hercos360/

Once you build up to be able to IPL MVT (as soon as the job jcl/mvtsetup.jcl is installed), z eod to drop out, quit Hercules and restart with (from os360mvt again)


[herc]$ hercules -f mvt.cnf

[cons]$ c3270 localhost 3270

and you can then follow on with the install.

Once MVT is accepting jobs


[herc]devinit 00c sample/cobuclg.jcl

and the 3270 console will submit JCL to execute compile, link and go across sample ANS COBOL program source code that displays Hello to the console.


//COBUCLG JOB CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1)
//HELOWRLD EXEC COBUCLG,PARM.COB='MAP,LIST,LET'
//COB.SYSIN DD *
001 IDENTIFICATION DIVISION.
002 PROGRAM-ID. 'HELLO'.
003 ENVIRONMENT DIVISION.
004 CONFIGURATION SECTION.
005 SOURCE-COMPUTER. IBM-360.
006 OBJECT-COMPUTER. IBM-360.
0065 SPECIAL-NAMES.
0066 CONSOLE IS CNSL.
007 DATA DIVISION.
008 WORKING-STORAGE SECTION.
009 77 HELLO-CONST PIC X(12) VALUE 'HELLO, WORLD'.
075 PROCEDURE DIVISION.
090 000-DISPLAY.
100 DISPLAY HELLO-CONST UPON CNSL.
110 STOP RUN.
//LKED.SYSLIB DD DSNAME=SYS1.COBLIB,DISP=SHR
// DD DSNAME=SYS1.LINKLIB,DISP=SHR
//GO.SYSPRINT DD SYSOUT=A
//

Woohoo. 1972 big iron running with a penguin. OpenCOBOL compiles and runs the code just fine too. Woohoo 2.

Fun.

Cheers,
Brian

Leave a Reply

Your email address will not be published. Required fields are marked *