Comments document intent for humans without changing what the compiler generates. Payroll auditors, weekend on-call developers, and future-you six months later all read comments to learn why a threshold was 300.99 or why GOTO JOB skips certain departments. Easytrieve supports full-line asterisk comments, blank-line comments, and inline period-asterisk notes on the same line as a statement. It also forbids comments inside continued statements—a rule beginners hit when they try to annotate the middle of a split MASK. This page covers every comment form and when to use each.
When the first non-blank character in the statement area is an asterisk, the entire remainder of that 80-character record is a comment. The compiler ignores it for syntax and semantic analysis. Use full-line comments for section headers, change history notes, ticket references, and explanations longer than a few words.
123456* PAYROLL DETAIL EXTRACT - TICKET PAY-4402 * AUTHOR: FINANCE BATCH TEAM * INPUT: PERSNL DD MUST MATCH FILE NAME PERSNL FILE PERSNL FB(150 1800) EMPNO 1 5 N
A source record that contains only blanks is also treated as a comment. Blank lines visually separate Library definitions from Activity logic or one JOB from another REPORT block. They cost nothing at compile time and improve scroll navigation in ISPF. Some shops discourage excessive blank lines in members with strict line-count policies—balance readability with local standards.
To comment on the same line as code, complete a valid statement first, then code a period, one or more spaces, an asterisk, and the comment text. The period ends the executable statement; the asterisk begins commentary. Inline comments suit short clarifications tied to one IF or MOVE—not paragraph-length narratives better placed on full-line comments.
123IF PAY-GROSS LT 300.99. * special bonus tier threshold PERFORM SPECIAL-BONUS END-IF
| Form | Syntax | Best for |
|---|---|---|
| Full-line | * in first non-blank column | Section headers, change logs, long notes |
| Blank line | All spaces in record | Visual separation between sections |
| Inline | statement. * text | Brief notes on one statement |
Broadcom explicitly prohibits comments within a continued statement. If a MASK or PARM spans two lines joined by minus or plus continuation, you cannot insert an asterisk comment line between those physical records until the logical statement completes. Place comments immediately before the continued block or after the final continuation line. Violations produce compile errors referencing unexpected tokens on the continuation line.
Comments do not generate executable instructions, but they may still appear in compiler listings depending on PARM listing options. Listings with source help auditors connect deployed load modules to documented business rules. When comments include ticket numbers and dates, production incident response speeds up because SYSPRINT listings point to change control records.
Operations teams sometimes read only JCL and comments when source access is restricted. A comment stating which report DD carries business output prevents misdirected incident tickets. When removing obsolete logic, update or delete stale comments—wrong comments harm more than no comments because they look authoritative.
Comments are sticky notes on a recipe that the kitchen robot ignores when cooking. A star at the start of a line means the whole line is a note. A dot then star after an instruction means a tiny note on that one step. Empty lines are blank sticky notes for spacing. You cannot stick a note in the middle of a sentence that continues on the next line—you wait until the sentence finishes.
1. A full-line comment begins with:
2. Inline comments use:
3. A line containing only blanks is treated as:
4. Comments inside continued statements are:
5. Comments affect compilation by: