Monday 29 July 2013

EASYTRIEVE Tutorial || Easytrive Program Structure || Easytrieve Reporting Example.


Hello! and welcome back to another exciting tutorial on EASYTRIEVE Program. In this Easytrive tutorial, you'll learn the basic structure of an Easytrive program.  You'll get a flavor of the Easytrieve program.  Let's start with today's tutorial with an introduction to the Earyteive program sections.  

Easytrive Introduction.

Easytreive on the mainframe is a data retrieval programming language. Easytrieve is generally used for creating custom reports, extract data. Let's focus on an Easytrive sample reporting program. 

Easytrive Program Structure.

The Easytrive program generally has three different sections (i.e. environment section, library section, activity section). Each section has its own significance. Let's look at each section in detail. 

ENVIRONMENT Section.

An Easytrive Environment section optional. It is generally used to change the default parameters of the system environment. The PARM keyword is used to specify the new parameters. 

For example- PRAM LINK (EZTBPGM2)

LIBRARY Section.

The Easytrive Library section specifies the input and output file used in the program. This section is also used to define the working storage fields for the program logic.   

For example - FILE PERSNL  

Note: In the above mention example, PERSNL is the name of a file used in an easytrive program.

ACTIVITY Section.

The last section of an Easytrive program is the Activity Section. This is a mandatory section and it is to specify the business logic of the program. The activity section can have any number of small tasks in the form of paragraphs. Each paragraph represents a set of business rules or logic as per need.  

Mainframe Forum - Easytrieve Program Flow

Easytrive Sample Reporting Program.

  • Program Name: EZTBRP01
  • Description: EZTBRP01 is an easytrive program, that generates reports in specific formats.

*
 INPUT 
*
 FILE  PERSNL   FB   (150 1800) 
       NAME           17     20    A 
       EMP#           9       5    N 
       DEPARTMENT     98      3    N 
       NET            90      4    P  2  
       GROSS          94      4    P  2 
 JOB INPUT PERSNL NAME EXAMPLE-ONE 
 PRINT PAY-RPT 
*
 REPORT  JOB  INPUT  PERSNL  NAME  EXAMPLE-ONE 
 PRINT  PAY-RPT 
*   REPORT  PAY-RPT 
 TITLE 1 ‘PERSONNEL  REPORT  EXAMPLE  ONE’ 
 LINE 1 NAME  DEPARTMENT  EMP#  GROSS NET

REPORT OUTPUT 

4/16/86                PERSONNEL REPORT EXAMPLE ONE                   PAGE 1
 NAME             DEPARTMENT         EMP#              GROSS          NET
 NAGLE               935             00370             554.40         340.59 
 POST                911             00445             292.00         206.60 
 PETRIK              921             00577             220.80         154.70 

No comments:

Post a Comment

New In-feed ads