Você está na página 1de 89

Lovit Tyagi and Deepika Gulati

1
AS/400 Group
Lovit Tyagi and Deepika Gulati
2
Advantage:2E Training
Contents
Introduction to Advantage:2E
Files And Fields
Access Paths
Functions (Basics Concepts and Device Design)
Functions (Action Diagram)
Lovit Tyagi and Deepika Gulati
3
Advantage :2E Training
INTRODUCTION TO ADVANTAGE 2E:
at is Advantage:2E?
An application development tool
Knowledge oI programming language not
required
PlatIorm independent application design
Allows eIIicient design, development,
implementation & maintenance oI application
soItware
Lovit Tyagi and Deepika Gulati
4
Advantage:2E
Application development tool Ior AS/400
Includes Advantage:2E/1E
Advantage:2E/2G
Provides PC based GUI Ior Advantage:2E
Advantage:2E/CSG (Client Server Generator)
Option to Advantage:2E which allows distributed Iunctionality on
multiple platIorms
ntroduction to Advantage:2E
Advantage:2E Products
Lovit Tyagi and Deepika Gulati
5
Libraries Needed
Y1SY
Y2SY
Model Library (e.g. JRKTESTMDL)
Library in which the model resides
Generation Library (e.g. JRKTESTGEN)
Associated with each model library
Contains source Iiles, compiled programs, help text, access paths
(created using DDS) and iournals
Few Important Source Physical Files
QDDSSRC (Source Code oI PFs, LFs, DSPFs .)
QRPGLESRC (RPG Source code Ior Iunctions generated)
Enter Command M *Y2 To start Synon
ntroduction to Advantage:2E
Getting Past Menus
Lovit Tyagi and Deepika Gulati
6
ntroduction to Advantage:2E
Getting Past Menus (Contd..)
Lovit Tyagi and Deepika Gulati
7
*DSNR
Can be said SuperUser oI Synon
Files/Access Paths Read/Write/Change
Functions Read/Write/Change
*PGMR
Files-Read Only
Access Paths Read/Write/Change
Functions Read/Write/Change
*USER
Files/Access Paths Read Only
Functions Read Only
ntroduction to Advantage:2E
Advantage:2E Main Menu
Lovit Tyagi and Deepika Gulati
8
ntroduction to Advantage:2E
Advantage:2E Main Menu
Lovit Tyagi and Deepika Gulati
9
1 Edit Database Relations
Used to make changes in the Model
(Actual Work)
2 Services Menu
Used to generate and compile source codes
(Generation Work)|
3 Other menu options in accordance to the mode
in which we have entered.(I.e. *DSNR, *PGMR
or *USER)
ntroduction to Advantage:2E
Second LeveI Menu
Lovit Tyagi and Deepika Gulati
10
ntroduction to Advantage:2E
Second LeveI Menu
Lovit Tyagi and Deepika Gulati
11
ntroduction to Advantage:2E
Database ReIations PaneI
Lovit Tyagi and Deepika Gulati
12
Advantage:2E Files
SYNON FILES
Each Advantage:2E File has a Name and a File Type
Advantage:2E File Naming rules
must be valid Advantage:2E Name
unique within the model
up to 25 characters including embedded blanks
e.g. !:7.ase O7de7 is a valid Advantage:2E Iile Name
Advantage:2E File Types
File Att7ib:te Des.7iption Example
Database CPT Capture Iile Order Entry
REF ReIerence Iile Company Iile
Non-database STR Structure Iile Audit date & time stamp
Lovit Tyagi and Deepika Gulati
13
File Types-
ReIerence (#EF) Iiles
master Iiles that contain non-volatile inIormation
e.g. !7od:.t. Employee.C:stome7
Capture (C!%) Iiles
contain transactional data that is recorded regularly
e.g. O7de7. Ledge7 Ent7y
Structure (S%#) Iiles
contain group oI Iields which can be included in other Iiles using
n.l:des relation
e.g. A:dit Stamp file
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
14
Advantage:2E Files
DeIault Iunctions
standard Iunctions are automatically deIined Ior Iiles
deIault Iunctions depend on Iile types
DeIault Iunctions Ior REF Iiles
F:n.tion A..ess !at
CRTOBJ - Create Obiect UPD
DLTOBJ - Delete Obiect UPD
CHGOBJ - Change Obiect UPD
SELRCD - Select Record RTV
EDTFIL - Edit File RTV
DeIault Iunctions Ior CPT Iiles
F:n.tion A..ess !at
CRTOBJ - Create Obiect UPD
DLTOBJ - Delete Obiect UPD
CHGOBJ - Change Obiect UPD
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
15
C7eating/Defining Files
At the Edit Database Relations panel, press F10 to show Define Obiects panel
In the Obiect tvpe column, enter FL
Type File Name in Obiect Name column
Type C!% or #EF or S%# in Obiect attr column depending on the Iile type
Defined as relation Ior the Iile is automatically created
Advantage:2E Files
Jp: SYNGXM QPADEV0004 22/08/97 15:31:12
DEFINE JBJECTS GXMMDL
Jbject Jbject Jbject Referenced Field Edit
type name attr field usage field
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
___ ________________________ ___ ________________________ ___ _
+
F3=Exit
Lovit Tyagi and Deepika Gulati
16
Advantage:2E Fields
Each Advantage:2E Field has a Name and a Field Type
Advantage:2E Field Naming rules
unique within the model
up to 25 characters including embedded blanks
e.g. C:stome7 Code is a valid Advantage:2E Field Name
implementation name is diIIerent
Advantage:2E Field Types
depends on the type oI values
broadly classiIied as alphanumeric, numeric & special Iield types
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
17
Advantage:2E Field Types
Field %ype Name Des.7iption %ype Lengt Example
CDE Code A 6 Stock Code
DTE Date P 7,0 Date oI birth
IGC Idegraphic text A 20 Kanii name
NAR Narrative text A 30 Comments
NBR Number P 5.0 # oI employees
PCT PercentageP 5.2 ProIit margin
PRC Price or tariII P 7.2 Unit Price
QTY Quantity P 5.0 Stock quantity
REF ReIerence - - Field based on another
SGT Surrogate P 7.0 System Key
STS Status A 1 Yes/No
TME Time P 6.0 Change Time
TXT Descriptive name A 25 Product name
VAL Monetary value P 11.2 Stock value
VNM Valid system name A 10 File name
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
18
Field Usage:
Two types: Database Iields and Function Iields
Database Iields
Code (CDE) Iields:- used Ior key Iields e.g. Company Code
Data attribute (A%#) Iields: used Ior non-key Iields e.g. Company Name
Function Iields
Fields used only in Iunctions but do not reside in database Iields can be added to
data dictionary and accessed in device designs and action diagrams 6 Iunction
Iield usage types:
CN% (count) D#' (derived)
MAX (maximum) MN (minimum)
SUM (sum) US# (user-deIined)
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
19
C7eating/Defining
In the Obiect tvpe column oI Define Obiects panel, enter FLD
Type Field Name in Obiect Name column
Type Advantage:2E Iield type in the Obiect attr column
Type Referenced field iI the Iield reIers to another Iield Ior domain
In the ield Usage column, type CDE (Code) or A%# (attribute) or a Iunction
Iield usage
Advantage:2E Files
Jp: SYNGXM QPADEV0004 22/08/97 15:31:12
DEFINE JBJECTS GXMMDL
Jbject Jbject Jbject Referenced Field Edit
type name attr field usage field
FIL Dealer
FIL Dealer group
FLD Dealer Code CDE
FLD Dealer name ATR
FLD Dealer Address 1 ATR
FLD Dealer Address 2 ATR
FLD Dealer Group Code CDE
FLD Dealer Group Name ATR
FLD Dealer Group Credit Limit ATR
+
F3=Exit
Lovit Tyagi and Deepika Gulati
20
Advantage:2E Condition
SpeciIies the values or set oI values a Iield may take
Condition has a Name, a type and an associated value
Condition Types
1. 'al:e ('AL) Condition
Used to speciIy single values that status Iield can take
two related values:
internal value - value in the implemented database
external value - value displayed/entered on the screen
e.g. !7emi:m paid condition has Iile value 'Y
..contd.
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
21
2. List (LS%) Condition
used to speciIy list oI values that status Iield can take
screen Iunctions implement prompt key (F4)
e.g. Invoice Flag can have valid values U, D, P, H, C and the condition nvoi.e
not d:e has Iile value 'U.
3. Compa7e (CM!) Condition
deIined in terms oI a Iixed value and an operator
valid operators: *EQ, *NE, *GT, *LT, *GE, *LE
e.g. Order Quantity Iield can have an associated condition by name g7eate7 tan
10 with operator *GT and value 10.
4. #ange (#NG) Condition
deIines range oI values that Iield can take
deIined in terms oI From and To values
e.g. Stock Quantity Iield can have an associated condition by name between 10
and 100 with From value as 10 and To value as 100
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
22
Advantage:2E Relations
Database relations can be entered using Edit Database Relations panel
Expresses association between two Iiles or between a Iile and a Iield
Eight relation types
DeIined as, Extended by, Has, Includes, Known by, Owned by,
QualiIied by and ReIers to
3 diIIerent relation usage groups
DeIinition relations - declare Iiles to exist
Key relations - deIine the keys in Iiles
Attribute relations - declare non-key Iields in Iiles
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
23
Advantage:2E Relations
Usage %ype #elation Used fo7
DeIinition DeIined as File-to-Iile relationship
Key Owned by File-to-Iile relationship
Known by File-to-Iield relationship
QualiIied by File-to-Iield relationship
Attribute ReIers to File-to-Iile relationship
Includes File-to-Iield relationship
Has File-to-Iield relationship
Other Extended by File-to-Iile relationship
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
24
Defined as Relation
File-to-Iile relation
declares that a Iile exists
e.g. Employee DeIined as Employee
DeIined as relation is automatically created Ior a Iile iI a reIerence is made to a
non-existing Iile
Owned by Relation
File-to-Iile relation
denotes a parent-child relationship
primary key(s) oI owning Iile become part oI primary key oI the owned by Iile
keys oI owning Iile are incorporated as high order keys in the owned Iile
e.g. Order Detail Owned by Order
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
25
nown by Relation
File-to-Iield relation
SpeciIies the key Iield(s) Ior a Iile
e.g. FIL Order Known by FLD Order Number
FIL Order Has FLD Quantity
":alified by Relation
File-to-Iield relation
To qualiIy a Iile identiIier by one or more variable Iactors like date, time,
sequence number etc
Used Ior entities which represent continuum oI values like currency rates having
eIIective date.
Appropriate Iields oI reIerring Iile can be redirected (RDR) to the eIIective Iield
in reIerred Iile with a possibility oI speciIying !#E'OUS or NEX%
Iield in the relation must be ATR and not CDE.
.continued.
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
26
":alified by Relation
e.g. Product Price Owned by Product Code
Product Price QualiIied by EIIective date
Product Price Has Product price
Has Relation
File-to-Iield relation
declares a Iield to be present in a Iile as an attribute
e.g. FIL Order Has FLD Quantity
n.l:des Relation
File-to-Iile relation
Iile includes all the Iields oI a structure (STR) Iile
e.g. Product Includes Audit Stamp
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
27
#efe7s to Relation
File-to-Iile relation
speciIies that a Iile reIers to another Iile
Allows access to any oI the Iields on the reIerred to Iile Irom a reIerring Iile
Primary key oI the reIerred Iile becomes Ioreign key in the reIerring Iile
Virtual Iield is created in the reIerring Iile and cannot be updated Irom the
reIerring Iile
e.g. Order Detail ReIers to Product
Extended by Relation
File-to-Iile relation
declares a Iile to be extension oI another Iile
II used with Owned by relation, the Iields oI the extended Iile are available as
'irtual ields in the Iile being extended
It is recommended to use Extended by relation along with Owned by relation
e.g. Customer Extended by Customer Detail
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
28
Advantage:2E Relation
Fo7 %ext For Text clause can be added to a relation to Iurther clariIy the description
oI a relationship.
II a Iile reIers to another Iile more than once, For Text clause can be used Ior
Iurther clariIication.
e.g. Order ReIers to Customer
For: Ordering Sharing: *ALL
Order ReIers to Customer
For: Invoicing Sharing: *ALL
C7eating/Defining #elations
At the Obiect column oI Edit Database Relations panel, enter the Iile name
Type the relationship in Relation column.
Type the reIerenced obiect (File or Field) in the Referenced Obiect column
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
29
Edit File Ent7ies
Type E in Iront oI any relation to display Edit ile Entries panel.
DSNR GXMMDL Jp: SYNGXM QPADEV0004 22/08/97 15:25:26
EDIT DATABASE RELATIJNS GXMMDL
= Rel lvl:
. Typ Jbject Relation Seq Typ Referenced object
FIL Dealer Jwned by FIL Dealer group
FIL Dealer Known by FLD Dealer Code
FIL Dealer Has FLD Dealer name
FIL Dealer Has FLD Dealer Address 1
FIL Dealer Has FLD Dealer Address 2
FIL Dealer Group Known by FLD Dealer Group Code
FIL Dealer Group Has FLD Dealer Group Name
FIL Dealer Group Has FLD Dealer Group Credit Limit
SEL: Z(n)-Details, N(n)-Narr, S(n)-Select, E(n)-Entries, V-Virt.fields, F-Funcs
F3=Exit F5=Reload F7=Fields F9=Insert F10=Define obj. F17=Services
'Dealer' type FIL not found.
Advantage:2E Files
Lovit Tyagi and Deepika Gulati
30
Jp: SYNGXM QPADEV0004 22/08/97 16:11:55
EDIT FILE ENTRIES GXMMDL

File . . . . . . : Dealer

. Field Type Jcr Et Ksq GEN name Length Renamed

Dealer Group Code CDE K 1 AICD 6


Dealer Code CDE K 2 AHCD 6
Dealer name TXT A AJTX 25
Dealer Address 1 TXT A AKTX 25
Dealer Address 2 TXT A ALTX 25

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters.


F3=Exit

Advantage:2E Files
Lovit Tyagi and Deepika Gulati
31
Jp: SYNGXM QPADEV0004 22/08/97 16:11:55
EDIT FIELD DETAILS GXMMDL
Field name . . . . . : Booking payment status Document'n seq . :
Type . . . . . . . . : STS REF: Payment Status Field usage . : ATR
Internal length. . . : 1 Data type : A lowercase: GEN name . : BKST
K'bd shift :
Headings . . . . . . : -
Text . . . . . . . . : Booking payment status
Left hand side . . . : Booking payment status
Right hand side. . . : Value
Column headings. . . : Booking
: payment
: status
Validation . . . . . : -
Default condition. . : NJNE
Check condition. . . : NJNE
Mandatory fill . . . : (Y, )
Valid System name. . : (Y,' `) Translate cnd vlues : Blank (Y,' `)
F3=Exit no update F8=Change name/type F9=Conditions F20=Narrative
Advantage:2E Files
Edit Field Details
Type 2 in Iront oI the File-Iield relation to display Edit ield Details panel Ior
the Iield O#
Type in Iront oI the Iield entry in the Edit ile Details panel
Lovit Tyagi and Deepika Gulati
32
Edit Field Condition
Field condition can be added/modiIied using the Edit ield Condition and Edit
ield Condition Detail panels
Press F9 on the Edit ield Details panel to display Edit ield Condition panel
In the Edit ield Condition panel, type condition name and condition type (VAL,
LST, CMP, or RNG) and press Ente7 to display Edit ield Condition Details
panel. In the Edit ield Condition Details panel, type the appropriate condition
details like value, range etc.
Advantage:2E Files
Jp: SYNGXM QPADEV0004 22/08/97 16:11:55
EDIT FIELD CJNDITIJN DETAILS GXMMDL
Field name . . . . . : Credit status Attr: STS Mode: ADD
Length of file . . . : 1
on display. . : 4
Condition. . . . . . : Blue chip
Type . . . . . . . . : VAL
File value Display value
Status value A A1
F3=Exit F8=Change name F20=Narrative
Lovit Tyagi and Deepika Gulati
33
Advantage :2E Training
A..ess pat
An a..ess pat defines te pysi.al file and/o7 te logi.al views of tat
file. Wen yo: b:ild one. yo: spe.ify te following:
The order in which you want to retrieve records Irom a Iile.
Which Iields will be present ?
Your select/omit criteria Ior deciding which records Irom the Iile will be
retrieved by the access path.
Six types of A..ess !ats
!ysi.al (!HY)
Update (U!D)
#et7ieval (#%')
#eseq:en.e (#S")
":e7y ("#Y)
Span (S!N)
Lovit Tyagi and Deepika Gulati
34
uiIding Access Pats
PsicaI (PHY) Access Pat
Single Iormat Iile containing Iields derived Irom resolution oI all relations on the Iile.
Not keyed.
No virtual Iields.
Created automatically Ior every REF/CPT Iile.
Not reIerenced directly by Iunctions.
No additional PHY access paths allowed Ior a Iile.
&5date (&PD) Access Pat
Uniquely keyed, single Iormat access path which is used by Iunctions Ior updation.
Keyed on the Iields that identiIy the Iile.
No Virtual Iields.
Created automatically Ior every REF/CPT Iile.
Additional UPD access paths may be created with the same key but subset oI Iields.
Lovit Tyagi and Deepika Gulati
35
uiIding Access Pats
RetrievaI (RTV) Access Pat
Uniquely keyed, single Iormat access path used by Iunctions to retrieve records.
Keyed exactly as the UPD access path.
Allows virtual Iields.
Created automatically Ior every REF/CPT Iile.
Associated with the UPD access path.
Non-key Iields can be dropped.
Can select/omit records.
Possible to deIine multiple RTV access paths Ior a given Iile, but all should have same
key Iields.
Lovit Tyagi and Deepika Gulati
36
uiIding Access Pats
Resequence (RSQ) Access Pat
Uniquely or non-uniquely keyed single Iormat access path used by Iunctions to
retrieve records.
Must be created explicitly.
DeIaults to the keys oI the based on Iile.
Allows deIault keys to be changed which need not be unique.
Allows virtual Iields.
Associated with RTV, which points to a UPD.
Many RSQ access paths possible Ior single Iile.
Quer (QRY) Access Pat
Keyed single Iormat access path used by Iunctions to retrieve records.
Must be created explicitly.
Allows virtual Iields on key & non-key Iields.
Available only Ior Print Obiect/Print File Iunctions.
DeIaults to the keys oI the based on Iile.
Allows deIault keys to be changed.
Associated with RTV, which points to a UPD
Many QRY access paths possible Ior single Iile
Implemented by OPNQRYF or Dynamic SQL
Lovit Tyagi and Deepika Gulati
37
Span (S!N) A..ess !at
A SPN access path can only be speciIied over Iiles with Owned by or ReIers to
relationships
A SPN access path must be created over an owning or reIerred to Iile
Press F9 on Edit Access Path Details panel to Iirst select the primary Iormat and then
the secondary Iormat
Keyed multi-Iormat access path
Used by Edit & Display transaction Iunctions to retrieve records Irom a pair oI
related Iiles
Must be created explicitly
DeIaults to keys oI based on Iiles
These keys can be changed
Allows virtual Iields
Associated with RTV, which points to a UPD
Many SPN access paths possible Ior single Iile
uiIding Access Pats
Adding an A..ess !at
Lovit Tyagi and Deepika Gulati
38
uiIding Access Pats
Adding an Access Pat
DSNR SYNGXMMDL Jp: SYNGXM QPADEV0007 11/02/98 12:02:11
EDIT DATABASE RELATIJNS SYNGXMMDL
= Rel lvl:
. Typ Jbject Relation Seq Typ Referenced object
FIL Customer Known by FLD Customer Code
FIL Customer Has FLD Customer Name
FIL Customer Has FLD Customer Address 1
FIL Customer Has FLD Customer Address 2
FIL Customer Has FLD Customer Address 3
FIL Customer Has FLD Customer Credit Limit
FIL Customer Has FLD Customer Limit Used
FIL Inventory Known by FLD Item Code
FIL Inventory Has FLD Item Name
FIL Inventory Has FLD Item Quantity
FIL Sales Jrder Header Known by FLD Sales Jrder Number
FIL Sales Jrder Header Refers to FIL Customer
FIL Sales Jrder Header Has FLD Sales Jrder Date
FIL Sales Jrder Header Has FLD Shipment Date
FIL Sales Jrder Lines Jwned by FIL Sales Jrder Header
+
SEL: Z(n)-Details, N(n)-Narr, S(n)-Select, E(n)-Entries, V-Virt.fields, F-Funcs
F3=Exit F5=Reload F7=Fields F9=Insert F10=Define obj. F17=Services
Lovit Tyagi and Deepika Gulati
39
uiIding Access Pats
Adding an A..ess !at
Type against any relation on the Edit Database Relations panel Ior the Iile and
press Ente7
On the resulting Edit ile Details panel, enter Access Path name and type and press
Ente7
Type to zoom into the new access path and speciIy details on the Edit Access Path
Details panel
Type on the Edit Access Path Details panel to go to Edit Access Path ormat
Entries panel
Lovit Tyagi and Deepika Gulati
40
:ilding A..ess !ats
Adding an A..ess !at
Jp: SYNGXM QPADEV0007 11/02/98 12:10:57
EDIT FILE DETAILS SYNGXMMDL
File name . . . . . . . . : Customer
Attribute . . . . . . . . : REF Field reference file. : NJNE
Documentation sequence. . : Source library. . . . : SYNGXMGEN
GEN format prefix . . . . : AB Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Customer NF Msgid. : USR0001
Record exists message . . : Customer EX Msgid. : USR0002
. Typ Access path Source mbr Key Maint Held
PHY Physical file UUABREP NJNE
UPD Update index UUABREL1 UNIQUE IMMED
RTV Retrieval index UUABREL0 UNIQUE IMMED
RSQ Customer by Name
SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, N-Narrative,
H-Hold/Release, J-Jverrides, U-Usage, F-Function refs., L-Locks.
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative
Lovit Tyagi and Deepika Gulati
41
Jp: SYNGXM QPADEV0007 11/02/98 12:17:29
EDIT ACCESS PATH DETAILS SYNGXMMDL
File name . . . . . . . . : Customer Attribute . : REF
Access path name. . . . . : Customer by Name Type. . . . : RSQ
Unique key. . . . . . . . : (Y, blank)
or Duplicate sequence . . : F (F-FIFJ, L-LIFJ,
Maintenance . . . . . . . : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :
Allow select/omit . . . . : (S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, E-EXP, S-SQL, X-UNX)
Source member name . . : UUABREL2
Source member text . . : Customer Customer by Name
Format Format text Associated
. Seq name (Based on file) Retrieval access path
1 FABREAJ Customer Retrieval index
SEL: Z-Acp.entries, R-Acp.relations, S-Select/omit sets, A-Associated Acps.
F3=Exit F8=Rename F20=Narrative
:ilding A..ess !ats
Adding an A..ess !at
Lovit Tyagi and Deepika Gulati
42
Jp: SYNGXM QPADEV0007 11/02/98 12:19:24
EDIT ACCESS PATH FJRMAT ENTRIES SYNGXMMDL
File name . . . . . . . . : Customer Attribute . : REF
Access path name. . . . . : Customer by Name Type. . . . : RSQ
Format text . . . . . . . : Customer
Based on. . . . . . . . . : Customer Format No . : 1
GEN Key Altcol Ref
. Field Name Type no. Dsc seq cnt
Customer Code CDE ABCD K 1 1
Customer Name TXT ABTX A 1
Customer Address 1 TXT ACTX A 1
Customer Address 2 TXT ADTX A 1
Customer Address 3 TXT AETX A 1
Customer Credit Limit VAL AAVA A 1
Customer Limit Used VAL ABVA A 1
SEL: Z-Field details.
F3=Exit F7=Relations
:ilding A..ess !ats
Adding an A..ess !at
Lovit Tyagi and Deepika Gulati
43
FUNCTION
Lovit Tyagi and Deepika Gulati
44
uiIding A55Iications
Advantage:2E Functions
Advantage:2E f:n.tion is a p7o.ess tat ope7ates on files & fields
Advantage:2E F:n.tions .an be linked to .7eate la7ge7 p7o.esses
tat be.ome te b:ilding blo.ks of an appli.ation
Seve7al Advantage:2E f:n.tions may be implemented in a single
mplementation of F:n.tions
HLL p7og7am
Advantage:2E Iunctions are implemented in two ways
Exte7nal - the Iunction is implemented as a separate HLL program
nte7nal - the Iunction is implemented as source code inside the
calling Iunction
Lovit Tyagi and Deepika Gulati
45
uiIding A55Iications
Advantage:2E Function T5es
4 Advantage:2E f:n.tions types
Standard Functions
Built-In Functions
Functions Fields
Message Functions
Standa7d f:n.tions
speciIy the entire programs or subroutines
User-deIined processing can be speciIied
Provide building blocks oI an application
Divided into 3 categories
Database Functions
Device Functions
User Functions
Lovit Tyagi and Deepika Gulati
46
:ilt-in F:n.tions
Execute Iunctions like arithmetic operations, string manipulation, control operations like
commitment control & program exit.
SpeciIied within action diagrams
Implemented as in-line source code within calling Iunctions
The Built-in Iunctions are
1) Add 2) Commit
3) Compute 4) CONCAT -Concatenation
5) CVTVAR - Convert Variable
6) DIV - Divide 7) DIV WITH REMAINDER
8) Exit Program 9) Modulo
10) Move 11) Move All
12) MULT - Multiply 13) Quit
14) RTVCND - Retrieve Condition
15) Rollback 16) Set Cursor
17) Substring 18) SUB - Subtract
uiIding A55Iications
Advantage:2E Function T5es
Lovit Tyagi and Deepika Gulati
47
F:n.tion Fields
A Iield whose value is not physically stored in the database
Derived Irom other Iields or Iiles
One result parameter - the derived Iield
Variable number oI input parameters used to derive the value
Advantage:2E provides ready-made Iunction Iields
1) SUM - Sum 2) MAX - Maximum 3) MIN - Minimum
4) CNT - Count 5) DRV - Derived 6) USR User
uiIding A55Iications
Advantage:2E Function T5es
Lovit Tyagi and Deepika Gulati
48
uiIding A55Iications
Advantage:2E Function T5es
Message F:n.tions
DeIine workstation messages
Implemented using OS/400 message descriptions
Sent by a call to a CL subroutine
Can make direct reIerences to Iields in the data model
The Message Iunctions are
1) SNDERRMSG - Send Error Message
2) SNDINFMSG - Send InIormation Message
3) SNDCMPMSG - Send Complete Message
4) SNDSTSMSG - Send Status Message
5) RTVMSG - Retrieve Message
6) EXCMSG - Execute Message
Lovit Tyagi and Deepika Gulati
49
uiIding A55Iications
Standard Functions
Database F:n.tions
Basic routines Ior accessing the database
There are 4 database Iunctions
1) CRTOBJ - Create Obiect
2) CHGOBJ - Change Obiect
3) DLTOBJ - Delete Obiect
4) RTVOBJ - Retrieve Obiect
Devi.e F:n.tions
Used in interactive & report programs
Consist oI panel/report design & action diagram
All device Iunctions are external Iunctions except Ior PRTOBJ Iunction
Implemented as programs that operate over databases
Lovit Tyagi and Deepika Gulati
50
uiIding A55Iications
Standard Functions
Device Functions (contd.)
The Device Functions are
1) DSPRCD - Display Record
2) DSPRCD2 - Display Record 2 panels
3) DSPRCD3 - Display Record 3 panels
4) PMTRCD - Prompt Record
5) EDTRCD - Edit Record
6) EDTRCD2 - Edit Record 2 panels
7) EDTRCD3 - Edit Record 3 panels
8) DSPFIL - Display File
9) EDTFIL - Edit File
10) SELRCD - Select Record
11) DSPTRN - Display Transaction
12) EDTTRN - Edit Transaction
13) PRTFIL - Print File
14) PRTOBJ - Print Obiect
Lovit Tyagi and Deepika Gulati
51
uiIding A55Iications
Standard Functions
Use7 F:n.tions
Means oI incorporating user programs or subroutines into
Advantage:2E generated applications
Processing steps can be speciIied with action diagrams or user-
written HLL
Implemented as inline code (internal Iunctions) or call to programs
(external Iunctions)
The User Functions are
1) EXCINTFUN - Execute Internal Function
2) EXCEXTFUN - Execute External Function
3) EXCUSRPGM - Execute User Program
4) EXCUSRSRC - Execute User Source
Lovit Tyagi and Deepika Gulati
52
uiIding A55Iications
asic Function Pro5erties
F:n.tion Name
up to 25 characters long including embedded blanks & must be
unique within a Iile
F:n.tion Components
F:n.tion options
allow the user to customize Iunction Features like Database
changes, display Ieatures, exit control, commitment control,
exception routines, generation options & environment options
F:n.tion !a7amete7s
speciIy the input and output parameters. Parameters are also used
to deIine local variables Ior the Iunction
Devi.e Designs
speciIy the visual presentation oI the 2 types oI devices used by
Iunctions: Panels & Reports
Lovit Tyagi and Deepika Gulati
53
uiIding A55Iications
asic Function Pro5erties
F:n.tion Components(.ntd.)
A.tion Diag7ams
speciIy the processing steps Ior Iunction logic. This is a
combination oI deIault Advantage:2E supplied and optional user
deIined processing logic
F:n.tions & A..ess pats
Functions operating on a Iile are always attached to it by an access path
Functions can access many Iiles with access paths based on several
Iiles
A generated program can be made up oI several Iunctions each
accessing a diIIerent access path
DeIault panel/report Iormats are derived Irom the Iunction`s access path
Lovit Tyagi and Deepika Gulati
54
uiIding A55Iications
Defining Functions
Accessing Functions
Display All F:n.tions panel
select option Irom the $ervices Menu
Display File F:n.tions panel
option F on a Iile in Edit Database Relations panel
Shipped Files Fields
Advantage:2E shipped Iiles contain the deIault data like built-in
Iunctions, messages etc.
Type in the Obiect Iield & DFN in relations Iield oI Edit Database
Relations panel to access
Lovit Tyagi and Deepika Gulati
55
Jp: SYNTHS QPADEV0004 18/02/98 13:52:40
DISPLAY ALL FUNCTIJNS SYNSXT
Application area. : Source library: SYNSXTGEN
. File Function Type GEN name
Commodity Change Commodity CHGJBJ N/A
Commodity Create Commodity CRTJBJ N/A
Commodity Delete Commodity DLTJBJ N/A
Commodity Edit Commodity EDTFIL SXACEFR
Commodity Select Commodity SELRCD SXABSRR
Commodity Price Change Commodity Price CHGJBJ N/A
Commodity Price Create Commodity Price CRTJBJ N/A
Commodity Price Delete Commodity Price DLTJBJ N/A
Commodity Price Edit Commodity Price EDTFIL SXAEEFR
Commodity Price Select Commodity Price SELRCD SXADSRR
SEL: Z-Dtls, P-Parms, N-Narr., F-Action diagram, S-Device Design, T-Structure,
A-Acp, G/J-Gen, E-STRSEU(pgm), L-Locks, D-Delete, U-Where used, 3-Doc.
F3=Exit F5=Reload
uiIding A55Iications
Defining Functions
Lovit Tyagi and Deepika Gulati
56
Jp: SYNTHS QPADEV0004 18/02/98 13:48:09
EDIT FUNCTIJNS SYNSXT
File name. . . : Commodity 1ST LEVEL
. Function Function type Access path
Change Commodity Change object Update index
Create Commodity Create object Update index
Delete Commodity Delete object Update index
Edit Commodity Edit file Retrieval index
Select Commodity Select record Retrieval index
+
SEL: Z-Details, P-Parameters, F-Action diagram, S-Device design, N-Narrative,
T-Structure, A-Access path, U-Usage, G/J-Generate, D-Delete, C-Copy, L-Lock.
F3=Exit F5=Reload F7=File details F9=Add F17=Services
uiIding A55Iications
Defining Functions
Lovit Tyagi and Deepika Gulati
57
DSNR SYNSXT Jp: SYNTHS QPADEV0004 18/02/98 13:40:46
EDIT DATABASE RELATIJNS SYNSXT
= Rel lvl: DFN
. Typ Jbject Relation Seq Typ Referenced object
FIL Arrays Defined as FIL Arrays
FIL Built in functions Defined as FIL Built in functions
FIL Configuration Table Defined as FIL Configuration Table
FIL Distributed File Defined as FIL Distributed File
FIL External Data Access API Defined as FIL External Data Access API
FIL Field attribute types Defined as FIL Field attribute types
FIL Job data Defined as FIL Job data
FIL Messages Defined as FIL Messages
FIL Program data Defined as FIL Program data
FIL Standard header/footer Defined as FIL Standard header/footer
FIL Advantage:2E reserved pgm data Defined as FIL Advantage:2E reserved pgm data
FIL Audit Information Defined as FIL Audit Information
FIL Commodity Defined as FIL Commodity
FIL Commodity Price Defined as FIL Commodity Price
FIL Company Defined as FIL Company
+
SEL: Z(n)-Details, N(n)-Narr, S(n)-Select, E(n)-Entries, V-Virt.fields, F-Funcs
F3=Exit F5=Reload F7=Fields F9=Insert F10=Define obj. F17=Services
uiIding A55Iications
Defining Functions
Lovit Tyagi and Deepika Gulati
58
uiIding A55Iications
Database Functions
Wat a7e Database f:n.tions?
means oI perIorming actions on database
deIined as HLL subroutine
Database Iunctions
1) CRTOBJ - routine to add a record to a Iile.
2) CHGOBJ - routine to update a record.
3) DLTOBJ - routine to delete a record.
4) RTVOBJ - routine to retrieve one or more records.
DeIault versions oI CRT, CHG and DLT database Iunctions are created
Ior all REF & CPT Iiles.
RTVOBJ must be created iI needed.
Additional processing beIore and aIter database access may be
speciIied in the action diagram
Lovit Tyagi and Deepika Gulati
59
Function Pur5ose Access Pat
CRTOBJ
CHGOBJ
DLTOBJ
Add a single record
Update a single record
Delete a single record
UPD
UPD
UPD
RTVOBJ Read a record or record(s) RTV, RSQ
uiIding A55Iications
Database Functions
Lovit Tyagi and Deepika Gulati
60
uiIding A55Iications
Device Functions
Wat a7e Devi.e F:n.tions?
Interactive panels or reports
Panel device Iunctions Ior interactive user interIace between end
user and application
Report device Iunctions Ior written presentation oI data
All device Iunctions except PRTOBJ Iunction are implemented as
external Iunctions
Can be accessed Irom Edit unctions, Edit All unctions, Edit
unction Devices, or the Displav All unctions panels
Single record device Iunctions
Prompt Record (PMTRCD)
deIines a program to prompt Ior a list oI Iields deIined by a
speciIied access path
validated values can be passed to another Iunction
Lovit Tyagi and Deepika Gulati
61
Display #e.o7d (DS!#CD)
deIines a program to display a single record Irom a speciIied database
Iile
II no key is speciIied, a key panel prompts Ior a key
Display Record 2 panels (DSPRCD2)
Display Record 3 panels (DSPRCD3)
Edit Record (EDTRCD)
deIines a program to maintain (add, change or delete) records one at a
time.
II no key is speciIied, a key panel prompts Ior a key.
Edit Record 2 panels (EDTRCD2)
Edit Record 3 panels (EDTRCD3)
uiIding A55Iications
Device Functions
Lovit Tyagi and Deepika Gulati
62
M:ltiple 7e.o7d devi.e f:n.tions
Display File (DS!FL)
deIines a program to display the records in a Iile many at a time,
using a subIile
the subIile is loaded one page at a time when the user presses
ROLLUP/F8
Edit File (ED%FL)
deIines a program to maintain the records in a Iile many at a
time, using a subIile
the subIile is loaded one page at a time when the user presses
ROLLUP/F8.
Sele.t #e.o7d (SEL#CD)
deIines a program to display the records in a Iile many at a time,
using a subIile
uiIding A55Iications
Device Functions
Lovit Tyagi and Deepika Gulati
63
Sele.t #e.o7d (.ont.)
allows the user to select one record which is returned to
the calling program
called Irom a Iunction that requests a selection list.
Wat a7e Use7 F:n.tions?
means oI implementing additional user processing within an
existing Iunction or as an independent implementation along with
an existing Iunction
e.g. batch Iunctions Ior updating database having no associated
device or a user-written HLL program which has to be integrated
to Advantage:2E generated application
uiIding A55Iications
Device Functions
Lovit Tyagi and Deepika Gulati
64
Wat a7e Message F:n.tions?
means oI deIining messages oI various types, speciIying diIIerent
message Iiles Ior the message, speciIying substitution variables
and changing message identiIiers
can be accessed by looking at Iunctions oI *MESSAGES Iile
6 Message Functions
Send Error Message (SNDERRMSG)
error message to be sent to a calling Iunction
used Ior diagnostic messages arising Irom user validation
Send InIormation Message (SNDINFMSG)
inIormation message be sent to the message queue oI the calling
program
Send Completion Message (SNDCMPMSG)
uiIding A55Iications
Message Functions
Lovit Tyagi and Deepika Gulati
65
6 Message Functions
Send Status Message (SNDSTSMSG)
Retrieve Message (RTVMSG)
Execute Message (EXCMSG)
Wat a7e F:n.tion Fields?
Special types oI Iields that can be used in device designs and
action diagrams
based on other Iields
processing can be speciIied Ior a Iunction Iield
uiIding A55Iications
Message Functions
Lovit Tyagi and Deepika Gulati
66
Wat a7e F:n.tion Options?
Function options control the Ieatures oI Iunctions
Function Options Ior
Database Changes
Display Features
Exit Control
Commitment Control
Exception Routine
Generation
Environment
Database Canges F:n.tion options
determine iI program allows add, change or delete capabilities or a
combination
uiIding A55Iications
Function O5tions
Lovit Tyagi and Deepika Gulati
67
Display Feat:7es F:n.tion options
ConIirmation - Iunction prompts Ior conIirmation
Initial value Ior ConIirmation
Standard Header/Footer selection
SubIile Selection Column
Dynamic Program Mode - Iunction determines initial mode oI execution
Exit aIter Add - Ior EDTRCD Iunctions
Repeat Prompt - whether prompt (PMTRCD) to be redisplayed
aIter user processing
Bypass Key Screen - whether key screen to be displayed beIore
displaying detail screen
Post ConIirm Pass - to re-read database Iile and update subIile
aIter conIirmation
Send All Messages - whether message subIile at bottom oI panel
Ior Iirst or all errors
uiIding A55Iications
Function O5tions
Lovit Tyagi and Deepika Gulati
68
What are Function Parameters?
SpeciIies the Iields passed between Iunctions
Basic properties oI Iunction parameters
Name
Usage Type
Input only, Output only, Both, Neither
Flag Error Status
speciIies error in the called Iunction
allowed in SNDERRMSG, EXCMSG or any external Iunction
Neither Parameters
No value passed or returned Ior a parameter
Neither parameters are available Ior use as local
variables within the Iunction
uiIding A55Iications
Function Parameters
Lovit Tyagi and Deepika Gulati
69
DeIault parameters oI Iunctions
F:n.tion Defa:lt pa7amete7s Usage
CHGOBJ All Iields oI Update index I
CRTOBJ All Iields oI Update index I
DLTOBJ Key Iields oI Update index I
RTVOBJ Key Iields oI attached acc. path I
SELRCD Key Iields oI Update index B
Return Code Parameter
InIorms the calling program oI the state under which called program was exited
All Iunctions except EXCUSRPGM & EXCUSRSRC have implicit return code
parameter as Iirst parameter
The values oI Return Code parameter are
*DBF error; *Normal; *Record already exists;
*Record does not exist; *Substring error;
*User Quit requested
uiIding A55Iications
Function Parameters
Lovit Tyagi and Deepika Gulati
70
Parameter Roles
SpeciIies the use oI parameter in Iunction
Following are the parameter roles
Map !a7amete7 - the parameter is added automatically to the
corresponding Iield on the receiving Iunction`s panel design.
Map Neither parameter adds Iield to panel design without
passing a value
#est7i.to7 !a7amete7 - the parameter restricts the updation oI
Iield by making it input only Iield
!ositione7 !a7amete7 - the parameter is used to position a
Iunction to start reading records Irom a particular record
'a7y !a7amete7 - the parameter can have a varying length.
UseIul Ior interIacing with user-written Iunctions
uiIding A55Iications
Function Parameters
Lovit Tyagi and Deepika Gulati
71
DeIining Function Parameters
in the Edit unctions panel, type ! next to the selected Iunction
speciIy a Iield or a set oI Iields in Edit unction Parameters panel
Type Ior a parameter to speciIy Role/Usage through Edit
unction Parameter Details panel
uiIding A55Iications
Function Parameters
Lovit Tyagi and Deepika Gulati
72
uiIding A55Iications
Function Parameters
Jp: SYNTHS QPADEV0007 19/02/98 10:38:58
EDIT FUNCTIJN PARAMETERS SYNSXT
Function name. . : Delete Commodity Type : Delete object
Received by file : Commodity Acpth: Update index
Passed
. File/FIELD Access path/Field as Seq
Commodity Update index KEY
|
Values
FLD: Jne parameter per field
RCD: Jne parameter for all fields
KEY: Jne parameter for key fields only
SEL: Z-Details (field selection).
F3=Exit F5=Reload
Lovit Tyagi and Deepika Gulati
73
uiIding A55Iications
Function Parameters
Jp: SYNTHS QPADEV0007 19/02/98 10:40:20
EDIT FUNCTIJN PARAMETER DETAILS SYNSXT
Function name. . : Delete Commodity Type : Delete object
Received by file : Commodity Acpth: Update index
Parameter (file) : Commodity Passed as: KEY
. Field Usage Role
Commodity Code I
SEL: Usage: I-Input, J-Jutput, B-Both, N-Neither, D-Drop.
Role: R-Restrict, M-Map, V-Vary length, P-Position.
F3=Exit
Lovit Tyagi and Deepika Gulati
74
uiIding A55Iications
Device Designs
What are Device Designs?
SpeciIies the layouts oI Iields and constants on the panels or report
designs Ior a Iunction
Basic properties oI Device Designs
Device Design Standard
depends on the Iunction type and associated standard
header/Iooter Iunctions
Device Design Format
Formats are created Irom the Iields oI the based-on access path
and their associated text
Device Design Field
Iields come Irom access path, Iunction parameters and
Header/Footer
Lovit Tyagi and Deepika Gulati
75
uiIding A55Iications
Device Designs
Editing Device Design
in the Edit unctions panel, type S next to the selected Iunction to display the
device design
use Iunction keys to edit the device design
F1 moves the Iield 40 columns
F3 exits the panel
F4 move the Iield 40 columns to the right
F5 edits device Iormat details
F6 cancels the pending operations
F7 displays Edit Device Design Format Relations
F8 moves the selected Iield to the cursor position
F9 wraps text onto next line
F10 moves text one column to the right
F11 removes the line
F12 aligns text below cursor position
Lovit Tyagi and Deepika Gulati
76
uiIding A55Iications
Device Designs
Editing Device Design
use Iunction keys to edit the device design
F13 Iast exits the panel
F15 moves panel window to leIt margin
F16 moves window to right margin
F17 displays a list oI device Iormats
F18 displays the Edit Field Attributes panel
F19 adds new Iunction Iield to the device
F20 edits Iunction Iield on the device
F21 adds a line above cursor
F22 moves text one column to the leIt
F23 adds constant Iield to the device design
F24 aligns all Iields under the cursor position
Lovit Tyagi and Deepika Gulati
77
Advantage :2E Training
ACTION DIAGRAMS
Lovit Tyagi and Deepika Gulati
78
uiIding A55Iications
Action Diagrams
What are Action Diagrams?
Action Diagrams record the basic constructs that make up a
procedure
the procedural steps encompass a list oI actions like call to another
Iunction or a low-level built-in Iunction
Displaying Action Diagram oI a Iunction
Type F next to the selected Iunction in the Edit unctions panel
Lovit Tyagi and Deepika Gulati
79
uiIding A55Iications
Action Diagrams
EDIT ACTIJN DIAGRAM Edit SYNSXT Commodity
FIND= Edit Commodity
Edit Commodity
.--
. ...Initialize <--
. .=REPEAT WHILE
. |-ALWAYS
. | ...Load first subfile page <--
. | PGM.Reload subfile = CND.NJ
. | Conduct screen conversation
. | .=REPEAT WHILE
. | |-PGM.Reload subfile is NJ
. | | Display screen
. | | ...Process response <--
. | '-ENDWHILE
. '-ENDWHILE
. ...Closedown <--
'--
F3=Exit F5=User points F6=Cancel pending moves F7=Forward F8=Backward
F9=Edit parameters F15=Jpen Functions F16=Toggle Change Date F24=More keys
Lovit Tyagi and Deepika Gulati
80
uiIding A55Iications
Action Diagrams
Use7 !oints
Advantage:2E/2 Iunctions except EXCUSRSRC & EXCUSRPGM
have deIault action diagram
some portions oI deIault action diagrams which depict essential
processing are not alterable
areas which can be modiIied and where business logic can be
entered are called User Points
Press F5 on the action diagram to display user points Ior the Iunction
Lovit Tyagi and Deepika Gulati
81
uiIding A55Iications
Action Diagrams
EDIT ACTIJN DIAGRAM Edit SYNSXT Commodity
FIND= Edit Commodity
..............................................................
Edit : ACTIJN DIAGRAM EXIT PJINTS F3=Exit SEL:X,Z-Select. :
.-- : USER: Initialize program :
. ...I : USER: Initialize subfile header : <--
. .=RE : USER: Initialize subfile record (existing record) :
. |-A : USER: Initialize subfile record (new record) :
. | .. : CALC: Subfile control function fields : <--
. | PG : USER: Validate subfile control :
. | : USER: Validate subfile record fields :
. | .= : CALC: Subfile record function fields :
. | |- : USER: Validate subfile record relations + :
. | | :............................................................:
. | | ...Process response <--
. | '-ENDWHILE
. '-ENDWHILE
. ...Closedown <--
'--
F3=Exit F5=User points F6=Cancel pending moves F7=Forward F8=Backward
F9=Edit parameters F15=Jpen Functions F16=Toggle Change Date F24=More keys
Lovit Tyagi and Deepika Gulati
82
A.tion Diag7am Const7:.ts
Seq:ential - speciIy a list oI actions or other constructs that are
executed in a sequential order. Denoted by brackets enclosing dotted
lines
Conditional - actions are conditionally executed and are called CASE
blocks. Denoted by CASE and ENDCASE statements
te7ative - represents repetitive logic. Denoted by REPEAT WHILE
and ENDWHILE statements
Context
instances oI a Iield that are available Ior use at a particular processing
step
Database Contexts - instances oI same database Iield available in
more than one Iile
Devi.e Contexts - instances oI same device Iield available in more
than one Iormat
uiIding A55Iications
Action Diagrams
Lovit Tyagi and Deepika Gulati
83
uiIding A55Iications
Action Diagrams
Context(.ntd.)
Lite7al Contexts - instances oI Iield available Irom literals like
condition etc.
System Contexts - instances oI Iields available Irom various system
values
F:n.tion Contexts - instances oI Iield available Irom Iunction
attributes like parameter
Database Contexts
D1 - Iields are in the Iirst or the only Iormat oI the based-on access
path
D2 - Iields are Irom second Iormat oI the based on access path e.g. in
SPN access path
Lovit Tyagi and Deepika Gulati
84
uiIding A55Iications
Action Diagrams
Devi.e Contexts
EY - Iields are Irom the key panel display in case oI EDTRCD or
DSPRCD Iunctions
D%L - Iields are Irom the Iirst panel oI EDTRCDn or DSPRCDn
Iunctions
2ND - Iields are Irom the second panel oI EDTRCDn or DSPRCDn
Iunctions
3#D - Iields are Irom the third panel oI EDTRCDn or DSPRCDn
Iunctions
Devi.e Contexts
C%L - Iields are Irom the subIile control record Iormat
#CD - Iields are Irom the subIile record Iormat
CU# - Iields are Irom the current report Iormat in PRTOBJ and
PRTFIL Iunctions
NX% - Iields are Irom the next active report Iormat in PRTOBJ and
PRTFIL Iunctions
Lovit Tyagi and Deepika Gulati
85
uiIding A55Iications
Action Diagrams
Lite7al Contexts
CND - particular Iield condition is speciIied as a value
CON - constant context contains a literal value Ior non-status type
Iields
System Contexts
1O - contains system Iields having execution time inIormation oI the
iob e.g. *USER, *JOB
!GM - contains system Iields that control the execution like *Program
Mode, *Return Code
F:n.tion Contexts
!A# - parameter Iields as Iield values
W# - program variables not declared as any context as Iield values
e.g. any Iield in data dictionary
Lovit Tyagi and Deepika Gulati
86
AF
Calling Use7 Defined F:n.tions
Calling :ilt-n F:n.tions
So7t.:ts to Some :ilt-n F:n.tions
(A.E."..+.-..A)Fnse7t a.tion
uiIding A55Iications
CaIIing Functions
Lovit Tyagi and Deepika Gulati
87
uiIding A55Iications
Action Diagrams
Action Diagram Editor
Line Commands
Activate/Inactivate construct (Comment out)
Place block Activate/Inactivate boundary
A Place copied or moved construct after this line
B Place copied or moved construct before this line
C Copy construct to a point indicated by 'A' or 'B'
CC Place block Copy boundary
D Delete this construct
DD Place block Delete boundary
F Edit action or condition details for line
FF Edit action parameters
H Hide construct
I+ Insert ADD built-in function
I+F Insert and Prompt ADD built-in function
I Insert Comment
IF Insert and Prompt Comment
Lovit Tyagi and Deepika Gulati
88
uiIding A55Iications
Action Diagrams
Action Diagram Editor
Line Commands
I- Insert SUB built-in function
I-F Insert and Prompt SUB built-in function
I= Insert MJVE built-in function
I=A Insert and Prompt MJVE ALL built in function
I=F Insert and Prompt MJVE built-in fucntion
IA Insert Action
IAF Insert and prompt Action
IC Insert Case condition
ICF Insert and Prompt Case condition
II Insert Iteration
IIF Insert and Prompt Iteration
IM Insert Message function
IMF Insert and Prompt Message function
IJ Insert JTHERWISE condition
IJF Insert and prompt JTHERWISE condition
Lovit Tyagi and Deepika Gulati
89
uiIding A55Iications
Action Diagrams
Action Diagram Editor
Line Commands
IS Insert Sequence
ISF Insert and Prompt Sequence
IX Insert New condition within Case
IXF Insert and Prompt New condition within Case
M Move construct to a point indicated by 'A' or 'B'
MM Place block Move boundary
NA Copy to notepad & append to contents of notepad
NAA Place block notepad append boundary
NI Insert entire contents of notepad after this line
NR Copy to notepad & replace contents of notepad
NRR Place block notepad replace boundary
S Show construct
T Return to top level of action diagram
U Unzoom out of construct to previous construct
Z Zoom into construct

Você também pode gostar