Monday, 29 July 2013

Easytrieve Program Structure.

Program Structure

There are three basic sections to every EASYTRIEVE PLUS program. They are:
  • An Environment Section (optional)
  • A Library Section
  • One or More Activity Sections
ENVIRONMENT Section

You use the ENVIRONMENT section to change EASYTRIEVE PLUS system defaults. It is an optional and infrequently used section of an EASYTRIEVE PLUS program.

LIBRARY Section
The LIBRARY section of the program is used to define all input, output, and working storage fields used in the program.

ACTIVITY Section
An ACTIVITY section consists of two subactivities: Logic and Report.
  • The Logic subactivity contains EASYTRIEVE PLUS statements that perform data selection and manipulation.
  • The Report subactivity formats your final hard copy report.
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
---------/--------/--------/--------/---------/----------/----------/---------/----------/--------- 
 ROGERS              924                     01549             329.00         230.17


No comments:

Post a Comment