Batch tutorials teach JOB INPUT, PRINT, and SORT. Many enterprises still run Easytrieve Online during business hours: operators query customer balances, approve adjustments, enter maintenance codes, and trigger extracts from terminals. Screen programming is the discipline of building those online transactions—SCREEN activities with declarations that paint panels, procedures that validate input, and logic that reads and updates the same FILE definitions batch jobs use overnight. If you know only report writing, screen programming adds event-driven flow: each Enter key or PF key may run BEFORE-SCREEN, terminal I/O, and AFTER-SCREEN in a cycle until EXIT or STOP ends the activity. This overview maps the topic for beginners: how SCREEN fits program structure, what Easytrieve Online requires, how screen declarations and procedures cooperate, how online and batch activities combine, and which child tutorials deepen each area—SCREEN statement syntax, screen fields, validation, and input handling.
Not every business question waits for a morning report. Branch managers need account inquiry now. Data stewards need to correct a bad code before the nightly extract. Auditors need to approve an adjustment with a terminal receipt. Easytrieve screen programming answers those needs without rewriting decades of FILE and DEFINE investment in COBOL or another language. The same data dictionary powers batch and online; SCREEN activities add the terminal presentation layer.
Easytrieve programs still begin with Library—FILE, DEFINE, DECLARE attributes. Activity section holds SCREEN, JOB, PROGRAM, and SORT blocks. SCREEN is not a sprinkle of DISPLAY inside JOB; it is its own labeled activity with declaration statements, executable logic, and screen procedures at the end. A single source member may contain MAIN-MENU SCREEN, INQUIRY SCREEN, and PAYROLL-JOB for batch printing after online approval.
123456789101112131415* Library — shared files and fields FILE CUSTMAST ... DEFINE SCR-ACCT W 10 N DEFINE SCR-NAME W 30 A * Activity — online inquiry SCREEN NAME ACCT-INQ TITLE 'Account Inquiry' ROW 5 COL 10 'Account:' SCR-ACCT ... EXIT * Activity — batch report (EXECUTE from screen or scheduler) JOB INPUT CUSTMAST NAME ACCTRPT PRINT ACCTRPT
| Aspect | Batch JOB | SCREEN |
|---|---|---|
| Driver | JOB INPUT file loop | Operator Enter and PF keys |
| Schedule | Scheduler overnight | Business hours terminal |
| Output | PRINT reports, extracts | Panels, messages, optional EXECUTE JOB |
| Procedures | Job PROCs | Screen PROCs and special-name hooks |
| Runtime | Easytrieve batch | Easytrieve Online |
Screen processing requires Easytrieve Online—the terminal-capable runtime Broadcom documents for supported platforms including z/OS TSO and CICS-style deployments per release notes. Pure batch JCL without online runtime cannot meaningfully execute SCREEN activities. Installation Site Options Table supplies default terminal dimensions, attribute keywords, and commit behavior SCREEN headers may override. Operations provisions transaction codes, terminal definitions, and security profiles separate from batch job scheduling.
INITIATION runs once when SCREEN activity starts—open files, load tables. Each display cycle: RESET fields reinitialize, BEFORE-SCREEN prepares data and GETs records, product builds and sends screen, operator responds, AFTER-SCREEN validates and branches. TERMINATION cleans up at activity end. GOTO SCREEN, REFRESH, and RESHOW belong in AFTER-SCREEN flow points—not BEFORE-SCREEN per Broadcom restrictions documented on those procedure pages.
1234567AFTER-SCREEN. PROC IF APPROVED-FLAG = 'Y' UPDATE MASTER EXECUTE JOB PRINT-APPROVAL-RPT EXIT END-IF END-PROC
Operator approval on screen updates master file online, then EXECUTE runs named JOB activity that PRINTs formatted report using existing REPORT definitions batch developers already maintain. This hybrid uses batch formatting strengths without rebuilding report logic in screen declarations.
| Topic | Covers |
|---|---|
| SCREEN statement | Header syntax, layout, COMMIT, activity start/end |
| Screen fields | ROW placement, attributes, input versus output |
| Field validation | VALUE, ERROR, MUSTENTER, validation PROCs |
| Input handling | ACCEPT, PF keys, AFTER-SCREEN processing |
| Output handling | Display, messages, redisplay patterns |
Screen programming is making a form on the computer screen people fill out while they work. Batch programming is the computer printing a big pile of papers overnight by itself. Easytrieve lets you build the form and still use the same filing cabinet of customer information both ways. When someone presses Enter on the form, the computer checks their typing and shows the next page.
1. Screen programming in Easytrieve uses which activity type?
2. SCREEN processing requires:
3. SCREEN activities can:
4. Screen procedures include:
5. Compared to batch JOB loops, SCREEN is driven by: