Program name means different things on different mainframe layers. JCL says PGM=EZTPA00 to load the compiler runtime. Easytrieve source says PROGRAM NAME PAYRPTUPD to label a program activity that accepts parameters. The linker may produce PAYRPT01 as the module member name in a PDS. None of these are automatically interchangeable. Broadcom Report Generator 11.6 does not document a SYSDATE-style system field that returns the executing program name at runtime—unlike SYSDATE for date or SYSUSERID for user. Tutorial maps still cover program name under system variables because audit headers and error messages need a consistent program identifier and beginners must learn where each name lives. This page distinguishes PROGRAM statement NAME, JCL EXEC PGM, compile listing program id, CALL targets, USING and GIVING parameters, DISPLAY banners, TITLE literals, and migration pitfalls when COBOL interop uses ENVIRONMENT COBOL with different naming rules.
Review System-Defined Fields before assuming PROGRAM-NAME exists like PAGE-NUMBER. General, file, and report families omit load module identity. If training material references a function returning program name, verify against Easytrieve Plus Application Reference— Report Generator may require explicit literals or PARM instead.
| Layer | Example | Purpose |
|---|---|---|
| JCL PGM= | EZTPA00 | Load module executed by z/OS |
| PROGRAM NAME | TESTPARM | Easytrieve activity identifier in source |
| PDS member | PAYRPT01 | Source or object module library name |
| CALL target | SUBVAL | Called activity or external program |
PROGRAM defines a program-type activity distinct from JOB batch processing. NAME gives that activity an identifier referenced on EXECUTE, CALL, or in documentation. USING passes parameters from parent or JCL PARM into a VARYING field. GIVING returns a value to caller. Broadcom example TESTPARM shows JCL PARM feeding JCL-PARM into PROGRAM NAME TESTPARM.
12345678910//COMP EXEC PGM=EZTPA00,PARM='0123456789ABCDEF' /* DEFINE JCL-PARM S 100 A VARYING PROGRAM NAME TESTPARM USING(JCL-PARM) EXECUTE TESTPARM1 JOB INPUT(NULL) NAME TESTPARM1 DISPLAY 'PARM=' JCL-PARM STOP
Here EZTPA00 is the module; TESTPARM is the program activity name inside source; TESTPARM1 is the JOB activity executed inside the program block.
Because no system field returns module name, define PGM-LABEL W 20 A with VALUE or assignment in INIT matching your audit standard—literal PAYRPT01 or concatenation of release id. Some shops pass program id on PARM with job metadata. TITLE line shows PGM-LABEL at column one while SYSDATE occupies column sixty. Change literal when member name changes—consider code review checklist tied to PDS member rename.
123456789101112DEFINE PGM-LABEL W 20 A VALUE 'PAYRPT01' INIT. PROC DISPLAY 'MODULE LABEL ' PGM-LABEL DISPLAY 'USER ' SYSUSERID ' DATE ' SYSDATE END-PROC REPORT PAY-RPT TITLE 01 PGM-LABEL COL 1 'PAYROLL' COL 50 SYSDATE JOB INPUT PAYFILE START INIT LINE EMP-NAME GROSS
Symbols and Reserved Words lists PROGRAM among keywords for the PROGRAM statement. Do not DEFINE a field named PROGRAM or use PROGRAM as a file name. Collisions produce compile errors or subtle misparsing. Prefer MODULE-ID, SRC-PGM, or ACTIVITY-NAME for working storage labels.
CALL statement invokes other activities or external programs depending on syntax and ENVIRONMENT options. Called program name in CALL is explicit— not inferred from executing module. Document call graph when audit requires parent and child names on nested error paths. CICS conversational rules require called Easytrieve programs stay conversational when using certain CALL patterns—separate from naming but affects online module design.
Compiler listing header shows source member, date, and options—useful when SYSPRINT lacks custom DISPLAY. Object deck member name from linkage editor becomes runtime PGM unless alias tricks apply. Keep listing with change control record when auditors ask which source version produced output—not satisfiable from a hypothetical runtime program-name variable alone.
PROGRAM activities with ENVIRONMENT COBOL interact with COBOL naming and call conventions. Program name strings may need to match COBOL PROGRAM-ID rules on interop paths. Verify Language Reference when mixing CALL to COBOL subprograms and Easytrieve PROGRAM blocks in one system.
The lunch box label on the outside is the JCL PGM name—the big machine knows which box to open. Inside the box you wrote TESTPARM on one worksheet—that is the PROGRAM activity name for your own organization. There is no magic sticker inside Easytrieve that automatically reads the outside label—you write the name you want on the report yourself or pass it in from JCL.
1. Broadcom 11.6 provides a read-only PROGRAM system field like SYSDATE:
2. PROGRAM NAME on PROGRAM statement:
3. JCL EXEC PGM=EZTPA00 refers to:
4. PROGRAM is in Symbols and Reserved Words as:
5. To show program identity on a report header, shops typically: