Rpg ile maximum speed new development approach
This presentation is the property of its rightful owner.
Sponsored Links
1 / 16

RPG-ILE Maximum Speed New Development Approach PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on
  • Presentation posted in: General

RPG-ILE Maximum Speed New Development Approach. Presented by: Robert Arce. File (physical and logicals) Services (I, V, B, U) WX00010B WX00010I WX00010U WX00010V Programs use data from the file ONLY by using the services. File driven Services.

Download Presentation

RPG-ILE Maximum Speed New Development Approach

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Rpg ile maximum speed new development approach

RPG-ILE Maximum SpeedNew Development Approach

Presented by:

Robert Arce

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.


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

File driven Services

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

Naming Conventions

Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.


Naming conventions1

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 Type

Naming Conventions

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

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)

File Services

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.

Binding Source

Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.


Binding source1

STRPGMEXP PGMLVL(*CURRENT) LVLCHK(*YES)

EXPORT SYMBOL(AddPickLine)

EXPORT SYMBOL(DltPickLine)

EXPORT SYMBOL(UpdOvrPickQty)

ENDPGMEXP

---------------------------------------

STRPGMEXP PGMLVL(*PRV) LVLCHK(*YES)

EXPORT SYMBOL(AddPickLine)

ENDPGMEXP

Binding Source

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).

Prototype

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.

Service Program

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')

Binding Directory

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.

Unit Program

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.

NO PLIST - Prototype (‘I’)

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

Program Interface (How)

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;

NO more KLIST

Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.


Start now adopt a convention and write file driven services

Start NOW !!!Adopt a conventionand write file driven services.

Thank you !!!

Rpg-ILE Maximum Speed by Robert Arce from PrismaTech.


  • Login