I assembled the program using the IFOX00 Assembler running on MVS 3.8 under Hercules. I then link edited and ran the program using the following JCL:
//CARD80 JOB (TXXOS),'GEN IPL DECK',CLASS=A,MSGCLASS=A //CARD80 EXEC PGM=CARD80 //STEPLIB DD DISP=SHR,DSN=TXXOS.CARD.LOAD //PUNCH DD UNIT=00D
I chose to send the output directly to the card punch device (located at 00D on my system) instead of sending it to the spool and then punching it using JES2. Before running the program verify the device address for your punch device and verify it is not allocated to JES2 (using $du). If necessary you can stop the JES device using something like $ppun1.
Also before running the program you will need to prepare the Hercules punch. At the Hercules console I used the DEVINIT command:
DEVINIT 00D card.ipl ebcdic
This command tells Hercules to set device 00D to output to the file “card80.ipl”. You can specify a path if you desire or else the file will be created in the directory you started Hercules from. For example you might use something like “../punch/card80.ipl” as the file path and name. I chose to simply place it in the default directory and then move it using a Linux line command. It is very important you specify ebcdic so Hercules does not attempt to translate the output into ASCII. ASCII translation will mangle the CCWs and machine code in the IPL deck and the IPL will fail.
Once the program has completed execution you can close the output file by simply using the Hercules command:
At this point we have our IPL deck and we are ready to set up a Hercules mainframe to run it.