Download presentation
Presentation is loading. Please wait.
Published byRalph Doyle Modified over 9 years ago
1
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. RPG-ILE Maximum Speed New Development Approach Presented by: Robert Arce
2
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.
3
File 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
4
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Naming Conventions XX = Identifies the application Id. For instance: OE nnnnn = consecutive number of 5 positions Z = type of object XXnnnnnZ objects
5
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Naming 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 = O bject Type Programs ‘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
6
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. File Services Add record Delete record Updates... (specific fields) Gets... (specific fields) ReadNext (for loops, different sorts, selections)
7
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Binding 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.
8
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Binding 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
9
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Prototype 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).
10
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Service Program Contains 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.
11
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Binding 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')
12
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Unit 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.
13
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. 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.
14
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. 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 code D Iwarehouse 2a const D Oactiveflag 1a
15
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. NO 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;
16
Rpg-ILE Maximum Speed by Robert Arce from PrismaTech. Start NOW !!! Adopt a convention and write file driven services. Thank you !!!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.