Presentation is loading. Please wait.

Presentation is loading. Please wait.

Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce.

Similar presentations


Presentation on theme: "Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce."— Presentation transcript:

1 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce

2 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech.

3 The Browser is the Trend  It’s a well known interface.  Displays graphics along with data.  It should be used ONLY as an Interface. No processing here !!!  No extra program to install on the client.

4 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Old Practices (Bad)  Primary Input File programs  One program has the Screen and all the processing  One program has processing and reports all together  Internal printer files and even Internal File descriptions.  All of the above

5 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Newer Practices  Encapsulation of File Services by service programs.  One program handles the input from the user (Interface) to get parameters and then calls another process with the “perfect” parameters.  A program is called with parameters to process the request.  A program generates a report: The simpler the better.

6 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Database Concentric Methodology The Data base is only accessed by its services Processes access data by using the Services

7 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Database Services  Service Programs are used to provide the DB services.  Programs can also be part of providing DB services. For example a program might use procedures from several service programs.  Programs use data from the file ONLY by using the services

8 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Database Services  Add record  Delete record  Updates... (whole record or specific fields)  Gets... (whole record or specific fields)  ReadNext (for loops, different sorts, selections)

9 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Think DB Concentric Old Program Customer File, Sales History, display file and printer file are described in D specs Display screen and interface with user to get input. Loop through all the customers in the customer master file until EOF is reached. Per each customer Loop through sales history starting a year ago accumulating sales until no more sales are found for this customer. Per customer calculates margins and write to the to printer file. Accumulates totals. Report is generated. New Program One program obtains input from the user. Another program process the request to print report. These pgms use the service program that has the Customer file and Sales History. Include Binding Directory where services were added Use Read-next procedure to loop through file customer. Use a Service Program to get YTD sales margin per customer. Report gets generated Example: report YTD sales margin per customer

10 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Coding Techniques  Service Programs  Free Form  Binding Source  Binding Directories  Use other languages with RPG- ILE

11 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Service Program Contains the code that implements the functions or procedures. Use a copy book with the program interface. Defines global variables. Has the file definition. Only the primary file should be set to update and add. Any other files (logicals) are defined as Input Only. Use with Binding Sources to avoid unnecessary recompilation due to signature changes.

12 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Can I reuse this process? YES. Reuse it by getting that functionality into a separate program. If you have a group of programs that have similar functions then put them together in a Service program (encapsulation). For example, all the date routines can reside in one service program.

13 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. NO PLIST - Prototype (‘I’) To avoid the use of PLISTs in your programs you should create Interface sources. Advantages of having Prototypes:  Parameters are matched at compilation time instead of at run time.  Parameters exist as Input Only (value and constant).  Easier to call programs passing constants if the parameters are input only.

14 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. NO more KLIST Removing KLIST from the programs can be a great advantage because variables are viewed on the same line. (This is part of Free-Form code.) chain myklist99 WX00010TR; chain(Icompany:Iwarehouse:Iorder: Iordergen:Iparentorder) WX00010TR;

15 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. GUI ready?  When screens and logic are separated, then the green screen can be easily replaced by creating a GUI Interface.  New programs don’t have to be re- written for your new GUI Interface applications. Reuse your existing Programs.

16 Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Start NOW !!! Adopt this Methodology Thank you !!!


Download ppt "Be “GUI ready” developing in RPG by Robert Arce from PrismaTech. Be “GUI ready” developing in RPG-ILE Presented by: Robert Arce."

Similar presentations


Ads by Google