Enterprise Generation Language
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Enterprise Generation Language

  • 1,705 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,705
On Slideshare
1,705
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
23
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • I added this to give it some structure I also changed the order – state the business problem, then describe the solution, d
  • I added this to give it some structure I also changed the order – state the business problem, then describe the solution, d
  • I like this slide I would label the different layers – presentation, business logic, data (although it does not always make sense) – should db2 and rpg be at the same level? Or db2 and C++?
  • I like this slide I would label the different layers – presentation, business logic, data (although it does not always make sense) – should db2 and rpg be at the same level? Or db2 and C++?
  • Pass up to 30 parameters in EGL. On mainframe, all combined cannot be > 32K data.

Transcript

  • 1. Introduction to EGL – a one and one half day boot camp for Rational Technical Personnel Raleigh-Research Triangle Park, 4/18 2006 Enterprise Generation Language
  • 2. Agenda
    • Day One – full day
      • Pre-requisites
      • EGL Introduction
      • The EGL Demo:
        • Build by the numbers (use Code Snippets)
        • Build step-by-step (create all resources manually)
    • Day Two – ½ day
      • The EGL/zSeries Value Proposition (review)
      • Generating COBOL
      • Accessing mainframe resources
      • Wrap up
  • 3. Pre-Requisites
    • Software
      • RAD 6.0.1.1, with COBOLGEN plug-in
      • DB2 Personal Edition
      • Training (Boot camp) class PIF ( rad6egl.zip ) – imported/configured/verified
      • Training Cloudscape database ( eglsampcR6.zip ) – unzipped to c:
      • Redbook PIF ( redbook.zip ) – imported/configured/verified
      • Redbook DB2 database .cmd and export files (importRedbk.cmd and zip) - run
      • Snippets for Redbook/Demo ( Snippets.xml )
      • Viewlets for learning EGL
    • Printed docs
      • EGL QuickStart and Language Tutorial
    • Knowledge – software skills you should have before taking this course
      • Eclipse/WAS
      • “ Internet application technology – 101”
      • Have sat through an EGL “What is” overview presentation
  • 4. Introduction to EGL Enterprise Generation Language
  • 5. Agenda
    • Day One – full day
      • Projects:
        • EGLWeb6 – the project used in the EGL tutorials
        • Redbook – the project used in the EGL demo
      • Topics
        • EGL Project View
        • Your first EGL JSF Page
        • EGL Import, Library, Records and DataItems
        • A search page
        • Your first EGL Service
        • Your first EGL Program
        • Debugging
  • 6. EGL Project View – New Project - 
    • Open your EGLWeb6 Project
    • Project and file/folder organization:
      • EGLSource
        • Default EGL source file folder
      • JavaSource
        • Default EGL Java generation file folder
      • WebContent
        • Web Application Root directory and default web-page and “artifacts” folder
    • ProjectEAR
    • You may over-ride the folder defaults, according to your own unique project and software development architecture. Note that this could include multiple projects.
    • Best practices are discussed later in this course
  • 7. Explore an EGL Project - 
    • Expand the folders, find and load each of the following artifacts into the Content Area. Be prepared to answer the question – “What the heck is in this file?”
    • File to find What am I (what is my content and/or purpose)
      • testPage.egl ________________________________________
      • testPage.java ________________________________________
      • testPage.jsp ________________________________________
      • testPage.class ________________________________________
      • Web.xml ________________________________________
      • Application.xml ________________________________________
      • Website-config ________________________________________
      • Stylesheet.css ________________________________________
      • A_Gray.htpl ________________________________________
  • 8. Your First EGL Pages -  
    • You will create the above two EGL pages by:
      • Watching the Viewlet: basicjsp
      • Following the steps in the book on pages: 53–58
  • 9. EGL Project View – Existing Project -  Been there, done that Our next topic…
  • 10. EGL Import, Libraries, Records and DataItems - 
    • Import, produces EGL:
      • Libraries – an EGL file containing Records, and C.R.U.D. SQL data access functions
      • sqlRecords – data structures that participate in EGL SQL code generation
      • DataItems – rich data definitions, that can be reused as enhanced variable “types”
    Libraries consist of sqlRecords which reference DataItems Functions contain implicit SQL and reference sqlRecords DataItems are like a Data Dictionary of data elements, defined, rich-data-types. They simplify development and maintenance. Database (catalog) Records Functions Library DataItems DataItem definition… DataItem definition… DataItem definition… DataItem definition… DataItem definition… Import
  • 11. Your First EGL Import -  
    • You will create the above set of EGL libraries by:
      • Watching the Viewlet: import
      • Following the steps in the book on pages: 69-76
    Database C:eglsampcR6 Data parts import
  • 12. Your First Data-Connected Web Page -  
    • You will create the above database-connected web page by:
      • Watching the Viewlet: allcustomers
      • Following the steps in the book on pages: 78-93
  • 13. Linking a Data-Connected Web Page -  
    • You will add dynamic-data hyper-links to allcustomers, by:
      • Watching the Viewlet: linkingpages
      • Following the steps in the book on pages: 96-98
  • 14. Your Next Database-Connected Page -  
    • You will create the above “Update Customer Information” page by:
      • Watching the Viewlet: updatepage , and following the steps in the book on pages: 101-120
      • If time permits, you can create the allorders page, following the steps in the book, on pages: 94-95, 99 and 121-123
    Update Customer page
  • 15. Changing a Template Page -  
    • You will modify the A_gray.htpl template page as shown above, by w atching the Viewlet: template – and following the steps in it
  • 16. Getting a Clicked Row Value -  
    • You will create the page shown above, that incorporates JSF “clicked row” actions, by watching the Viewlet: getClickedRow – and following the steps in it.
  • 17. EGL Project View – Existing Project -  Been there, done that Been there, done that Our next topic
  • 18. Creating your first EGL Service -  
    • You will the EGL Service shown above by w atching the Viewlet: service1 – and following the steps in it.
  • 19. Calling your EGL Service from a Web Page -  
    • You will call the EGL Service you just created above by w atching the Viewlet: service2 – and following the steps in it.
  • 20. Creating your first EGL Program -  
    • You will create an EGL program as shown above, that is invoked by your service, by w atching the Viewlet: program1 – and following the steps in it.
    nameSearch.jsp nameSearch.egl service1 program1 return…results…
  • 21. Debugging an EGL Program -  
    • You will debug the program, and the service and the PageHandler you just wrote, by viewing : debug1 – and following the steps in it.
  • 22. EGL Calling Java -  
    • You will add the function, variables and call to the function as shown above to your search page’s PageHandler – and watch the viewlet: callingJava – and follow the steps in it.
  • 23. Demo Training
  • 24. Demo Preparation- 
    • Close the EGLWeb6 project
    • Launch RAD and open the Redbook project
      • Note that it must be configured as per your setup directions
      • And the DB2 Redbook database must be installed the tables created
    • From Web Content, run the Menu page
      • Launch at least one of the additional pages in the Menu side-bar
  • 25. View the Demo –  
    • Re-view the demo, by watching the viewlet, eglDemo2
  • 26. Doing the Demo - 
    • Walk through the demo, by following the instructions in: demoTutorial
  • 27. Day Three – zSeries Topics
  • 28. Day Three Agenda
    • zSeries Value Proposition – review
    • COBOLGEN
      • Process
      • Limitations
      • EGL Build files
      • Workshop: Generate COBOL for an EGL program
    • Accessing Mainframe Resources
      • Concepts
      • Limitations
      • Workshop: Editing a Linkage file to access a CICS transaction on the mainframe
    • Note: For the remainder of this course you will be working in the Redbook project
  • 29. EGL and zSeries - Highly Productive, End-to-End, Application Development - 
    • Internet applications
    • Service Oriented Applications
    • Callable Web Services or programs
    • Database applications
    • Batch applications
    • Reports
    • Message-based applications
    • Green-screen applications for CICS, IMS, iSeries, Linux, AIX, Windows
    Web Services EGL Web Servers J2EE Transactions Servers EGL CICS - IMS Transaction Servers EGL EGL iSeries Transaction Servers
  • 30. EGL Application Development Options -  3270/5250 Web Rich Client* Reports Services Handler Handler Handler Handler Program Library Program Service Library Program Service Library Program * Eclipse Rich Client Support –technical preview 2006 Batch Program Library Program Batch Presentation Business Logic & Control Data Access Integration with and Generation of Existing Applications COBOL RPG Java J2EE C / C++ PLI IMS DC CICS IMS DB MQ Series DB2 SQL Server Oracle MySQL Derby Informix Cloudscape Serial, Relative, Indexed (VSAM) Other…
  • 31. COBOL Generation
  • 32. EGL Generation Web Application Code Generation -  Your EGL source files are associated with an EGL build file – that determines how generation is to proceed. Note from the picture that besides creating the Java for an application, the generation process also updates specific J2EE files, such as the WAR and EAR file, etc.
  • 33. EGL COBOL Generation -  EGL COBOL Generation Extension for zSeries Enterprise Developer Server When you change certain build file options (minimally, setting J2EE to “no” and system to “ZOSBATCH”) generation will create COBOL from your EGL. Note from the picture that besides creating the COBOL for an application, EGL can also automatically (when Prep=“y”) transfer the COBOL, JCL and if necessary DB2 Bind files to the mainframe for execution and test.
  • 34. EGL Generation Overview - 
    • EGL Generates:
      • Java - either J2EE or non-J2EE
      • COBOL for MVS - either batch, CICS or IMS
      • COBOL for iSeries
    • EGL parts must be generated to produce these outputs:
      • The Java code containing the EGL defined logic
      • The COBOL code containing the EGL defined logic
    • The generation process delivers the code to the target platform
      • Java – to RAD/WDz Java Project which automatically builds code
      • COBOL – to MVS datasets where the code is built by the build server
    • Build descriptors are used to drive the generation process, but also used during EGL Debug.
  • 35. EGL Build Parts – Overview - 
    • Build files
      • Contain Build Parts
      • Have a .eglbld file extension
    • Build parts include:
      • Build descriptor
      • Resource Associations
      • Linkage options
      • Link Edit (COBOL only)
      • Bind Control (DB2 COBOL only)
  • 36. Build Parts – Build Descriptors - 
    • A Build Descriptor is required
      • Specifies how to generate the code
      • Specifies runtime options associated with the code
    • Composed of sets of options
      • Some options identify other build parts to utilize
      • Some identify other EGL parts to generate if referenced
    • Same EGL source may be associated with multiple build descriptors
      • Target system generation & runtime options
        • Required to generate/build code
      • Debug runtime options
        • If running the code in the EGL debugger
  • 37. Assigning an EGL File to its Build Descriptor - 
    • Build Descriptors exist in an implicit hierarchy:
    • Project level
      • Folder level
        • Individual resource level
    • You assign the above to a Build Descriptor using the Properties for… selected resource in Navigator.
    • If an EGL resource is not explicitly assigned a build descriptor, the tooling follows the hierarchy upwards to find a Build File to use in Generation.
  • 38. Build Parts – Build Descriptors - 
    • The set of applicable options varies:
      • By language being generated ( Java vs. COBOL )
      • By target system ( CICS , IMS or Batch)
      • By intended use of the build descriptor
        • Target System
        • Debug
    • Setting up your build descriptors
      • Easier if you avoid setting it up from scratch
      • Good to have one as a starting point
        • The “Create EGL Project” wizard can generate one for you
      • Some groups prefer everyone use a common one for all projects
  • 39. Build Parts – Build Descriptor Editor - 
    • Visible options can be filtered
      • By target system
      • By intended use of descriptor
      • Basic vs. All options
      • Only options with values
    Filter to show only options with values Filter based on target system, intended use of descriptor and all vs. basic options Options Values
  • 40. Workshop – Generate COBOL for a Program – 1 of 4
    • Under EGLSourceatchPrograms open: searchcbl
    • Add the single line of EGL source shown below – which writes to the Console (or on the mainframe Displays to //SYSOUT DD )
    • Ctrl/S
  • 41. Workshop – Generate COBOL for a Program – 2 of 4
    • From Navigator , Right-click on: searchcbl.egl
    • From Properties
      • Specify that the EGLBatchBuildFile.eglbld is the EGL Default Build Descriptor for: searchcbl.egl
  • 42. Workshop – Generate COBOL for a Program – 3 of 4
    • From Navigator, Double-Click EGLBatchBuildFile (it is in the EGLSource folder). Open it in the Contents Area and e nsure the following:
    destDirectory and genDirectory are correct for your machine (they should equate to your workspace directory for this project). j2ee = NO Prep = NO System = ZOSBATCH Save any changes to EGLBatchBuildFile
  • 43. Workshop – Generate COBOL for a Program – 4 of 4
    • From Navigator, Generate searchcbl
    • Right-click over the COBOLGEN directory in Navigator and Refresh (this assumes that your genDirectory setting in the build file is correct)
    • Double-click (open) the COBOL file produced…take a peak inside…do a find on “Hello” 
  • 44. Limitations of EGL COBOLGEN - 
    • If you are writing source code using the Enterprise Generation Language and intend to generate output in COBOL, the following restrictions are in effect:
      • When you invoke a function, you cannot pass an argument that includes the invocation of an EGL system function. The workaround is to pass a variable that includes the value of the function invocation.
      • Also when you invoke a function in a conditional expression, you cannot pass an argument that is itself an expression other than a literal or variable.
      • A function cannot return an expression such as A + B. The workaround is to return a variable that includes the value of the expression.
      • Non-fixed records are not supported.
      • Set-value blocks are supported only for setting property values in part definitions and variable declarations and for initializing field values in variable declarations.
      • The property validValues supports only a single range of numbers.
      • In relation to text and print forms, the following statements apply:
        • You cannot include fields of type HEX, FLOAT, SMALLFLOAT, TIME, or TIMESTAMP
        • If you are using a field as a date, you specify a date-format string or constant in the field property dateFormat, and these restrictions are in effect--
      • The following capabilities are not supported:
        • array literals, arrayDictionaries, Dictionaries, EGL report processing, consoleUI, and system exceptions
        • The system variable sysVar.currentException; you cannot identify which exception was thrown most recently in the run unit, although use of the OnException block is supported
        • Multidimensional arrays or the array-specific functions resizeAll and setMaxSizes
        • The primitive types ANY, CLOB, BLOB, and STRING; but literals and the substring syntax are supported
      • The following system functions are not supported
  • 45. Accessing Mainframe Resources
  • 46. EGL Application Development Options -  3270/5250 Web Rich Client* Reports Services Handler Handler Handler Handler Program Library Program Service Library Program Service Library Program * Eclipse Rich Client Support –technical preview 2006 Batch Program Library Program Batch Presentation Business Logic & Control Data Access Integration with and Generation of Existing Applications COBOL RPG Java J2EE C / C++ PLI IMS DC CICS IMS DB MQ Series DB2 SQL Server Oracle MySQL Derby Informix Cloudscape Serial, Relative, Indexed (VSAM) Other…
  • 47. EGL Configurations zSeries Windows/Linux AIX, HP, Solaris iSeries EGL program/library/service * Delivered in a future release WebSphere Native (Java) USS Linux/Z* Native (COBOL) Batch/5250 Native (Java) WebSphere WebSphere Batch CICS IMS COBOL ClearCase - Other Common Repository COBOL
  • 48. EGL Requirements to Access Remote C.I.C.S. Program Standard EGL Call statement identifies the program – and passes parameters (typically as values into the COMMAREA). The details of making the connection to C.I.C.S. from WebSphere are contained in an EGL “build file”
  • 49. C.I.C.S.-EGL Development Process - Steps
    • 0. Install and configure the required software
      • CTG Server (on the mainframe)
      • C.I.C.S. Transaction Gateway (on WebSphere)
    • 1. Create the information model
      • Import database records
      • Create data Items
      • Create the COMMAREA record
    • 2. Create the U.I. model
      • Customize the .CSS
      • Create/modify template pages
      • Design the site
    • 3. Create the business model
      • Data access operations
      • Pure business logic
      • C.I.C.S. access call statement and surrounding business logic
    • 4. Create the transactions
      • Specify entries in the EGL Build Descriptor for remote C.I.C.S. access
      • Develop the pages
      • Test and debug
    • 5. Deploy the application
  • 50. Build Parts – Resource Association
    • Is needed only for EGL record that accesses an external file, printer, or MQ
    • Has a logical file or queue name
    • Like JCL in a batch application if serial files
    • See the topic in the tutorial: Conceptual View of External File Access in EGL
  • 51. Build Parts – Resource Association - Relationships Record queuename property points to Association element in Resource Association Part Resource Association Part referenced from Build Descriptor Part Association element can be associated with multiple target platforms and file type combinations Each target platform and file type combination has its own properties Uses this Build Descriptor
  • 52. Build Parts – Linkage Options
    • A Linkage Options part specifies how a generated:
      • Java program or COBOL program:
        • Calls other generated code or non-generated code
      • Java or COBOL program:
        • Transfers asynchronously to another generated program
      • COBOL program
        • Is called by other generated code
        • Transfers control to another program and ends processing
      • CICS/IMS COBOL program
        • Accesses files on remote CICS regions
    • Linkage options are specified at:
      • Generation time for COBOL or Java
      • Runtime for Java if build descriptor option remoteBind=runtime
        • Options read from properties file, generated if genProperties=yes
  • 53. Build Parts – Linkage Options
    • There are linkage option elements
      • callLink
        • Linkage information used for a given call to another program
      • asynchLink
        • Information used for asynchronous transfers ( sysLib.startTransaction )
      • transferLink
        • Information used for program transfers (transfer EGL statement)
      • fileLink
        • Information for accessing VSAM file or transient data queue
    • Each linkage option element has several properties
    • Build descriptor option: “ linkage ”
      • Identifies the Linkage Options part to use
      • Use is optional and no default if not specified
  • 54. Build Parts – Linkage Options Build Part Editor EGL Build File Tabs for Build Parts in File Switch Views between Linkage Option Types callLink, asynchLink, transferLink, fileLink Properties vary by type Program callLink applies to Type of callLink
  • 55. Build Parts – Link Edit
    • Link Edit parts are applicable to COBOL code built for MVS
    • They provide information to create a link edit file
      • Same as link edit file you would create for native COBOL code
      • Specifies how to package programs into load modules
    • Is only needed when generated COBOL program:
      • Has static COBOL calls to other programs
      • Is called statically by another program, whether generated or not
  • 56. Modify a Build-file Descriptor for CICS
    • From your tutorial, go to Appendix three