Compiler version: 05.2017
The compiler now runs on MVS (Hercules), too. Same source code (PASCAL1, PASCAL2) as with CMS, same runtime (PASMONN) - although there are some CMS dependencies, controlled by SYSPARM(CMS). Different PASSNAP ... see below.
Several changes and corrections to PASMONN (Pascal runtime) have been made. The most important: PASMONN now supports RESET and REWRITE of PO members with their name specified at runtime using the new function ASSIGNMEM. After RESET, success can be checked by looking at a flag in the Pascal FCB, accessed by the (existing) function FILEFCB.
This has been necessary to provide a MVS variant of PASSNAP; PASSNAP reads debug information at runtime, which depends on the name of the source file. In CMS, this was accomplished using CMS FILEDEFs, issued from the Pascal program. In MVS, ASSIGNMEM is used. The version of PASSNAP for CMS has been renamed to PASSNAPC; the MVS variant now takes the name PASSNAP. The technique to open the debug information file is the only difference between PASSNAPC (CMS) and PASSNAP (MVS).
There is still room for some improvement in the area of error handling etc.; some ideas:
register and PSW output in both PASSNAP and the simple error output written by PASMONN
correct handling of error 1006 - stack/heap collision
control PASSNAP output by runtime option
control ABEND with SYSUDUMP after PASSNAP by runtime option
use CAMLST to determine the type of the assigned dataset (PS or PO) to prevent error 013-14 (which is unrecoverable)
read directory or BLDL instead of reacting on 013-18 using the DCB ABEND EXIT (which is recoverable)
if no member specified and dataset assigned is a PDS, change RECFM to U on the fly and read directory
Thanks to Gerhard Postpischil and Juergen Winckelmann for help and good advice and for encouraging me to do the MVS port.