Easytrieve Program Name — Activities, Modules, and Audit Labels

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.

Progress0 of 0 lessons

No PROGRAM Runtime System Field in 11.6

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.

Three Names Every Beginner Should Track

Program naming layers
LayerExamplePurpose
JCL PGM=EZTPA00Load module executed by z/OS
PROGRAM NAMETESTPARMEasytrieve activity identifier in source
PDS memberPAYRPT01Source or object module library name
CALL targetSUBVALCalled activity or external program

PROGRAM Statement NAME Parameter

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.

text
1
2
3
4
5
6
7
8
9
10
//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.

Stamping Program Identity on Reports

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.

text
1
2
3
4
5
6
7
8
9
10
11
12
DEFINE 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

PROGRAM Reserved Word

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, LINK, and Nested Activities

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 and Object Identity

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.

ENVIRONMENT COBOL Considerations

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.

Common Program Name Mistakes

  • Assuming PROGRAM NAME equals JCL PGM= without documentation.
  • Searching for PROGRAM-NAME system field like SYSDATE.
  • Using PROGRAM as a variable identifier.
  • Omitting module label on audit reports after PDS rename.
  • Confusing PROGRAM activity with JOB activity NAME.
  • Hard-coding wrong member in VALUE after copybook split.

Explain It Like I'm Five

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.

Exercises

  1. Write PROGRAM NAME block with USING parameter from PARM.
  2. Add PGM-LABEL VALUE literal to TITLE with SYSDATE.
  3. Explain three-way difference among PGM=, PROGRAM NAME, and PDS member.
  4. List why PROGRAM cannot be a DEFINE field name.
  5. Design DISPLAY startup banner with program label, SYSUSERID, and SYSDATE.

Quiz

Test Your Knowledge

1. Broadcom 11.6 provides a read-only PROGRAM system field like SYSDATE:

  • No—program identity uses PROGRAM statement and JCL PGM=
  • Yes—always eight bytes
  • Yes—named PROGRAM-NAME
  • Only in SCREEN

2. PROGRAM NAME on PROGRAM statement:

  • Names the Easytrieve program activity for CALL and documentation
  • Replaces JCL PGM= automatically
  • Defines FILE organization
  • Sets RETURN-CODE

3. JCL EXEC PGM=EZTPA00 refers to:

  • The load module the linker built from compiled Easytrieve
  • The JOB card name
  • SYSDATE format
  • A DD name

4. PROGRAM is in Symbols and Reserved Words as:

  • A reserved keyword—not a user field name
  • A numeric literal
  • A FILE type
  • Optional comment

5. To show program identity on a report header, shops typically:

  • Use literals, PROGRAM NAME constant in logic, or PARM—not a SYSDATE-style system field
  • REFERENCE SYSDATE-PROGRAM
  • DEFINE PROGRAM S 8
  • Use RECORD-COUNT
Published
Read time15 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom 11.6 PROGRAM Statement; no PROGRAM system-defined fieldSources: Broadcom Easytrieve 11.6 PROGRAM Statement, System-Defined Fields, Symbols and Reserved WordsApplies to: Easytrieve program naming and PROGRAM statement