The z/OS Enterprise PL/I v 4.4 compiler takes a substring of the first line of the program that is being compiled and uses that in the listing heading:
15655-W67 IBM(R) Enterprise PL/I for z/OS /* DATA SET TEST AT LEVEL 048 2015.12.10 14:15:22 Page 1
In the example shown above, the text "/* DATA SET TEST AT LEVEL 048" is a substring of the first line of the comment that Panvalet inserts when you extract the member from Panvalet and pass it into the compiler. We would like to remove this comment line before we pass it to the compiler because it alters the line count in the listing and if there is an ABEND it gives us the wrong line number in the traceback. We want the line numbers to be correct, but if we remove the comment, then the program name, "TEST", in this example, is not shown in the listing heading, instead we get the actual first line of the program, which is usually a comment. Having the program name in the listing heading is desirable, especially when we bulk compile code because we compile all programs in one job by calling the compiler from our home grown batch compiler program, not using the supplied PROC. Without the program name in the listing heading, we have no idea which program the errors/warnings/information messages apply to, since we also suppress the source and everything else that is not necessary, otherwise the sysout would be millions of lines long.
We understand that other users may like the current functionality, so we would like to have an option to have the compiler take the program name from the first non-comment PROCEDURE statement found in the code, instead of the first line of the code, noting that the first procedure statement may or may not be the first line of the program, as most of our programs begin with comments first and while it would be possible to move the PROCEDURE statement to the first line of the program as code is modified, some of our programs never change and we don't have a budget to go change all of them just for this.
/* ------------------------------------------- */
/* PROGRAM NAME : TEST */
/* AUTHOR : YOUR NAME HERE */
/* DATE CREATED : 04-26-2011 */
/* PURPOSE : TEST MODULE */
TEST: PROCEDURE OPTIONS(MAIN);
We noticed that the COBOL compiler (390, we don't have Enterprise yet so we can't check it) appears to take the program name for the page header from the PROGRAM-ID value, not the first line of code. In addition, the VS FORTRAN V2.6 compiler appears to set the program name from the PROGRAM, FUNCTION, or SUBROUTINE statements, and finally the Assembler appears to get it from the CSECT.
We find these behaviors more desirable than using the first line of the program that the PL/I compiler uses. By giving us this option, it will align the PL/I compiler behavior with the COBOL and FORTRAN compilers and the Assembler.
We also noticed that the C compiler uses the dataset name and member if a PDS, or the temporary dataset name if the input dataset has a PASSED disposition, in the page heading. We have not researched the C compiler options to see if there is a way to use the program name from the source code yet because we don't yet use the bulk compile process on C code, but if not, we would like an option in the C compiler to take the program name from the CSECT as well.
Delivered as part of version 5.1
this could be useful
I noticed that other compilers include the PDS name, or the name of a temporary passed dataset which is what we use for bulk compiles since we reuse the temporary dataset for every program being compiled. The temporary dataset name is meaningless and undesirable. Your suggestion to use A.B(C) if it fits and just C if not is fine except if a passed dataset is used, then take the program name from the source code (CSECT) and omit the temporary dataset name.
there is a limited amount of space for the text that goes into the header. Under the new option we could put into the header
for source in A.B(C), just the name C
or
for source in A.B(C), the whole name A.B(C) if it fits and if not, then just C
and similarly on USS or other platforms
for source in /a/b/c.pli, just the c (or c.pli)
or
for source in /a/b/c.pli, the whole name if it fits and if not, then just c.pli
any preferences?