Easytrieve Source Format

Before you write your first JOB statement, you need to understand the physical shape of Easytrieve source on a mainframe: eighty-character records, a scanned statement area usually ending at column seventy-two, and optional sequence numbers in the right margin. PC-based editors that allow unlimited line length will not upload cleanly without respecting these boundaries. Continuation characters, comments, and period-space terminators all assume this layout. This page maps the record structure installation options configure and how listings display what the compiler actually read versus what humans added for audit trails.

Progress0 of 0 lessons

Eighty-Character Records

Every source line on z/OS is an eighty-character record in a partitioned or sequential dataset. ISPF edit, FTP uploads, and Git-to-mainframe pipelines must preserve record length. Open-system Easytrieve ports may accept stream files with newline delimiters, but mainframe batch compilation expects fixed eighty. Line numbers in error messages refer to these records—merging or splitting lines without renumbering confuses cross-reference between listing and source during debug.

text
1
2
3
Column: 1 10 20 30 40 50 60 70 73 80 |---------|---------|---------|---------|---------|---------|---|----| Data: JOB INPUT PERSNL 001000

Statement Area Default 1-72

Within each record, the compiler reads only the statement area for language syntax. Default installation uses columns 1 through 72. Columns 73 through 80 remain available for sequence numbers, programmer initials, change tickets, or version markers without affecting parse results. You may place code anywhere within 1-72; indentation is free though teams standardize it for readability.

Source record regions (default layout)
ColumnsRoleCompiler action
1-72Statement areaScanned for statements
73-80Sequence / IDIgnored for parse; on listing
1-6 (optional use)Sequence when SCANCOLS 7Ignored if before SCANCOLS
7-72 (when SCANCOLS 7)Shifted statement areaScanned per installation

SCANCOLS and SCANCOLE Options

Configuration Manager sets SCANCOLS (start column) and SCANCOLE (end column) as compile-time installation options. Example SCANCOLS 7 and SCANCOLE 72 mirrors COBOL where columns 1-6 hold sequence numbers and 7-72 hold code. Valid ranges are 1-80 with SCANCOLE greater than SCANCOLS. Individual programmers cannot override these values at compile time—you must know site standards before pasting code from textbooks that assume column 1 start.

text
1
2
3
4
5
6
With SCANCOLS 7, SCANCOLE 72: Col: 1....6 7......................................72 73...80 001000 JOB INPUT PERSNL 001000 ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ignored statement area scanned

Relationship to COBOL Source Format

COBOL uses sequence area 1-6, indicator column 7, and areas A/B from 8-72. Easytrieve is simpler: no indicator column for continuation asterisk in column 7—continuation uses trailing plus or minus instead. Shops running both languages on one LPAR sometimes align SCANCOLS 7 so editors display consistently. Easytrieve beginners from COBOL should not assume column 7 continuation rules apply.

Source Listings

Compile listings print the complete eighty-character source record alongside line numbers, diagnostics, and cross-references. Text in columns 73-80 appears even when ignored—helpful when sequence numbers trace to change control. Error messages cite statement line numbers; match listing line to ISPF line using sequence field if primary line numbers differ after partial recompile tools.

Upload and Edit Considerations

  • Convert PC stream files to FB 80 before batch compile on z/OS.
  • Preserve trailing spaces when continuation uses + or - at line end.
  • Avoid UTF-8 BOM or non-EBCDIC characters unless site supports Unicode tools.
  • ISPF NUM ON can maintain sequence numbers in 73-80 automatically.
  • Git diff tools may hide trailing spaces—review before promote.

Program Structure in Source Files

Typical batch program source order: Environment (PARM), Library (FILE, DEFINE), activity section (JOB, SCREEN), REPORT subactivities, PROCs. Blank lines between sections improve human navigation—they are comment records. One PROGRAM name per member in partitioned libraries is standard though multiple activities coexist in one member.

text
1
2
3
4
5
6
7
8
9
10
11
PARM ACCT=100 * FILE PERSNL FB(80 800) EMPNO 1 6 N 0 * JOB INPUT PERSNL PRINT PAY-RPT * REPORT PAY-RPT LINESIZE 80 TITLE 01 'PAYROLL' LINE 01 EMPNO

Non-Mainframe Source Files

Easytrieve on UNIX or Windows may read stream source without eighty-character records. Multiple Platform Considerations document ASCII assumptions and case-sensitive macro filenames. Portable programs avoid relying on columns 73-80 content and keep statements within seventy-two effective columns so re-upload to z/OS succeeds without reformatting.

Common Source Format Mistakes

  1. Uploading variable-length stream file to FB 80 library without conversion.
  2. Code starting at column 1 when site SCANCOLS is 7—statements ignored.
  3. Statements extending past SCANCOLE without continuation.
  4. Sequence numbers duplicated or out of order after manual edit—audit failure.
  5. Assuming COBOL column 7 asterisk continuation works in Easytrieve.

Explain It Like I'm Five

Source format is the ruled notebook paper the computer expects. Each line has exactly eighty boxes. The teacher only reads your homework from box 1 to box 72—the rest is for page numbers you write in the margin. If you write past box 72 without saying continue on the next line, the teacher stops reading. Some classrooms start reading at box 7 instead of box 1—that is a school rule set before you arrived.

Exercises

  1. Draw a diagram labeling columns 1-72 and 73-80 on an 80-character line.
  2. Explain what changes when SCANCOLS is 7 instead of 1.
  3. Write a minimal program skeleton with comment blank lines between sections.
  4. List three upload pitfalls when moving source from PC to mainframe.
  5. Find the statement area on a compile listing at your site if available.

Quiz

Test Your Knowledge

1. Easytrieve source on z/OS is stored as:

  • 80-character fixed records
  • Variable-length stream files only
  • 132-column print lines
  • Binary objects

2. The default statement area is:

  • Columns 1 through 72
  • Columns 8 through 71
  • Columns 73 through 80
  • Columns 1 through 80

3. Columns 73-80 typically hold:

  • Sequence numbers or identification
  • Executable STOP statements
  • JCL only
  • Comments only

4. SCANCOLS and SCANCOLE are set:

  • At installation in Configuration Manager
  • In every PROGRAM statement
  • Only in JCL
  • At runtime only

5. Code outside the statement area is:

  • Ignored by compiler but shown on listing
  • Always executed
  • Required for FILE
  • Converted to comments
Published
Read time12 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve 11.6 Statement Area and Compiler Options SCANCOLS/SCANCOLESources: Broadcom Easytrieve Report Generator 11.6 TechDocs, Statement Overview, Compiler OptionsApplies to: Easytrieve 80-column source and statement area layout