SlideShare une entreprise Scribd logo
1  sur  77
EASYTRIEVE PLUS
Contents
1. Introduction
1.1 Capabilities
File access
Field Definition
Logic process
File Output
Report Output
1.2 Environment.
1.2 General Rules.
2 Structure of Easytrieve programs
2.1 Description of various sections.
2.2 Description of statements.
3 Compilation and Running
3.1 Structure of compilation and run
JCL.
Introduction
Easytrieve plus is an information retrieval and
data management system
It is a primitive form of 4GL whose English like
language and simple syntax provide the tools for
easy data retrieval and report generation,
Easytrieve Plus can now produce reports in
HTML format. This feature allows you to create
reports that can be viewed either from a local disk
or LAN or from a World Wide Web server using
the Web browser
Capabilities
File access :
Easytrieve Plus’ file access features all standard retrieval system
capabilities, and also the following :
Accepts upto 890 input or output files.
Synchronises file processing (based on keys) of an unlimited
number of files.
Tests for file availability and current record count.
Provides search of external & instream files.
Provides easy method for using temporary files.
Field Definition:
Easytrieve Plus’ methods of defining all types of record
structures and field formats are consistent and easy to use,
including :
Defining all field formats, including binary and unsigned packed
fields.
Providing flexible edit masks.
Establishing initial values of working-storage fields.
Providing default report headings .
Allow multiple use of field definition using COPY keyword,
reducing coding and maintenance.
Logic Process :
Easytrieve Plus provides complete conditional logic, including :
Provides standard programming constructions such as nested IF,
DO WHILE and PERFORM statements.
Supports move for corresponding fields.
Sorts on any number of keys.
File Output :
Routine file maintenance is faster and simpler because of
Easytrieve Plus’ enhanced capabilities, including :
Allowing an unlimited number of input and output files.
Loading and updating files, including VSAM, IMS/DLI, IDMS
and SQL.
Saving report extract work files for subsequent use.
Provides a selective hex dump of a file or specific fields.
Report Output :
Report generation is the most powerful feature of Easytrieve Plus.
The following features make it widely acceptable to users :
Produces unlimited reports from a single pass of the data.
Automatically formats reports.
Provides customizing alternatives to all report formats.
Provides control breaks on any number of keys.
Creates summary reports containing subtotals.
Environment
Easytrieve Plus operates on the IBM 370, 30xx,
43xx and compatible processors in the
DOS/VSE, OS/VS, MVS/ESA and VM/CMS
environments.
Under TSO, CMS and ICCF, Easytrieve Plus
can run interactively for data inquiry, analysis
and reporting.
The output can be either returned back to the
screen or routed to a printer.
General Rules
A colon is used to qualify non-unique field name
An asterisk in the first column indicates a
comment. No comments are allowed between
continuations lines
A plus sign indicates that the statement continues
with the first non-blank character in the next
statement area.
Structure of Easytrieve
Program
Easytrieve Programs have three main
sections :
Environment Section
Library Section
One or more Activity Sections
Environment section
This section is used for customizing the operating
environment for the duration of program
compilation and execution. This section is
optional and if not specified, a default
environment is set.
Keyword used in this section : PARM
Example : PARM LINK (EZTPGM1)
DEBUGGING
DEBUG parameter of the PARM statement is
used to generate the output which is helpful in
analyzing programming errors
DEBUG subparameters are
– DMAP - Data definitions for all files and working
storage
– FLDCHK - validates all file/field references
– FLOW - traces statement logic
– STATE - gives statement number of the current
statement executed when abnormal termination occurs
XREF - produces a cross-reference of field-name,
file-names, procedure-names
Examples
– PARM DEBUG (DMAP FLDCHK STATE)
LIBRARY SECTION
The Library section of the program is used to
define all input, output and working storage fields
used in the program
The FILE statement describes an input or output
file and is coded in the Library section.
The syntax is
FILE ddname IS [ES] [F]
F lrecl
V maxlrecl+4
U blksize
FB (lrecl blksize)
VB (maxlrecl+4 maxblksize+4)
Field Definition Statement
field-name start-locationfield-length +
data-type [decimal-positions] +
[HEADING ‘literal’] +
MASK ([letter] [BWZ] [‘literal’])
[VALUE literal] [RESET]
Field-name
Field name must be unique within a file.
The name can be 1 to 40 alphanumeric
characters.
Special characters can be used, but not
delimiters
Start-location
The start location of a filed is the position of
its first character of data relative to the
position of the first character of data in the
record
Defining data structure:
Type Max. Length
A Alphanumeric 32, 767
N Numeric 18
P Packed 10
U Unsigned Packed 9
B Binary 4
HEADING Parameter
used to specify an alternative column heading
for a field
Eg. CL-NAME 5 20 A HEADING +
‘CLIENT NAME’ produces the column heading
as CLIENT NAME
MASK
An Edit mask is a pattern of characters specifying
how non-alphanumeric data is to be printed.
Alphanumeric fields cannot be edited. An edit
mask is created using combinations of the
following characters:
9 Formats digits.
Z Suppresses Leading zeroes
* Replaces leading zeroes with an asterisk
- Prints a minus sign prior to the first non-zero
MASK
digit of a negative number
$ Prints a currency symbol prior to the first non-
zero digit.
Eg. For Date ‘Z9/99/99’
For Negative number ‘-,---,9.99'
MASK ([letter] [BWZ] [‘literal’])
Letter is used to name the edit mask that
follows it. If we name a mask, we can reuse
it on other field definitions just by specifying
the name. A name can be any letter from A
thru Y.
BWZ (Blank When Zero) specifies that a field
should not be printed if the entire field
contains zeroes
System Default Masks
PAY 10 5 N 0 - ‘ZZ,ZZZ-’
PAY 10 5 N 2 - ‘ZZZ.99-’
PAY 10 5 N - ‘99999’
REDEFINITION
Redefinition can be done in the following
DOB 103 6 N
MM 103 2 N
DD 105 2 N
YY 107 2 N
Working Storage fields can be defined by
specifying W as the start location
VALUE option in the field definition statement is
used to initialize the
contents of a working storage field.
RESET - restores the field to its initial value
whenever JOB or SORT
is executed
Activity section
An activity section can be one of two type : JOB
or SORT
A JOB activity is where program logic is
coded. It can also contain a REPORT
subactivity which generates the formatted
report
The SORT activity is simply used to sort the
data before doing other processing
JOB activity
Syntax:
JOB INPUT (file-name) START proc-name] +
NULL [FINISH proc-name]
SQL
file-name :Automatic input files to the activity.
proc-name :Procedures to run at the start and/or finish of the
activity.
– START to identify a procedure to be executed during initiation
of the JOB activity
– FINISH to identify a procedure to be executed during the
normal termination of the JOB activity
Sort activity
This section is used to sort a data file.
Syntax:
SORT file-1 TO file-2
USING (field1 [D]…) +
[BEFORE proc-name]
JOB STATEMENT
It identifies the name of the input file
Syntax
JOB INPUT [file-name] +
[NAME job-name]
The optional name parameter names the JOB
activity. It can be up to 40 characters long. It can
begin with A-Z or 0-9, it cannot consist of all
numeric characters. This parameter is for
documentation only.
Processing within a JOB activity is dependent on
the condition (IF) statements in the program
Syntax
IF field-one (EQ OR NE OR GT OR GE OR
LT OR LE) (FIELD TWO OR
LITERAL OR ARITHMETIC
EXPRESSION)
[Statements executed for true IF]
[ELSE]
[Statements executed for false IF]
[END-IF]
ASSIGNEMENT
STATEMENT
The Assignment statement establishes a value in
a filed.
Syntax
field-name [INTEGER] [ROUNDED OR
TRUNCATED] EQ field-name-2 or literal or
arithmetic expression
The are 4 arithmetic operations
*, /, + and -
If INTEGER is used with TRUNCATED then
only the INTEGER function is performed.
INTEGER, ROUNDED and TRUNCATED are
valid only with Numeric fields only
REPORT
The are two parts to every report subactivity
REPORT Statement - which specifies the type
and physical characteristics of the report
Report Definition Statements - which defines
the content of the report
REPORT Statement
Report Statement is first coded in the report
subactivity
Syntax
REPORT report-name +
[PAGE SIZE nn] [LINE SIZE nn] +
[SKIP nn] [SPACE nn] [NO ADJUST] +
[NODATE] [NOPAGE] [NOHEADING] +
[LIMIT nn] [EVERY nn]
PAGESIZE -Lines per page (Default is 58)
LINESIZE -Length of each line (132)
SKIP -Number of blank lines to be
inserted between line groups (0)
SPACE -Number of blank lines inserted
between field columns and between fields and
literals in title and detail lines(3)
NOADJUST -Requests that the title lines and
report be left-justified on the page. The default is
for the report to be centered on the page
NODATE -Inhibits printing the date in
positions one through eight of the first title line
NOPAGE -Inhibits the printing of a page
number.
NOHEADING-Inhibits the printing of column
headings
LIMIT -Limits the number of records printed on
the report
EVERY -Specifies that only every nth line is
printed in the report
Report Definition Statements
This is the second part of a report subactivity and
these statements define the content of the report.
This has to be coded immediately after the
REPORT statement in the following order
– SEQUENCE
– CONTROL
– SUM
– TITLE
– HEADING
– LINE
SEQUENCE
This statement allows to specify the order of the
data in the report
Sequence can be done on any field from input file
or any W working storage field
Sequence fields are stated in major to minor order
Sequence order is ascending. Coding D after a
field-name reverses the order for that field only.
Syntax
SEQUENCE field-name-1 [D] …. +
field-name-n [D]
CONTROL
A CONTROL Statement specifies that a report
should automatically accumulate and print totals.
A control break occurs whenever the value of any
control field changes or end-of-report is reached
A CONTROL field can be any nonquantitative
field from any input file or working storage field
At each control break, the totals are printed for
the quantitative fields specified in the report
Unlimited number of control fields can be
specified.
Fields are coded on the CONTROL statement in
a major to minor order.
Syntax
CONTROL Field-name NEWPAGE NOPRINT
FINAL RENUM
– Final totals are automatically provided. You can alter
the default by coding FINAL NOPRINT
– NOPRINT following any field-name or FINAL
suppresses the printing of totals at that control break.
NEWPAGE following any field or FINAL causes
a new page with page numbers beginning at one
after the printing of the control break totals (in
case of final, before the printing of the final
totals)
RENUM following any field or final causes a
new page with page numbers beginning at one
after the printing of the control break totals (in
case of FINAL before the printing of the final
totals)
SUM
The SUM statement specifies the quantitative
fields to be totaled for a control report
Normally easytrieve Plus totals all quantitative
fields specified on the LINE statement, but the
sum statement overrides this process.
Only the fields specified on the SUM statement
are totalled.
Syntax
SUM quant-field-1 ….. quant-field-n
TITLE STATEMENT
The TITLE statement allows you to define a title
for the report.
Up to 99 titles are permitted.
Syntax
TITLE [nn] +/- nn field-name
COL nn literal
+/-nn is used to alter the normal spacing
between literals or fields on the title lines (nn
spaces are added to or subtracted from the
SPACE parameter
COL nn specifies the print column number where
the next title item is to begin.
If this option is specified then NOADJUST
should also be specified on the REPORT
statement
If no TITLEs are coded, the date and page
number are not printed.
HEADING STATEMENT
The HEADING subactivity OVERRIDES a
HEADING parameter coded in the Library
section
Syntax
HEADING field-name (‘literal’ ….)
Eg. HEADING EMP-NO (‘EMPLOYEE’
‘NUMBER’)
LINE STATEMENT
The LINE statement defines the content of a
report line.
LINE 1 is used to designate headings for the
report columns.
Syntax
LINE nn +/-nn field-name
POS nn literal
COL nn
+/- is used to alter the normal spacing between
line items. nn is added to or subtracted from the
SPACE parameter
POS is for aligning fields under the
corresponding column heading positions
indicated on the LINE 1 statement.
COL nn specifies the print column number where
next field is to begin.
TALLY
TALLY is a system defined field for control
reports.
It contains the number of detail records printed
within each control break and can be printed on
the report.
It can only be used in control reports and the
value of TALLY only appears on summary lines.
Relative start-location
– We can define the start-location of a field relative to a
previously defined position in the record.
– Relatively defining a start-location eliminates the
need to identify the actual start-location of a field
– This is most useful when we create output files
Example
EMP# * 5 N
NAME * 16 A
FILLER1 * 10 N
ADDRESS * 39 A
The ADDRESS field would then start in pos 32
in the record
Relative Redefinition
– You can relatively redefine a field by
designating the original field-name as the
starting location for all subsequent fields in
the redefinition
– Example
DOB W 6 N
MM DOB 2 N
DD DOB +2 2 N
YY DOB +4 2 N
The starting position of the redefined field is designated
by using the original field plus the sum of the lengths of
all previous fields used in the redefinition.
STOP STATEMENT
A STOP statement allows you to terminate an
activity
Syntax
STOP [EXECUTE]
STOP ends the current activity and goes on to the
next activity if additional activities are coded.
STOP EXECUTE immediately terminates all
EASYTRIEVE PLUS execution.
DISPLAY
A DISPLAY statement sends data to a specified
output file or output device.
This is commonly used
– For error messages.
– For highlighting reports.
– For hex display of selected information
Syntax (Format I)
DISPLAY [file-name] NEWPAGE +INTEGER +
SKIP number COL integer
POS integer
literal-1 ….. Literal-n
field-name-1 ….. Field-name-n
If you specify the file-name, EASYTRIEVE
PLUS prints data to the named file. If file
name is not specified the default is
SYSPRINT/SYSLST (EASYTRIEVE
PLUS output files)
NEWPAGE option specifies that a skip to a new
page occurs before the data is printed.
SKIP option specifies that the designated number
of lines are skipped before the data is printed.
Coding integer modifies the horizontal spacing
between display items.
The COL integer option specifies the print
column number where EASYP places the next
display item.
The POS integer option on DISPLAY statements
within report procedures causes the next display
item to be positioned under the corresponding
position on LINE 1 statement.
Syntax (Format II)
DISPLAY [file-name] NEWPAGE HEX field-name
SKIP number file name
In this format , EASYTRIEVE PLUS produces a
hexadecimal and character dump of the current
record or the specified field-name
The parameter other than HEX, operate the same
as in Format I
REPORT statement
Syntax
– REPORT report-name [DTLCTL FIRST]
EVERY
NONE
[SUMCTL HIAR DTLCOPY]
NONE
TAG
[SUMMARY]
[SUMFILE file-name]
[PRINTER file-name]
DTLCTL determines when control field values
are printed on detail lines :
FIRST detail line (Default)
EVERY detail line
NONE of the detail lines
SUMCTL determines when control field values
are printed on total summary lines
HIAR prints all fields from major control to
minor control as far as the breaking field.
This is default.
NONE inhibits printing of control field
values on total lines
TAG prints the control field name and
the literal TOTAL on the left side of the
subtotals
DTLCOPY print all values from detail lines onto
summary lines
SUMMARY produces a summary report that
contains only total lines.
SUMFILE generates a summary file.
A summary file is a file that contains the
values for all control and summed fields at
each minor break.
The summary file can be process by
subsequent JOB activities
Summary file can be requested by defining the
file in the library and then creating it via
REPORT SUMFILE parameter.
VFM
Virtual File Manager (VFM) provides an easy
method for establishing temporary work files
without special job control or file allocation
statements.
It is a sequential access method for program work
files
It dynamically allocates space in memory for
work files when sequencing a report or when
producing multiple reports
CALL Statement invokes an external subprogram.
The called program is an existing program in another
language
Syntax
CALL program-name USING field-name …… +
RETURNS field-name-2
GOTO or GO TO statement is used to modify the natural
top-to-bottom logic flow in a program
Syntax
GO TO or GOTO label/JOB
A label can be up to 40 characters long and it must be in
the same activity or procedure
FILE PROCESSING
EASYTRIEVE PLUS process the following file
types
– SAM
– ISAM
– VSAM
– IMS/DLI
– IDMS
File processing can be done either Automatically
(using JOB or SORT) or programmer controlled
(using GET, PUT, READ, WRITE …)
The GET Statement retrieves the next record of
the named file into the file input area
Syntax
GET file-name
file-name is input file name
EOF - Test of end-of-file when using the GET
command
PUT statement outputs a file sequentially
Syntax
PUT outfile [FROM file-name]
File processing fields
RECORD-LENGTH is a two byte binary field
with zero decimal places used for all file types to
determine or establish the length of the current
data record. For variable length records, this field
contains only the length of the records data
RECORD-COUNT is a read-only four byte
binary field with zero decimal places which
contains the number of logical I/O operations
performed on a file
FILE-STATUS contains the results of most
recent I/O operations on a file
TABLES
A table is a collection of uniform data records in
a form suitable for quick reference
– A search argument (keyword ARG) that uniquely
identifies that entry
– A description (Keyword DESC) is the data associated
with the argument
The user’s objective is to obtain the description
from a table of values based on the search
argument
A table file must be arranged in ascending order
by argument
No duplicate arguments can be places in the file
A minimum of three entries are required in a
table
Syntax
FILE file-name TABLE INSTREAM
literal
– INSTREAM denotes that the table file immediately
follows the file description
Literal specifies the number of entries in an
external table. Specify a value
here only if the number of entries is greater that
256
ENDTABLE must be the last entry in the
instream table data
Instream example
FILE STATTBL TBLE INSTREAM
ARG 1 2 N
DESC 4 15 A
01 ALBAMA
02 ALASKA
03 ARIZONA
ENDTABLE
SEARCH statement is used to perform an in-core
binary search of a table.
Syntax
SEARCH file-name WITH field-name-1
GIVING field-name-2
Field-name-1 is the name of a field which
contains a value that is compared to the search
argument
Field-name-2 is the name of a field into
which the description is places if a match exists
between field-name-1 and the search argument.
Example of an Easytrieve program
FILE PERSNL FB(150 1500)
NAME 17 8 A
EMP# 9 5 N
DEPT 98 3 N
NET 90 4 P 2
GROSS 94 4 P 2
JOB INPUT PERSNL NAME FIRST-PGM
*
REPORT PAY-RPT LINESIZE 80
SEQUENCE DEPARTMENT NAME
CONTROL DEPARTMENT
TITLE 01 ‘PERSONNEL REPORT’
TITLE 02 ‘SECOND TITLE’
HEADING EMP# (‘EMPLOYEE’ ‘NUMBER’)
LINE 01 NAME DEPT EMP# +
GROSS NET
OUTPUT
09/03/01 PERSONAL REPORT PAGE 1
SECOND TITLE
EMPLOYEE
NAME DEPT NUMBER GROSS NET
RAJ 911 01963 445.50 300.00
RAMAN 01234 100.00 100.00
911 545.50 400.00
SUMIT 912 24689 100.00 200.00
912 100.00 200.00
645.50 600.00
Structure of compilation and run JCL
//jobname accounting info
//STEPNAME EXEC PGM=EZTPA00,REGION=300K
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DSN=obj-module-dsn,DISP=…
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,1)
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,1)
//userfile DD dd-parms
//SYSIN DD DSN=program-ds,DISP=SHR
Thank You

Contenu connexe

Tendances

I Can do WHAT with PCMCS? Features and Functions, Business Benefits, and Use...
I Can do WHAT with PCMCS?  Features and Functions, Business Benefits, and Use...I Can do WHAT with PCMCS?  Features and Functions, Business Benefits, and Use...
I Can do WHAT with PCMCS? Features and Functions, Business Benefits, and Use...
Alithya
 
Vsam interview questions and answers.
Vsam interview questions and answers.Vsam interview questions and answers.
Vsam interview questions and answers.
Sweta Singh
 
Mainframe JCL Part - 1
Mainframe JCL Part - 1Mainframe JCL Part - 1
Mainframe JCL Part - 1
janaki ram
 

Tendances (20)

I Can do WHAT with PCMCS? Features and Functions, Business Benefits, and Use...
I Can do WHAT with PCMCS?  Features and Functions, Business Benefits, and Use...I Can do WHAT with PCMCS?  Features and Functions, Business Benefits, and Use...
I Can do WHAT with PCMCS? Features and Functions, Business Benefits, and Use...
 
Advanced REXX Programming Techniques
Advanced REXX Programming TechniquesAdvanced REXX Programming Techniques
Advanced REXX Programming Techniques
 
PeeringDB Tutorial
PeeringDB TutorialPeeringDB Tutorial
PeeringDB Tutorial
 
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginnersUnderstanding SQL Trace, TKPROF and Execution Plan for beginners
Understanding SQL Trace, TKPROF and Execution Plan for beginners
 
Top jcl interview questions and answers job interview tips
Top jcl interview questions and answers job interview tipsTop jcl interview questions and answers job interview tips
Top jcl interview questions and answers job interview tips
 
JCL FOR FRESHERS
JCL FOR FRESHERSJCL FOR FRESHERS
JCL FOR FRESHERS
 
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
FDMEE Scripting - Cloud and On-Premises - It Ain't Groovy, But It's My Bread ...
 
Vsam interview questions and answers.
Vsam interview questions and answers.Vsam interview questions and answers.
Vsam interview questions and answers.
 
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the mythsDB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
DB2 for z/OS and DASD-based Disaster Recovery - Blowing away the myths
 
Db2
Db2Db2
Db2
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPF
 
Mvs commands
Mvs commandsMvs commands
Mvs commands
 
SMP/What?
SMP/What?SMP/What?
SMP/What?
 
PL/SQL
PL/SQLPL/SQL
PL/SQL
 
JCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPYJCL UTILITIES IEBCOPY
JCL UTILITIES IEBCOPY
 
Mainframe JCL Part - 1
Mainframe JCL Part - 1Mainframe JCL Part - 1
Mainframe JCL Part - 1
 
Skillwise JCL
Skillwise JCLSkillwise JCL
Skillwise JCL
 
PLSQL Tutorial
PLSQL TutorialPLSQL Tutorial
PLSQL Tutorial
 
Z4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OSZ4R: Intro to Storage and DFSMS for z/OS
Z4R: Intro to Storage and DFSMS for z/OS
 
Tso and ispf
Tso and ispfTso and ispf
Tso and ispf
 

En vedette

En vedette (13)

Cross Cultural Sensitivity
Cross Cultural SensitivityCross Cultural Sensitivity
Cross Cultural Sensitivity
 
Rexx
RexxRexx
Rexx
 
Writing command macro in stratus cobol
Writing command macro in stratus cobolWriting command macro in stratus cobol
Writing command macro in stratus cobol
 
Rexx Shih
Rexx ShihRexx Shih
Rexx Shih
 
Sort presentation
Sort presentationSort presentation
Sort presentation
 
Macro teradata
Macro teradataMacro teradata
Macro teradata
 
PL/SQL Interview Questions
PL/SQL Interview QuestionsPL/SQL Interview Questions
PL/SQL Interview Questions
 
DB2-SQL Part-2
DB2-SQL Part-2DB2-SQL Part-2
DB2-SQL Part-2
 
Oracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step GuideOracle PLSQL Step By Step Guide
Oracle PLSQL Step By Step Guide
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
 
Assembler
AssemblerAssembler
Assembler
 
100 sql queries
100 sql queries100 sql queries
100 sql queries
 
Assembly Language Basics
Assembly Language BasicsAssembly Language Basics
Assembly Language Basics
 

Similaire à The Easytrieve Presention by Srinimf

My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
Anas Mohammed
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
faithxdunce63732
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
Ahmed M. Abed
 
Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3
janaki ram
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
wingsrai
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
tabish
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
tabish
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
tabish
 
Eff Plsql
Eff PlsqlEff Plsql
Eff Plsql
afa reg
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2
rowensCap
 

Similaire à The Easytrieve Presention by Srinimf (20)

My cool new Slideshow!
My cool new Slideshow!My cool new Slideshow!
My cool new Slideshow!
 
07 chapter03 05_siemens_tags_memory_structure_fa14
07 chapter03 05_siemens_tags_memory_structure_fa1407 chapter03 05_siemens_tags_memory_structure_fa14
07 chapter03 05_siemens_tags_memory_structure_fa14
 
06 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa1606 chapter03 04_control_logix_tags_memory_structure_fa16
06 chapter03 04_control_logix_tags_memory_structure_fa16
 
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docxCS 23001 Computer Science II Data Structures & AbstractionPro.docx
CS 23001 Computer Science II Data Structures & AbstractionPro.docx
 
Part III: Assembly Language
Part III: Assembly LanguagePart III: Assembly Language
Part III: Assembly Language
 
168054408 cc1
168054408 cc1168054408 cc1
168054408 cc1
 
NOTES ON "FOXPRO"
NOTES ON "FOXPRO" NOTES ON "FOXPRO"
NOTES ON "FOXPRO"
 
Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3Mainframe jcl exec and dd statements part - 3
Mainframe jcl exec and dd statements part - 3
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks202202 SUGUKI UNIX X Command Tips and Tricks
202202 SUGUKI UNIX X Command Tips and Tricks
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
09 basics operating and monitoring v1.00_en
09 basics operating and monitoring v1.00_en09 basics operating and monitoring v1.00_en
09 basics operating and monitoring v1.00_en
 
Eff Plsql
Eff PlsqlEff Plsql
Eff Plsql
 
Prog1 chap1 and chap 2
Prog1 chap1 and chap 2Prog1 chap1 and chap 2
Prog1 chap1 and chap 2
 
SAS Commands
SAS CommandsSAS Commands
SAS Commands
 

Plus de Srinimf-Slides

Plus de Srinimf-Slides (20)

software-life-cycle.pptx
software-life-cycle.pptxsoftware-life-cycle.pptx
software-life-cycle.pptx
 
Python Tutorial Questions part-1
Python Tutorial Questions part-1Python Tutorial Questions part-1
Python Tutorial Questions part-1
 
Cics testing and debugging-session 7
Cics testing and debugging-session 7Cics testing and debugging-session 7
Cics testing and debugging-session 7
 
CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6
 
Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5
 
Cics data access-session 4
Cics data access-session 4Cics data access-session 4
Cics data access-session 4
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3
 
Cics application programming - session 2
Cics   application programming - session 2Cics   application programming - session 2
Cics application programming - session 2
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1
 
The best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherThe best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresher
 
The best ETL questions in a nut shell
The best ETL questions in a nut shellThe best ETL questions in a nut shell
The best ETL questions in a nut shell
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven Days
 
DB2 SQL-Part-1
DB2 SQL-Part-1DB2 SQL-Part-1
DB2 SQL-Part-1
 
Teradata - Utilities
Teradata - UtilitiesTeradata - Utilities
Teradata - Utilities
 
Hirarchical vs RDBMS
Hirarchical vs RDBMSHirarchical vs RDBMS
Hirarchical vs RDBMS
 
20 DFSORT Tricks For Zos Users - Interview Questions
20 DFSORT Tricks For Zos Users - Interview Questions20 DFSORT Tricks For Zos Users - Interview Questions
20 DFSORT Tricks For Zos Users - Interview Questions
 
SRINIMF - An Overview
SRINIMF - An OverviewSRINIMF - An Overview
SRINIMF - An Overview
 
Db2 v10.5 An Overview
Db2 v10.5 An OverviewDb2 v10.5 An Overview
Db2 v10.5 An Overview
 
Learn VBScript – Part 1 of 4
Learn VBScript – Part 1 of 4Learn VBScript – Part 1 of 4
Learn VBScript – Part 1 of 4
 
Mainframe – CONTROL-M
Mainframe – CONTROL-MMainframe – CONTROL-M
Mainframe – CONTROL-M
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

The Easytrieve Presention by Srinimf

  • 2. Contents 1. Introduction 1.1 Capabilities File access Field Definition Logic process File Output Report Output
  • 3. 1.2 Environment. 1.2 General Rules. 2 Structure of Easytrieve programs 2.1 Description of various sections. 2.2 Description of statements. 3 Compilation and Running 3.1 Structure of compilation and run JCL.
  • 4. Introduction Easytrieve plus is an information retrieval and data management system It is a primitive form of 4GL whose English like language and simple syntax provide the tools for easy data retrieval and report generation, Easytrieve Plus can now produce reports in HTML format. This feature allows you to create reports that can be viewed either from a local disk or LAN or from a World Wide Web server using the Web browser
  • 5. Capabilities File access : Easytrieve Plus’ file access features all standard retrieval system capabilities, and also the following : Accepts upto 890 input or output files. Synchronises file processing (based on keys) of an unlimited number of files. Tests for file availability and current record count. Provides search of external & instream files. Provides easy method for using temporary files.
  • 6. Field Definition: Easytrieve Plus’ methods of defining all types of record structures and field formats are consistent and easy to use, including : Defining all field formats, including binary and unsigned packed fields. Providing flexible edit masks. Establishing initial values of working-storage fields. Providing default report headings . Allow multiple use of field definition using COPY keyword, reducing coding and maintenance.
  • 7. Logic Process : Easytrieve Plus provides complete conditional logic, including : Provides standard programming constructions such as nested IF, DO WHILE and PERFORM statements. Supports move for corresponding fields. Sorts on any number of keys.
  • 8. File Output : Routine file maintenance is faster and simpler because of Easytrieve Plus’ enhanced capabilities, including : Allowing an unlimited number of input and output files. Loading and updating files, including VSAM, IMS/DLI, IDMS and SQL. Saving report extract work files for subsequent use. Provides a selective hex dump of a file or specific fields.
  • 9. Report Output : Report generation is the most powerful feature of Easytrieve Plus. The following features make it widely acceptable to users : Produces unlimited reports from a single pass of the data. Automatically formats reports. Provides customizing alternatives to all report formats. Provides control breaks on any number of keys. Creates summary reports containing subtotals.
  • 10. Environment Easytrieve Plus operates on the IBM 370, 30xx, 43xx and compatible processors in the DOS/VSE, OS/VS, MVS/ESA and VM/CMS environments. Under TSO, CMS and ICCF, Easytrieve Plus can run interactively for data inquiry, analysis and reporting. The output can be either returned back to the screen or routed to a printer.
  • 11. General Rules A colon is used to qualify non-unique field name An asterisk in the first column indicates a comment. No comments are allowed between continuations lines A plus sign indicates that the statement continues with the first non-blank character in the next statement area.
  • 12. Structure of Easytrieve Program Easytrieve Programs have three main sections : Environment Section Library Section One or more Activity Sections
  • 13. Environment section This section is used for customizing the operating environment for the duration of program compilation and execution. This section is optional and if not specified, a default environment is set. Keyword used in this section : PARM Example : PARM LINK (EZTPGM1)
  • 14. DEBUGGING DEBUG parameter of the PARM statement is used to generate the output which is helpful in analyzing programming errors DEBUG subparameters are – DMAP - Data definitions for all files and working storage – FLDCHK - validates all file/field references – FLOW - traces statement logic – STATE - gives statement number of the current statement executed when abnormal termination occurs
  • 15. XREF - produces a cross-reference of field-name, file-names, procedure-names Examples – PARM DEBUG (DMAP FLDCHK STATE)
  • 16. LIBRARY SECTION The Library section of the program is used to define all input, output and working storage fields used in the program
  • 17. The FILE statement describes an input or output file and is coded in the Library section. The syntax is FILE ddname IS [ES] [F] F lrecl V maxlrecl+4 U blksize FB (lrecl blksize) VB (maxlrecl+4 maxblksize+4)
  • 18. Field Definition Statement field-name start-locationfield-length + data-type [decimal-positions] + [HEADING ‘literal’] + MASK ([letter] [BWZ] [‘literal’]) [VALUE literal] [RESET]
  • 19. Field-name Field name must be unique within a file. The name can be 1 to 40 alphanumeric characters. Special characters can be used, but not delimiters
  • 20. Start-location The start location of a filed is the position of its first character of data relative to the position of the first character of data in the record
  • 21. Defining data structure: Type Max. Length A Alphanumeric 32, 767 N Numeric 18 P Packed 10 U Unsigned Packed 9 B Binary 4
  • 22. HEADING Parameter used to specify an alternative column heading for a field Eg. CL-NAME 5 20 A HEADING + ‘CLIENT NAME’ produces the column heading as CLIENT NAME
  • 23. MASK An Edit mask is a pattern of characters specifying how non-alphanumeric data is to be printed. Alphanumeric fields cannot be edited. An edit mask is created using combinations of the following characters: 9 Formats digits. Z Suppresses Leading zeroes * Replaces leading zeroes with an asterisk - Prints a minus sign prior to the first non-zero
  • 24. MASK digit of a negative number $ Prints a currency symbol prior to the first non- zero digit. Eg. For Date ‘Z9/99/99’ For Negative number ‘-,---,9.99'
  • 25. MASK ([letter] [BWZ] [‘literal’]) Letter is used to name the edit mask that follows it. If we name a mask, we can reuse it on other field definitions just by specifying the name. A name can be any letter from A thru Y.
  • 26. BWZ (Blank When Zero) specifies that a field should not be printed if the entire field contains zeroes System Default Masks PAY 10 5 N 0 - ‘ZZ,ZZZ-’ PAY 10 5 N 2 - ‘ZZZ.99-’ PAY 10 5 N - ‘99999’
  • 27. REDEFINITION Redefinition can be done in the following DOB 103 6 N MM 103 2 N DD 105 2 N YY 107 2 N
  • 28. Working Storage fields can be defined by specifying W as the start location VALUE option in the field definition statement is used to initialize the contents of a working storage field. RESET - restores the field to its initial value whenever JOB or SORT is executed
  • 29. Activity section An activity section can be one of two type : JOB or SORT A JOB activity is where program logic is coded. It can also contain a REPORT subactivity which generates the formatted report The SORT activity is simply used to sort the data before doing other processing
  • 30. JOB activity Syntax: JOB INPUT (file-name) START proc-name] + NULL [FINISH proc-name] SQL file-name :Automatic input files to the activity. proc-name :Procedures to run at the start and/or finish of the activity. – START to identify a procedure to be executed during initiation of the JOB activity – FINISH to identify a procedure to be executed during the normal termination of the JOB activity
  • 31. Sort activity This section is used to sort a data file. Syntax: SORT file-1 TO file-2 USING (field1 [D]…) + [BEFORE proc-name]
  • 32. JOB STATEMENT It identifies the name of the input file Syntax JOB INPUT [file-name] + [NAME job-name] The optional name parameter names the JOB activity. It can be up to 40 characters long. It can begin with A-Z or 0-9, it cannot consist of all numeric characters. This parameter is for documentation only.
  • 33. Processing within a JOB activity is dependent on the condition (IF) statements in the program Syntax IF field-one (EQ OR NE OR GT OR GE OR LT OR LE) (FIELD TWO OR LITERAL OR ARITHMETIC EXPRESSION) [Statements executed for true IF] [ELSE] [Statements executed for false IF] [END-IF]
  • 34. ASSIGNEMENT STATEMENT The Assignment statement establishes a value in a filed. Syntax field-name [INTEGER] [ROUNDED OR TRUNCATED] EQ field-name-2 or literal or arithmetic expression The are 4 arithmetic operations *, /, + and -
  • 35. If INTEGER is used with TRUNCATED then only the INTEGER function is performed. INTEGER, ROUNDED and TRUNCATED are valid only with Numeric fields only
  • 36. REPORT The are two parts to every report subactivity REPORT Statement - which specifies the type and physical characteristics of the report Report Definition Statements - which defines the content of the report
  • 37. REPORT Statement Report Statement is first coded in the report subactivity Syntax REPORT report-name + [PAGE SIZE nn] [LINE SIZE nn] + [SKIP nn] [SPACE nn] [NO ADJUST] + [NODATE] [NOPAGE] [NOHEADING] + [LIMIT nn] [EVERY nn]
  • 38. PAGESIZE -Lines per page (Default is 58) LINESIZE -Length of each line (132) SKIP -Number of blank lines to be inserted between line groups (0) SPACE -Number of blank lines inserted between field columns and between fields and literals in title and detail lines(3) NOADJUST -Requests that the title lines and report be left-justified on the page. The default is for the report to be centered on the page
  • 39. NODATE -Inhibits printing the date in positions one through eight of the first title line NOPAGE -Inhibits the printing of a page number. NOHEADING-Inhibits the printing of column headings LIMIT -Limits the number of records printed on the report EVERY -Specifies that only every nth line is printed in the report
  • 40. Report Definition Statements This is the second part of a report subactivity and these statements define the content of the report. This has to be coded immediately after the REPORT statement in the following order – SEQUENCE – CONTROL – SUM – TITLE – HEADING – LINE
  • 41. SEQUENCE This statement allows to specify the order of the data in the report Sequence can be done on any field from input file or any W working storage field Sequence fields are stated in major to minor order Sequence order is ascending. Coding D after a field-name reverses the order for that field only. Syntax SEQUENCE field-name-1 [D] …. + field-name-n [D]
  • 42. CONTROL A CONTROL Statement specifies that a report should automatically accumulate and print totals. A control break occurs whenever the value of any control field changes or end-of-report is reached A CONTROL field can be any nonquantitative field from any input file or working storage field At each control break, the totals are printed for the quantitative fields specified in the report Unlimited number of control fields can be specified.
  • 43. Fields are coded on the CONTROL statement in a major to minor order. Syntax CONTROL Field-name NEWPAGE NOPRINT FINAL RENUM – Final totals are automatically provided. You can alter the default by coding FINAL NOPRINT – NOPRINT following any field-name or FINAL suppresses the printing of totals at that control break.
  • 44. NEWPAGE following any field or FINAL causes a new page with page numbers beginning at one after the printing of the control break totals (in case of final, before the printing of the final totals) RENUM following any field or final causes a new page with page numbers beginning at one after the printing of the control break totals (in case of FINAL before the printing of the final totals)
  • 45. SUM The SUM statement specifies the quantitative fields to be totaled for a control report Normally easytrieve Plus totals all quantitative fields specified on the LINE statement, but the sum statement overrides this process. Only the fields specified on the SUM statement are totalled. Syntax SUM quant-field-1 ….. quant-field-n
  • 46. TITLE STATEMENT The TITLE statement allows you to define a title for the report. Up to 99 titles are permitted. Syntax TITLE [nn] +/- nn field-name COL nn literal +/-nn is used to alter the normal spacing between literals or fields on the title lines (nn spaces are added to or subtracted from the SPACE parameter
  • 47. COL nn specifies the print column number where the next title item is to begin. If this option is specified then NOADJUST should also be specified on the REPORT statement If no TITLEs are coded, the date and page number are not printed.
  • 48. HEADING STATEMENT The HEADING subactivity OVERRIDES a HEADING parameter coded in the Library section Syntax HEADING field-name (‘literal’ ….) Eg. HEADING EMP-NO (‘EMPLOYEE’ ‘NUMBER’)
  • 49. LINE STATEMENT The LINE statement defines the content of a report line. LINE 1 is used to designate headings for the report columns. Syntax LINE nn +/-nn field-name POS nn literal COL nn
  • 50. +/- is used to alter the normal spacing between line items. nn is added to or subtracted from the SPACE parameter POS is for aligning fields under the corresponding column heading positions indicated on the LINE 1 statement. COL nn specifies the print column number where next field is to begin.
  • 51. TALLY TALLY is a system defined field for control reports. It contains the number of detail records printed within each control break and can be printed on the report. It can only be used in control reports and the value of TALLY only appears on summary lines.
  • 52. Relative start-location – We can define the start-location of a field relative to a previously defined position in the record. – Relatively defining a start-location eliminates the need to identify the actual start-location of a field – This is most useful when we create output files Example EMP# * 5 N NAME * 16 A FILLER1 * 10 N ADDRESS * 39 A The ADDRESS field would then start in pos 32 in the record
  • 53. Relative Redefinition – You can relatively redefine a field by designating the original field-name as the starting location for all subsequent fields in the redefinition – Example DOB W 6 N MM DOB 2 N DD DOB +2 2 N YY DOB +4 2 N The starting position of the redefined field is designated by using the original field plus the sum of the lengths of all previous fields used in the redefinition.
  • 54. STOP STATEMENT A STOP statement allows you to terminate an activity Syntax STOP [EXECUTE] STOP ends the current activity and goes on to the next activity if additional activities are coded. STOP EXECUTE immediately terminates all EASYTRIEVE PLUS execution.
  • 55. DISPLAY A DISPLAY statement sends data to a specified output file or output device. This is commonly used – For error messages. – For highlighting reports. – For hex display of selected information
  • 56. Syntax (Format I) DISPLAY [file-name] NEWPAGE +INTEGER + SKIP number COL integer POS integer literal-1 ….. Literal-n field-name-1 ….. Field-name-n If you specify the file-name, EASYTRIEVE PLUS prints data to the named file. If file name is not specified the default is SYSPRINT/SYSLST (EASYTRIEVE PLUS output files)
  • 57. NEWPAGE option specifies that a skip to a new page occurs before the data is printed. SKIP option specifies that the designated number of lines are skipped before the data is printed. Coding integer modifies the horizontal spacing between display items. The COL integer option specifies the print column number where EASYP places the next display item. The POS integer option on DISPLAY statements within report procedures causes the next display item to be positioned under the corresponding position on LINE 1 statement.
  • 58. Syntax (Format II) DISPLAY [file-name] NEWPAGE HEX field-name SKIP number file name In this format , EASYTRIEVE PLUS produces a hexadecimal and character dump of the current record or the specified field-name The parameter other than HEX, operate the same as in Format I
  • 59. REPORT statement Syntax – REPORT report-name [DTLCTL FIRST] EVERY NONE [SUMCTL HIAR DTLCOPY] NONE TAG [SUMMARY] [SUMFILE file-name] [PRINTER file-name]
  • 60. DTLCTL determines when control field values are printed on detail lines : FIRST detail line (Default) EVERY detail line NONE of the detail lines SUMCTL determines when control field values are printed on total summary lines HIAR prints all fields from major control to minor control as far as the breaking field. This is default.
  • 61. NONE inhibits printing of control field values on total lines TAG prints the control field name and the literal TOTAL on the left side of the subtotals DTLCOPY print all values from detail lines onto summary lines SUMMARY produces a summary report that contains only total lines. SUMFILE generates a summary file.
  • 62. A summary file is a file that contains the values for all control and summed fields at each minor break. The summary file can be process by subsequent JOB activities Summary file can be requested by defining the file in the library and then creating it via REPORT SUMFILE parameter.
  • 63. VFM Virtual File Manager (VFM) provides an easy method for establishing temporary work files without special job control or file allocation statements. It is a sequential access method for program work files It dynamically allocates space in memory for work files when sequencing a report or when producing multiple reports
  • 64. CALL Statement invokes an external subprogram. The called program is an existing program in another language Syntax CALL program-name USING field-name …… + RETURNS field-name-2 GOTO or GO TO statement is used to modify the natural top-to-bottom logic flow in a program Syntax GO TO or GOTO label/JOB A label can be up to 40 characters long and it must be in the same activity or procedure
  • 65. FILE PROCESSING EASYTRIEVE PLUS process the following file types – SAM – ISAM – VSAM – IMS/DLI – IDMS File processing can be done either Automatically (using JOB or SORT) or programmer controlled (using GET, PUT, READ, WRITE …)
  • 66. The GET Statement retrieves the next record of the named file into the file input area Syntax GET file-name file-name is input file name EOF - Test of end-of-file when using the GET command PUT statement outputs a file sequentially Syntax PUT outfile [FROM file-name]
  • 67. File processing fields RECORD-LENGTH is a two byte binary field with zero decimal places used for all file types to determine or establish the length of the current data record. For variable length records, this field contains only the length of the records data RECORD-COUNT is a read-only four byte binary field with zero decimal places which contains the number of logical I/O operations performed on a file FILE-STATUS contains the results of most recent I/O operations on a file
  • 68. TABLES A table is a collection of uniform data records in a form suitable for quick reference – A search argument (keyword ARG) that uniquely identifies that entry – A description (Keyword DESC) is the data associated with the argument The user’s objective is to obtain the description from a table of values based on the search argument
  • 69. A table file must be arranged in ascending order by argument No duplicate arguments can be places in the file A minimum of three entries are required in a table Syntax FILE file-name TABLE INSTREAM literal – INSTREAM denotes that the table file immediately follows the file description
  • 70. Literal specifies the number of entries in an external table. Specify a value here only if the number of entries is greater that 256 ENDTABLE must be the last entry in the instream table data
  • 71. Instream example FILE STATTBL TBLE INSTREAM ARG 1 2 N DESC 4 15 A 01 ALBAMA 02 ALASKA 03 ARIZONA ENDTABLE
  • 72. SEARCH statement is used to perform an in-core binary search of a table. Syntax SEARCH file-name WITH field-name-1 GIVING field-name-2 Field-name-1 is the name of a field which contains a value that is compared to the search argument Field-name-2 is the name of a field into which the description is places if a match exists between field-name-1 and the search argument.
  • 73. Example of an Easytrieve program FILE PERSNL FB(150 1500) NAME 17 8 A EMP# 9 5 N DEPT 98 3 N NET 90 4 P 2 GROSS 94 4 P 2
  • 74. JOB INPUT PERSNL NAME FIRST-PGM * REPORT PAY-RPT LINESIZE 80 SEQUENCE DEPARTMENT NAME CONTROL DEPARTMENT TITLE 01 ‘PERSONNEL REPORT’ TITLE 02 ‘SECOND TITLE’ HEADING EMP# (‘EMPLOYEE’ ‘NUMBER’) LINE 01 NAME DEPT EMP# + GROSS NET
  • 75. OUTPUT 09/03/01 PERSONAL REPORT PAGE 1 SECOND TITLE EMPLOYEE NAME DEPT NUMBER GROSS NET RAJ 911 01963 445.50 300.00 RAMAN 01234 100.00 100.00 911 545.50 400.00 SUMIT 912 24689 100.00 200.00 912 100.00 200.00 645.50 600.00
  • 76. Structure of compilation and run JCL //jobname accounting info //STEPNAME EXEC PGM=EZTPA00,REGION=300K //SYSPRINT DD SYSOUT=* //SYSLIN DD DSN=obj-module-dsn,DISP=… //SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,1) //EZTVFM DD UNIT=SYSDA,SPACE=(CYL,1) //userfile DD dd-parms //SYSIN DD DSN=program-ds,DISP=SHR

Notes de l'éditeur

  1. There are three types of Databases Hierarchical Model : Ex: IMS from IBM Network Model : Ex:IDMS from Cullinet/Computer Associates Relational Model : Ex:DB2 from IBM