---
title: "Easytrieve Guide for Mainframe Programmers (6 of 20)"
description: "How to print reports in Easytrieve program explained all the syntax details."
url: https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/
date: 2015-07-22
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2015/07/pexels-photo-4498366.jpeg?fit=1880%2C1253&ssl=1
categories: ["Easytrieve"]
tags: ["Easytrieve tips and tricks"]
type: post
lang: en
---

# Easytrieve Guide for Mainframe Programmers (6 of 20)

**VARIOUS I/O COMMANDS:**

This section will cover a wide variety of commands that will be essential to the EZT+ programmer in organizing [the logic](https://srinimf.com/2016/01/20/2-incredible-ideas-on-deleting-a-vsam-record-in-cics/) that is necessary to construct an EZT+ program.

The statements to be covered are as follows.

```
PRINT - which 'prints' an output record to the VFM file by activatingthe designated REPORT ACTIVITY
DISPLAY - directs a 'literal' message and important programmer definedvalues
to a printer, it is somewhat similar to the COBOL command
STOP - terminates an EZT+ JOB activity
PUT -  places a record on a QSAM output file
GET - retrieves a record from an input file once the automatic record 
retrieval feature of EZT+ has been turned off
POINT - 'points' to a record on a KEYED file this is somewhat similar 
to the START command
READ - retrieves a record from a VSAM file
WRITE -  writes a logical record to a designated VSAM file
```

**PRINT STATEMENT**

The PRINT Statement is necessary to select a record for output to a report. Activates the report logic defined by the REPORT definition statements. The result of a PRINT statement is data output to either a print file or a work file.

Syntax:

```
PRINT  report - name
Example:

IF  REG  =  25
PRINT  RPT1
END - IF
```

Only records with REG  =  25 are output to RPT1.

EZT+

program

print

VFM

```
printed output

------------->   ----------------->

re-sequencing

--------------------
```

- When EZT+ executes a PRINT statement, a detail line is ‘placed’ on the      intermediate VFM file.
- At EOF, the contents of the VFM are placed in the output queue;  if   ‘re sequencing’ was requested it occurs at this time.
- ANY data item used in a SEQUENCE, CONTROL or LINE command will be placed in the VFM

**DISPLAY STATEMENT**

The DISPLAY statement transfers data to the system output device (SYSPRINT).

SYNTAX

```
DISPLAY       file-name1       NEWPAGE     Literal - 2

SKIP          integer - 1         Field-name - 1

+Integer - 2       HEX

-Integer - 2

COL

POS
```

**file-name1**

When file-name1 is specified, EZT+ prints data to the named file.  If this   parameter is omitted, the default is SYSPRINT.

When used, file-name1 MUST be defined in the execution JCL and the   LIBRARY SECTION of your program.

**NEWPAGE**

A skip to a new page occurs before the data is printed.

**SKIP  literal – 1**

Specifies that integer-1 number of lines are skipped before the data is printed.

**Literal-2/Field-name-1**

Code these items in the order you want them to appear on the report line.

Alphanumeric literals must be enclosed with apostrophes.

**+Integer-2/-Integer-2**

Modifies the horizontal spacing between display items on the report line.

Integer-2 is any item that does not extend beyond the end of the line.

**COL  integer – 3**

Specifies the print column number where EASYTRIEVE PLUS places the next DISPLAY item.

Related[Easytrieve Guide for Mainframe Programmers (6 of 20)](https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/)

Integer – 3 is any item that does not extend beyond the end of the line.

Related[Easytrieve Guide for Mainframe Programmers (1of 20)](https://srinimf.com/2015/06/18/eazytrive-material-for-mainframe-programmers-1of-20/)

**POS integer – 4**

Within report procedures, this option causes the next DISPLAY data item to be positioned under the corresponding integer – 4 item on the line 01 statement.

**HEX**

Produces a hexadecimal and character dump of the current record of the file, or the specified field name

DISPLAY HEX cannot be used in report procedures

Examples of display statement:

```
IF  DEPT   =  911

DISPLAY NEWPAGE POLICY SSN DATE-OF-BIRTH

END - IF
```

After ejecting to a new page, the values in POLICY, SSN, and DATE-OF-BIRTH would be printed beginning in column 1 which is the default position:

```
IF  DEPT  =  911

DISPLAY COL 7   '***  ERROR *** '

END - IF
```

-
  -
    - 1 – – – – + – – – – 2- – – – + – – – -3 – – – -+ – – – – 4 – – – – +- – – – 5 – – – -+ – – – – 6

***  ERROR ***

The default is overridden by the COL 7 parameter and the display value (***  ERROR ***) starts displaying in column 7

```
IF  STATE  =  34

DISPLAY SKIP  3  'THE STATE IS'   STATE

END - IF
```

THE STATE IS 34

After skipping three lines, the information would be displayed as shown above – – column 1 is the DEFAULT.

*      DISPLAY HEX POLNUM

```
CHAR  2120182

ZONE  FFFFFFF

NUMR 2120182
```

1. . . 5 . .

The above display provides the numeric and zoned numeric value that is found in POLNUM.

Related Posts

- [Easytrieve Guide for Mainframe Programmers (1of 20)](https://srinimf.com/2015/06/18/eazytrive-material-for-mainframe-programmers-1of-20/)DateJune 18, 2015
- [Easytrieve Guide for Mainframe Programmers (5 of 20)](https://srinimf.com/2015/07/14/easytrieve-guide-for-mainframe-programmers-5-of-20/)DateJuly 14, 2015
- [Easytrieve Guide for Mainframe Programmers (2 of 20)](https://srinimf.com/2015/06/20/easytrieve-guide-for-mainframe-programmers-2-of-20/)DateJune 20, 2015

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F07%2F22%2Feasytrieve-guide-for-mainframe-programmers-6-of-20%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2015%2F07%2Fpexels-photo-4498366.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=Easytrieve%20Guide%20for%20Mainframe%20Programmers%20%286%20of%2020%29)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/07/22/easytrieve-guide-for-mainframe-programmers-6-of-20/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Easytrieve%20Guide%20for%20Mainframe%20Programmers%20%286%20of%2020%29&body=https%3A%2F%2Fsrinimf.com%2F2015%2F07%2F22%2Feasytrieve-guide-for-mainframe-programmers-6-of-20%2F&share=email)
-

### Like this:

Like Loading…
