Beginner Easytrieve interviews test whether you understand the language at a structural level: what a program looks like, how batch jobs read files, and how reports differ from raw file processing. Hiring managers rarely expect deep performance tuning on a first panel—they want you to explain JOB versus REPORT, name common statements, and show you can read a simple listing without panic. This page lists frequent beginner questions with model answers you can adapt in your own words, grouped by topic, plus flash tables and a quiz. Practice teaching each answer as if to a colleague: clarity beats jargon. Link your answers to any lab, coursework, or maintenance task on your resume even if the scale was small.
Easytrieve (CA Easytrieve Report Generator, now Broadcom) is a fourth-generation language for mainframe report generation and data processing. Programs describe files, fields, and logic at a higher level than COBOL: FILE and DEFINE for layouts, JOB for batch processing loops, REPORT for formatted output. The product compiles source to executable load modules run under JCL. Companies use it for payroll listings, finance extracts, inventory reports, and online inquiry screens on z/OS. A strong beginner answer mentions batch reports first, then notes SCREEN activities for terminal programs if the role is mixed online and batch.
COBOL is a general-purpose language requiring verbose file control and report formatting code. Easytrieve embeds report writer features—TITLE, LINE, control breaks—and file handling primitives so typical listing jobs need fewer lines. COBOL integrates everywhere; Easytrieve fits report-heavy batch chains. Interviewers accept that both compile to mainframe load modules and run under JCL. Do not claim Easytrieve replaces COBOL site-wide; say it specializes in report and extract workloads where the team already standardized on the product.
Typical structure: optional Library for shared working storage; FILE definitions for input and output datasets; JOB activity for batch read-process-write logic; REPORT activity for printed output; SORT when ordering is required; SCREEN for online maps. Declarative field definitions (DEFINE or FILE FIELDS) precede procedural statements. Beginners should sketch this order on a whiteboard—it shows you know where to look when reading unfamiliar source.
FILE declares a dataset the program reads or writes, with a name you reference in GET, READ, WRITE, or JOB INPUT. FIELDS (or separate DEFINE) describe record layout: field names, lengths, and types such as alphanumeric (A), numeric (N), or packed decimal (P). The FILE name ties to JCL DD allocation at runtime. Wrong offsets in FIELDS cause garbage data—interviewers may ask how you verify layouts against a data dictionary or copybook macro.
Alphanumeric (A) fields hold text—names, codes, flags. Numeric (N) fields hold zoned decimal display numbers common on legacy files. Packed (P) fields hold compact decimal for amounts with implied decimal places defined in the picture. Choosing the wrong type breaks comparisons and arithmetic. Beginner answer: match the physical file layout documented by the data team; do not guess types from business names alone.
| Type | Holds | Example use |
|---|---|---|
| A (alpha) | Text | Customer name, status code |
| N (numeric) | Display numeric | Store number, date as YYYYMMDD |
| P (packed) | Decimal amounts | Salary, invoice total |
| B (binary) | Binary integers | Counters, internal keys |
JOB INPUT names the primary file and starts the implicit read loop: for each record, Easytrieve executes statements until END or the next activity. Typical body: IF conditions, PERFORM procedures, WRITE output records, accumulate totals. It is the heart of batch extract and transform jobs. Contrast with explicit GET in procedures for screen or manual read patterns.
EOF (end of file) is true after the last record has been read. Test with IF EOF filename after GET or at loop end. Handle gracefully: write trailers, print final totals, EXIT procedures. Ignoring EOF causes partial processing or infinite loops in poorly structured code. Beginners should mention EOF in any answer about reading files—it signals production awareness.
1234567JOB INPUT PERSNL IF INVALID-FLAG PERFORM LOG-ERROR ELSE PERFORM PROCESS-OK END-IF END
The END line closes JOB INPUT. Interviewers may ask what happens without END—compile error or ambiguous structure depending on release checks.
A labeled block starting with label PROC and ending with END-PROC. It groups statements you invoke with PERFORM label. Modularity is the goal: CALC-TAX, VALIDATE-DATE, PRINT-HEADER. Special-name procedures like BEFORE-LINE are also PROC blocks but are invoked by the product during report processing, not by your PERFORM.
PERFORM transfers control to the named procedure; when END-PROC runs, control returns to the statement after PERFORM. Nesting is allowed; mutual recursion is not. Scope is the activity where PROC is defined—JOB procedures are not visible to REPORT in the same program without separate definitions.
REPORT defines formatted output: titles, detail lines, control breaks, subtotals, and page footing. Used for printed reports via SYSOUT or sequential print files. LINE statements map fields to columns; TITLE runs at report start or each page depending on options. Beginners should distinguish REPORT from writing raw records with WRITE in JOB—REPORT adds report writer layout and break logic.
When a break field (for example department code) changes value, the report writer starts a new control group and can print subtotals for the prior group. BREAK-LEVEL and AFTER-BREAK procedures handle accumulation. Simple interview answer: subtotals when the key changes, like subtotals per store in a retail listing.
Source is compiled with the Easytrieve compiler JCL PROC, producing a load module. A separate execution JCL step runs the program with DD statements matching FILE names. Compile listings show errors and macro expansion. Beginner answer: two steps common—compile and go, or compile once and run many times in production schedules.
Diagnostic output: DISPLAY messages, compiler listing destination in compile step, sometimes runtime trace. Operations watch SYSPRINT for record counts and error messages. Do not flood production SYSPRINT with per-record DISPLAY—interviewers flag that as a bad habit even at beginner level if you mention tuning awareness.
| Question | Short answer |
|---|---|
| Purpose of DEFINE? | Declare working storage fields not tied to a single FILE record layout. |
| GET versus JOB INPUT? | GET reads one record explicitly; JOB INPUT is implicit loop over file. |
| END-PROC? | Ends procedure; returns after PERFORM. |
| Library section? | Shared fields and definitions across activities in the program. |
| DISPLAY? | Writes line to SYSPRINT for debug or audit counts. |
| SORT activity? | Orders records by keys before report or write. |
A beginner interview is showing you know how the Easytrieve “recipe book” works: which page lists ingredients (FILE), which page says stir the pot (JOB), and which page says how to arrange food on the plate (REPORT). You are not the head chef yet—you just need to read the recipe without mixing up salt and sugar.
1. Easytrieve is primarily used for:
2. JOB INPUT reads records from:
3. PERFORM invokes:
4. REPORT activity is used to:
5. A beginner should explain EOF as: