Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. RPG-ILE Maximum Speed New Development Approach...
-
Upload
ralph-doyle -
Category
Documents
-
view
221 -
download
5
Transcript of Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. RPG-ILE Maximum Speed New Development Approach...
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
RPG-ILE Maximum SpeedRPG-ILE Maximum SpeedNew Development ApproachNew Development Approach
Presented by:
Robert Arce
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
File driven ServicesFile driven Services
File (physical and logicals)
Services (I, V, B, U) WX00010B WX00010I WX00010U WX00010V
Programs use data from the file ONLY by using the services
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Naming ConventionsNaming Conventions
XX = Identifies the application Id. For instance: OE
nnnnn = consecutive number of 5 positions
Z = type of object
XXnnnnnZ objects
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Naming ConventionsNaming Conventions
Files ‘M’=Master File ‘T’ =Transaction File ‘W’=Work File ‘F’ =Report Format File ‘D’=Display File ‘A’=Audit Trail Logical=suffix L and a
consecutive character (1..9 or A..Z)
Other: ‘DA’=Data Area ‘DQ’=Data Queue
Z = Object TypePrograms ‘R’=RPG ‘C’=CL ‘V’=Service Program ‘I’=Procedure Prototype
Interface Definition (copy) ‘B’=Binding source ‘U’=Unit test program ‘P’ = C or C++ Processes ‘Q’=Query ‘S’=SQL program
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
File ServicesFile Services
Add record Delete record Updates ... (specific fields) Gets ... (specific fields) ReadNext (for loops, different sorts,
selections)
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Binding SourceBinding Source
Helps to manage signatures avoiding having to recompile every program that uses a service when adding more procedures or function to existing service program, changing code.
If parameters or function names are modified you will have to recompile every program that uses the modified service program.
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Binding SourceBinding Source
STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES) EXPORT SYMBOL(AddPickLine) EXPORT SYMBOL(DltPickLine) EXPORT SYMBOL(UpdOvrPickQty)ENDPGMEXP ---------------------------------------
STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES) EXPORT SYMBOL(AddPickLine)ENDPGMEXP
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
PrototypePrototype
Describes the interface of the service programs and it is use as a copy book in every program that needs to use the service program.
Compiler uses it to verify that all the parameters match the actual definition of the service (prototype vs procedure interface).
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Service ProgramService ProgramContains the code that implements the functions or
procedures.Uses the ‘I” source as the copy book.Defines global variables.Has the file definition. Only the primary file is set to
update and add. Any other files (logicals) are defined as Input only.
Describes how to create the object by using the Binding source.
Implements the function and procedures. Defines the Procedure Interface.
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Binding DirectoryBinding Directory
A good convention is to create one binding directory per subsystem.
For instance: OEBNDDIR (Order Entry binding directory)
Binding directories should be included in the H form as the compiler directory. For instance:
H DftActGrp(*NO) ActGrp(*NEW) BndDir(‘OEBNDDIR':‘ARBNDDIR')
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Unit ProgramUnit Program
Program created to test the services within the service program.
Uses the ‘I’ source as the copy book.
Is very handy when changes are made to the service program or to place test data.
As a convention all the services need to be call by using a case statement and a subroutine per each procedure or function.
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
NO PLIST - Prototype (‘I’)NO PLIST - Prototype (‘I’)
To avoid using use of PLIST’s in programs you need to create an Interface source.
Advantages: Parameters are match at compilation time instead of
at run time. Actual input parameters (value and constant). Easier to call programs passing constants if the
parameters are input only.
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Program Interface (How)Program Interface (How)*Object : WX00001I*Created by : Robert Arce(PrismaTech,Inc.)
*Description: Procedure prototype for WX00001R
program.*------------------------------------- *Modification Log * *------------------------------------DWX00001R pr ExtPgm('WX00001R') * Procedure: WX00001R * Overview : Transfer a load * Input : * Returns : returns the error codeD Iwarehouse 2a constD Oactiveflag 1a
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
NO more KLISTNO more KLIST
Not having klist in the program can be a great advantage since the variables can be seen right there on the line. Of course this is part of Free-Form code.
chain myklist99 WX00010TR;
chain(Icompany:Iwarehouse:Iorder:
Iordergen:Iparentorder) WX00010TR;
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
Start NOW !!!Start NOW !!!Adopt a conventionAdopt a convention
and write file driven services.and write file driven services.
Thank you !!!