1 / 15

ILE and RPG IV

ILE and RPG IV. Logicalis Briefing, 9 September 2005. An iSeries developer’s roadmap. Interface. Web service, e.g. for .Net coexistence. Green screen. Web browser. Transport. WebFacing and/or HATS. 5250. Presentation and navigation. Struts/JSF. Display file. Connectors.

khanh
Télécharger la présentation

ILE and RPG IV

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ILE and RPG IV Logicalis Briefing, 9 September 2005

  2. An iSeries developer’s roadmap Interface Web service, e.g. for .Net coexistence Green screen Web browser Transport WebFacing and/or HATS 5250 Presentation and navigation Struts/JSF Display file Connectors JDBC, MQ, etc. Application logic Session bean RPG or COBOL program Physical or logical file Embedded SQL Entity bean Interface to data store Database DB2/400

  3. Another view DDS Batch FTP, custom formats RPG III Native database access SEU/PDM/SDA Assured delivery messaging, message transformation, XML Separate presentation from logic (HTML/GUI) RPG IV Program-to-program calls ILE Remote Systems Explorer SQL Open standards component interaction Support, maintainability and reuse Change control and deployment techniques Performance Open standards Debugging WDSC J2EE IDE Java

  4. RPG IV and the Integrated Language Environment • RPG IV • Functionality • Syntax • Why ILE? • Flexibility • Performance • Ease-of-use

  5. RPG/IV Highlights • Specification layout changes (no L or E specs) • New D(efinition) spec • Expanded names - underscore allowed - 10 chars • Upper/lower case source equivalency • Free-form Maths & logical expressions • Date, Timestamp support • Pointer support • Most limits raised or removed • You have to convert - not source compatible • Migration process is straightforward (CVTRPGSRC)

  6. RPG/IV Examples • DQCUSTCDT C 'QCUSTCDT' • DPROCDS DS • D PTR1 * PROCPTR INZ(%PADDR(QCUSTCDT)) • D PROCS 1 1600* PROCPTR DIM(100) • DFILEDS DS • D FIL1 10A INZ(QCUSTCDT) • D FILES 1 1000A DIM(100) • DPROC S * PROCPTR • C FILE LOOKUP FILES(X) 50 • C MOVE *NULL PROC • C RETURN • If (A > 10 AND *IN02) • EVAL Salary = Salary * 1.25 • Endif • DOU CowsComHom = '1' • Exsr MovCows • Eval CowsComHom = (CowsInFld = 0 AND CowsEnRte = 0) • EndDo • IF NeedName • Eval(P) WholeName = FirstName + ' ' • + LastName + '.' • EndIf DName DS BASED(Ptr) D FirstName D Lastname DARRA S 10 DIM(10)

  7. ILE benefits • Original Program Model (OPM) • Single entry point • Single variable scope, no pointer support • One program = one compilation • Dynamic program-to-program calls with performance overhead • Integrated Language Environment (ILE) • Modular programming with good performance • No need for dynamic program-to-program calls • Mix programming languages without performance overhead • C, C++, COBOL, RPG, CL • Code re-use, multiple entry points • Nested variable scope, pointer support • Faster compilations

  8. ILE example PTSTSOCKET HOST(PACIFIC6) PORT(1352) If successful, a completion message will be returned Connection successfully obtained to PACIFIC6 on port 1352 Otherwise, an appropriate escape message will be returned Host CAT32 name resolved but no connection was possible on port 1352

  9. Program B Program A Program A subroutine calls another subroutine in same program: INTERNAL CALL Program C SUB1 SUB2 Program B calls Program C EXTERNAL CALL Invocation: dynamic (external) versus bound (internal)

  10. Module MOD1 RPGMOD1 Module MOD2 CBLMOD1 Module MOD3 Procedure CRTINVNBR Procedure DATEHANDLE Program INVMAST Structure of a simple ILE program • Programs • *PGM object. OPM via CRTxxxPGM, ILE via CRTPGM • *PGMs contain 1 or more modules • Modules • *MODULE object type • Contains translated but unexecutable code • Must be BOUND into a program to run • Input is a source member • May contain one or more procedures • Procedures • Executable code with entry point • Not an AS/400 object • RPG & Cobol: 1 per compilation, C: many per compilation • Appear on CALL stack

  11. Binding Module RPGMOD1 RPG SRCMBR RPGMOD1 Module RPGMOD1 CALLB CBLMOD2 CRTRPGMOD CRTPGM INVMAST MOD(RPGMOD1 + CBLMOD2 + CMOD3) Module CBLMOD2 Cobol SRCMBR CBLMOD2 Module CBLMOD2 • CALL LINK CMOD3 • PROC CRTINVNBR CRTCBLMOD Module CMOD3 Module CMOD3 C SRCMBR CMOD3 Procedure CRTINVNBR Procedure CRTINVNBR CRTCMOD Procedure DATEHANDLE Procedure DATEHANDLE Program INVMAST • Program INVMAST is statically bound by copy

  12. Service programs Module MODX RPG SRCMBR MODX Module MODX CRTRPGMOD CRTSRVPGM + SRV1 + MOD(MODX + MODY + CMOD3) Module MODY Cobol SRCMBR MODY Module MODY CRTCBLMOD Module CMOD3 Module CMOD3 C SRCMBR CMOD3 Procedure CRTINVNBR Procedure CRTINVNBR CRTCMOD Procedure DATEHANDLE Procedure DATEHANDLE *SRVPGM SRV1 • Service program is analogous to subroutine library or • DLL

  13. Activation groups ActGrp OE Menu OE1 OE2 OE3 OPM Pgm FILEX OPM Pgm OPM Pgm ActGrp INV INV1 INV2 INV3 FILEX Default Group

  14. Activation groups • Applications can be separated more cleanly at run time • Activation groups own resources such as ODPs, Commit Scope, exception handlers and SQL cursors but not Overrides • A default activation group created for OPM and IBM code • CRTPGM and CRTSRVPGM commands specify activation groups: • By name • *CALLER • *NEW • Requires some design thought, especially if exception handling is used and if OPM and ILE programs are mixed • Watch out for third party usage!

  15. Hints and tips • Don’t go overboard … • Change control and regression testing impact

More Related