IBM Software Group | Rational Software

1,584 views
1,444 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,584
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Typically in an EGL development environment each developer will have a set of datasets their EGL generated COBOL and associates files are uploaded to and compiled from. The resulting compiled code (the executables) end up in the Load Library dataset. For example, MVIRGA.ZOSCICS.OBJECT will be a dataset where files are uploaded to and compiled from, the resulting executable will be in either a common load module, PROJECT.ZOSCICS.LOAD, or MVIRGA.ZOSCICS.LOAD depending on how your shop decides to implement EGL Generated COBOL development. If you generate COBOL to your own load module, there needs to be an extra step of copying the executable to the common load module prior to testing/running the program.
  • It is assumed at this point, that the CICS entries are in place for the programs you are generating. The ELAN program allows you to refresh the runtime with the latest version of the module you just generated. You need to do this for each program, map group, and table you generate. Note that when you do a map, you are doing a new copy on the map group so make sure you enter the map group name when doing the new copy for a map, for example, the default generation settings will append a “fm” on the end of a map name during generation. In the screen shot above the map group entered is MAP048FM.
  • It is assumed at this point, that the CICS entries are in place for the programs you are generating. The ELAN program allows you to refresh the runtime with the latest version of the module you just generated. You need to do this for each program, map group, and table you generate. Note that when you do a map, you are doing a new copy on the map group so make sure you enter the map group name when doing the new copy for a map, for example, the default generation settings will append a “fm” on the end of a map name during generation. In the screen shot above the map group entered is MAP048FM.
  • The EGL software development kit (SDK) is a feature that lets you generate output in a batch environment, even when you lack access to the graphical user interface of your development environment, or lack access to details on how projects are organized, or both. For example, if you store EGL files in a software configuration management (SCM) tool, you can create a batch job, perhaps to run after normal working hours, that extracts the files from the SCM tool and then uses the EGL SDK to trigger generation. To use the EGL SDK, you enter the command java EGLSDK in a batch file or at a command prompt. The command statement itself can take either of two forms: It can specify an EGL file and build descriptor. In this case, if you want to generate multiple files, you write multiple commands. Alternatively, the invocation can reference an EGL command file that includes the information necessary to cause one or more generations. However you organize your work, you can specify a value for eglpath , which is a list of directories that are searched to resolve part references. Also, in the build descriptor used with the EGL SDK, you must specify the genDirectory build descriptor option instead of genProject .
  • IBM Software Group | Rational Software

    1. 1. COBOL Generation for System z Mark Evans [email_address] P. Michael Virga [email_address]
    2. 2. <ul><ul><li>© Copyright IBM Corporation 2006. All rights reserved. </li></ul></ul><ul><ul><li>The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, these materials. Nothing contained in these materials is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. References in these materials to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. </li></ul></ul><ul><ul><li>This information is based on current IBM product plans and strategy, which are subject to change by IBM without notice. Product release dates and/or capabilities referenced in these materials may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. </li></ul></ul><ul><ul><li>IBM, the IBM logo, the on-demand business logo, Rational, the Rational logo, and other IBM Rational products and services are trademarks or registered trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others. </li></ul></ul>
    3. 3. Agenda – EGL COBOL Generation <ul><li>EGL COBOL Generation Overview </li></ul><ul><li>Setting up COBOL Generation </li></ul><ul><ul><li>Required Products </li></ul></ul><ul><ul><li>Host/Mainframe Configuration </li></ul></ul><ul><ul><li>Customization Points </li></ul></ul><ul><ul><li>EGL Build Files </li></ul></ul><ul><li>Using EGL COBOL Generation </li></ul><ul><ul><li>Coding for EGL COBOL Generation </li></ul></ul><ul><ul><li>Looking at Results </li></ul></ul><ul><ul><li>Miscellaneous </li></ul></ul><ul><li>Demo </li></ul>
    4. 4. EGL Generation Overview <ul><li>EGL Generates (transforms/creates): </li></ul><ul><ul><li>Java - for J2EE or non-J2EE </li></ul></ul><ul><ul><li>COBOL for z/OS (System z) – for batch, CICS or IMS </li></ul></ul><ul><ul><li>COBOL for iSeries (System i) </li></ul></ul><ul><li>EGL parts must be generated to produce these outputs: </li></ul><ul><ul><li>The Java code containing the EGL defined logic </li></ul></ul><ul><ul><li>The COBOL code containing the EGL defined logic </li></ul></ul><ul><li>The generation process delivers the code to the target platform </li></ul><ul><ul><li>Java – to RAD/RDz Java Project which automatically builds (compiles) code </li></ul></ul><ul><ul><li>COBOL – to z/OS datasets or system i files where the code is built (compiled) by the build server </li></ul></ul>
    5. 5. EGL Generation Process - Overview <ul><li>Code EGL Parts </li></ul><ul><li>Logic </li></ul><ul><li>Data </li></ul><ul><li>I/O </li></ul><ul><li>Build parts </li></ul>Save w/Validation RAD/RDz Datasets/Files containing COBOL code, link & bind info Executables and auxiliary files Build Server Compile, link, bind TCP/IP z/OS or ISeries Workstation TCP/IP Generation <ul><li>EGL Project </li></ul><ul><li>EGL Source Parts </li></ul><ul><li>Build Descriptors </li></ul><ul><li>Other build parts </li></ul><ul><li>Java Project </li></ul><ul><li>containing </li></ul><ul><li>Java code </li></ul><ul><li>(compiled automatically) </li></ul><ul><li>Generate Java </li></ul><ul><li>Directories </li></ul><ul><li>containing </li></ul><ul><li>COBOL code, </li></ul><ul><li>link & bind info </li></ul><ul><li>Generate COBOL </li></ul>
    6. 6. EGL COBOL Generation Process Detail – System z EGL COBOL Runtime files EGL Projects Preprocessor Workstation z/OS EGL Build Server EGL JCL Build Scripts Load Modules DBRMs TCP/IP CICS IMS Batch EGL Build Files 1 EGL Source Files (Programs, etc) COBOL Generator COBOL Source Other Files Results Files Listings IDE Build Job Generation Result Build Client ccublds 2 3 6 7 8 10 11 5 12 4 13 <ul><li>Build server pulls up buildplan.xml and retrieves/parses correct EGL JCL Build Script </li></ul><ul><li>Build server starts job to build (compile,etc) the generated code </li></ul><ul><li>Build job runs and pulls files from workstation and uses files from the EGL COBOL runtime (copybooks) and then creates executables </li></ul><ul><li>Build Job sends results back to the workstation </li></ul><ul><li>Build client is notified of job completion and if successful or failure and it then notifies COBOL generator </li></ul><ul><li>COBOL Generator updates Generation Results view with success or not and if failure ….location of results file </li></ul><ul><li>You have source ready to generate !!!! </li></ul><ul><li>Generate requested using source files and build files as input </li></ul><ul><li>EGL Preprocessor is run to validate EGL source for the target system (CICS, IMS, Batch) </li></ul><ul><li>The EGL COBOL generator creates COBOL and other source files including “buildplan.xml” file in local file system </li></ul><ul><li>EGL Build client code (ccubldc) is invoked </li></ul><ul><li>Build client starts up security process to encrypt passwords </li></ul><ul><li>From info in buildplan.xml, conversation with running build server is started </li></ul>9
    7. 7. <ul><li>Holy Cow!!!! </li></ul><ul><li>How do I make all this work? </li></ul>It is not that Complicated !!! Just need to follow a few simple steps !!
    8. 8. EGL COBOL Generation – Basic Steps <ul><li>Get Required EGL Components </li></ul><ul><li>Setup/Customize/Start Build Server </li></ul><ul><li>Setup Build Files </li></ul><ul><li>Write Code !! (obviously) </li></ul><ul><li>Generate the code </li></ul><ul><li>Look at Results </li></ul><ul><li>Test/Run </li></ul><ul><li>Hey… this is EASY!!! </li></ul>Done ONCE at beginning by Administrator !!
    9. 9. Step 1: Getting the Required Components
    10. 10. EGL COBOL Generation – Required EGL Components? Required Component(s) Product Purpose EGL COBOL Runtime AND EGL Build Server Rational COBOL Runtime for zOS V6.0.1 Server (z/OS) EGL COBOL Generation <ul><li>RAD or RSA 7.0 plus Rational Business Developer Extension V7.0 </li></ul><ul><li>or </li></ul><ul><li>Rational Developer for zSeries V7.1 plus Rational Business Developer Extension V7.0 </li></ul>Client System z
    11. 11. Step 2: Setup/Customize the EGL COBOL Gen build process
    12. 12. EGL COBOL Generation: Build Server on System z <ul><li>The System Programmer will need to install and customize the Runtime Environment. </li></ul><ul><li>Job that is supplied by EGL and runs on z/OS </li></ul><ul><ul><li>CCURUNM member in install PDS (by default) </li></ul></ul><ul><ul><li>Specifies </li></ul></ul><ul><ul><ul><li>Port to listen on </li></ul></ul></ul><ul><ul><ul><li>Authentication levels </li></ul></ul></ul><ul><ul><ul><li>CCUWJCL DD card specifies member containing Build Job JCL </li></ul></ul></ul><ul><li>Build Job </li></ul><ul><ul><li>In CCUMVS member by default </li></ul></ul><ul><ul><li>CCUPROC DD Card specifies dataset with JCL Build Scripts </li></ul></ul><ul><li>Note: See for more setup information: </li></ul><ul><ul><li>- Program Directories </li></ul></ul><ul><ul><li>- EGL Host Server Guide </li></ul></ul><ul><ul><li>- EGL Helps </li></ul></ul>
    13. 13. EGL COBOL Generation: JCL Build Scripts on System z <ul><li>Pseudo-JCL that executes the necessary processes to make an executable (see next chart) </li></ul><ul><ul><li>Example: FDAPCL </li></ul></ul><ul><ul><li>Is a member in dataset specified in CCUPROC </li></ul></ul><ul><li>Contain “ VARS ” which provide substitution information within build steps </li></ul><ul><ul><li>Value can be set through data sent from client (see Buildplan.xml later) </li></ul></ul><ul><ul><li>Will override any “default” value if provided </li></ul></ul><ul><ul><li>VARS provide substitution information within build steps. </li></ul></ul><ul><li>Substitutions are listed as “&varname” </li></ul><ul><li>In this example (sample substitution variables) </li></ul><ul><ul><li>&CGHLQ will equal projectID Build descriptor </li></ul></ul><ul><ul><li>&SYSTEM will equal target generation system </li></ul></ul><ul><ul><li>CCUEXT defines the file type to upload from workstation (if it exists) </li></ul></ul>
    14. 14. EGL COBOL Generation: JCL Build Scripts on System z MFS Compile (IMSVS only) FDAMFS CICS translator, COBOL compile, link (No DB2 in program) FDATCL CICS translator, DB2 precompile, COBOL compile, link edit FDAPTCL DB2 precompile, COBOL compile, link (with DB2) (z/OS Batch, IMSBMP, IMSVS) FDAPCL Linkage editor for format modules (formgroups) FDALINK COBOL compile, link (no CICS commands) FDACL Runs bind command for generated program FDABIND COBOL compile, link (no DB2) ( z/OS batch, IMSBMP, and IMSVS) FDABCL
    15. 15. EGL COBOL Generation: Customization on System z <ul><li>The EGL Build Process can be customized </li></ul><ul><ul><li>JCL Build Scripts </li></ul></ul><ul><ul><ul><li>Outcome of source and listings can be changed </li></ul></ul></ul><ul><ul><ul><ul><li>Upload source only vs save in PDS </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Download listing vs throw away vs save in file </li></ul></ul></ul></ul><ul><ul><ul><li>New steps can be added </li></ul></ul></ul><ul><ul><ul><li>New Substitution variables can be added </li></ul></ul></ul><ul><ul><ul><li>JCL Procedures can be called (with substitution) </li></ul></ul></ul><ul><ul><li>Can control scripts via “symbolics” in build descriptors (later) </li></ul></ul><ul><ul><ul><li>Result: </li></ul></ul></ul><ul><ul><ul><ul><li>Can “modify” results from build scripts based on use of different build descriptors AND Enables way to do builds for different stages of development </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Example: Unit Test, Systems test, Production </li></ul></ul></ul></ul></ul><ul><ul><li>Also can have more than one build server running simultaneously </li></ul></ul><ul><ul><ul><li>Must use different port </li></ul></ul></ul><ul><ul><ul><li>Could use different set of build scripts for different purposes </li></ul></ul></ul>
    16. 16. EGL COBOL Generation: Default z/OS datasets Note: Datasets can be created by running CLIST ELACUSER <ul><li>What Target Datasets “might” be used on z/OS (by default)??? </li></ul><ul><ul><li>Saving or not after generation is based on JCL Build Script </li></ul></ul>ZOSCICS cghlq.env .ezepct CICS PCT entries All z/OS cghlq.env .load Load library ZOSCICS cghlq.env .ezeppt CICS PPT entries All z/OS cghlq.env .ezesrc COBOL Source Library All z/OS cghlq.env .object Object Library ZOSBATCH cghlq.env .ezejclx Batch Execution JCL All z/OS if DB2 is used cghlq.env .ezebind Bind commands All z/OS if DB2 is used cghlq.env .dbrmlib Database request module Target environment Data set name Description
    17. 17. EGL COBOL Generation: Client Side Setup <ul><li>What runs on the client to talk to the server </li></ul><ul><ul><li>ccubldc.exe process will be started (in the background) </li></ul></ul><ul><ul><ul><li>Build client code that interacts with build server </li></ul></ul></ul><ul><ul><li>CCU Security manager (EGL Java Class) starts to encrypt passwords passed to host machine </li></ul></ul><ul><li>What is needed on the client machine </li></ul><ul><ul><li>Required in developer’s machine settings </li></ul></ul><ul><ul><ul><li>CLASSPATH </li></ul></ul></ul><ul><ul><ul><ul><li><radinstall>ineglbatchgen.jar </li></ul></ul></ul></ul><ul><ul><ul><li>PATH </li></ul></ul></ul><ul><ul><ul><ul><li><radinstall>in </li></ul></ul></ul></ul><ul><ul><li>NOTE: RDz adds these settings during install of EGL Feature </li></ul></ul><ul><ul><li> WDSC-AE does NOT set these during install. </li></ul></ul><ul><ul><li>(must be done manually) </li></ul></ul>
    18. 18. Step 3: EGL Build Files for COBOL Generation (directing the generation process)
    19. 19. EGL COBOL Generation - EGL Build Files <ul><li>Build files </li></ul><ul><ul><li>Contain Build Parts </li></ul></ul><ul><ul><li>Have a .eglbld file extension </li></ul></ul><ul><li>Build parts include: </li></ul><ul><ul><li>Build descriptor </li></ul></ul><ul><ul><li>Resource Associations </li></ul></ul><ul><ul><li>Linkage options </li></ul></ul><ul><ul><li>Link Edit (z/OS only) </li></ul></ul><ul><ul><li>Bind Control (z/OS DB2 only) </li></ul></ul><ul><li>Editing build parts </li></ul><ul><ul><li>Build parts use specialized build part editors </li></ul></ul>
    20. 20. EGL COBOL Generation – EGL Build File Editor <ul><li>Visible options can be filtered </li></ul><ul><ul><li>By target system </li></ul></ul><ul><ul><li>By intended use of descriptor </li></ul></ul><ul><ul><li>Basic vs. All options </li></ul></ul><ul><ul><li>Only options with values </li></ul></ul>Filter to show only options with values Filter based on target system, intended use of descriptor and all vs. basic options Options Values
    21. 21. EGL COBOL Generation – Build Parts Overview <ul><li>Build Descriptors </li></ul><ul><ul><li>Controls total build process </li></ul></ul><ul><li>Resource Associations </li></ul><ul><ul><li>Supplies logical and physical information for file access </li></ul></ul><ul><li>Linkage </li></ul><ul><ul><li>Supplies information for inter-program calls </li></ul></ul><ul><li>Link Edit (z/OS only... Used rarely) </li></ul><ul><ul><li>Supplies information to control linkage editor if needed </li></ul></ul><ul><ul><ul><li>Example: link-edit information for static calls </li></ul></ul></ul><ul><li>Bind Control (z/OS only and program uses SQL) </li></ul><ul><ul><li>Supplies information needed to do DB2 binds </li></ul></ul>
    22. 22. EGL COBOL Generation – Build Descriptors <ul><li>A Build Descriptor part is required </li></ul><ul><ul><li>Specifies how to generate the code </li></ul></ul><ul><ul><li>Specifies runtime options associated with the code </li></ul></ul><ul><li>Composed of sets of options </li></ul><ul><ul><li>Some options identify other build parts to utilize </li></ul></ul><ul><ul><ul><li>Example: linkage </li></ul></ul></ul><ul><ul><li>Some identify other EGL parts to generate if referenced </li></ul></ul><ul><ul><ul><li>Example: genDataTables </li></ul></ul></ul><ul><li>Same EGL source may be associated with multiple build descriptors </li></ul><ul><ul><li>Target system generation & runtime options </li></ul></ul><ul><ul><ul><li>Required to generate/build code </li></ul></ul></ul><ul><ul><li>Debug runtime options </li></ul></ul><ul><ul><ul><li>If running the code in the EGL debugger </li></ul></ul></ul>
    23. 23. EGL COBOL Generation – Build Descriptors <ul><li>The set of applicable options varies: </li></ul><ul><ul><li>By language being generated ( Java vs. COBOL ) </li></ul></ul><ul><ul><li>By target system ( CICS , IMS or Batch) </li></ul></ul><ul><ul><li>By intended use of the build descriptor </li></ul></ul><ul><ul><ul><li>Target System </li></ul></ul></ul><ul><ul><ul><li>Debug </li></ul></ul></ul><ul><li>Setting up your build descriptors </li></ul><ul><ul><li>Easier if you avoid setting it up from scratch </li></ul></ul><ul><ul><li>Good to have one as a starting point </li></ul></ul><ul><ul><ul><li>The “Create EGL Project” wizard can generate one for you </li></ul></ul></ul><ul><ul><li>Some groups prefer everyone use a common set across all projects </li></ul></ul>
    24. 24. Common Build Descriptor Options for COBOL Gen on z Many others…see EGL Help! ( hint: Select line and press f1..help will open for option Tells generator to send the generated output to the EGL Build Server prep High level qualifier of the target datasets on z/OS projectID Target system for generation System Tells generator to also generate any “used” help form groups in a program (for 3270 programs) genHelpFormGroup Name of folder in file system ( not workspace ) that the generated output will be written to genDirectory Port number on which EGL build server is listening destPort Host UserID used for build (case sensitive) destUserId Tells generator to also generate any “used” dataTables in a program genDataTables Tells generator to also generate any “used” form groups in a program (for 3270 programs) genFormGroup Password of UserID that is being used for build (case sensitive) destPassword Host name of machine containing the EGL build server destHost Identifies bind part name to use in creating bind information Bind
    25. 25. EGL COBOL Generation: Symbolic Build Descriptors <ul><li>EGL provides Symbolics </li></ul><ul><ul><li>Can create user-defined build descriptors </li></ul></ul><ul><ul><li>Used in build processing </li></ul></ul><ul><ul><ul><li>Normally supply/override substitution values for JCL Build Scripts </li></ul></ul></ul><ul><ul><li>EGL-defined symbolics </li></ul></ul><ul><ul><ul><li>Usually sets value based on EGL build descriptor </li></ul></ul></ul><ul><ul><ul><li>Always start with EZExxxx </li></ul></ul></ul><ul><ul><ul><li>Examples </li></ul></ul></ul><ul><ul><ul><ul><li>projectID  EZEPID and CGHLG </li></ul></ul></ul></ul><ul><ul><ul><ul><li>System  EZEENV </li></ul></ul></ul></ul><ul><ul><li>Referenced by </li></ul></ul><ul><ul><ul><li>%symbolicname% within workstation </li></ul></ul></ul><ul><ul><ul><li>&symbolicname in JCL build scripts </li></ul></ul></ul><ul><ul><ul><li>symbolicname in FDAPREP </li></ul></ul></ul><ul><ul><ul><ul><li>Example: </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>%EZEENV% in genDirectory </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>Creates folder equal to value specified for system </li></ul></ul></ul></ul></ul>
    26. 26. EGL COBOL Generation – Bind Control parts (z/OS only) <ul><li>Bind Control parts are only applicable to: </li></ul><ul><ul><li>COBOL code built for z/OS </li></ul></ul><ul><ul><li>Code accesses DB2 </li></ul></ul><ul><li>Provides information to create a bind control file </li></ul><ul><ul><li>Same as bind control file you would create for native COBOL code </li></ul></ul><ul><ul><li>SQL used to create database request modules (DBRMs) to put in plan </li></ul></ul><ul><ul><li>Can create one part used by all programs or unique to a particular program </li></ul></ul><ul><li>Bind Control commands </li></ul><ul><ul><li>Default: Bind Plan </li></ul></ul><ul><ul><li>Most people use Bind Package </li></ul></ul><ul><ul><ul><li>Bind Control Part to be created with Bind Package (can be used by all generates) </li></ul></ul></ul><ul><ul><ul><li>Most information can be supplied by symbolics </li></ul></ul></ul>
    27. 27. Other Build Parts – Link Edit for COBOL Gen on z/OS <ul><li>Default Linkage Editor commands are built </li></ul><ul><li>If default does not work, then create Link Edit Parts </li></ul><ul><ul><li>Are only needed when generated COBOL program: </li></ul></ul><ul><ul><ul><li>Has static COBOL calls to other programs </li></ul></ul></ul><ul><ul><ul><li>Is called statically by another program, whether generated or not </li></ul></ul></ul><ul><ul><ul><li>Want to link specific LE Runtime options to EGL generated programs </li></ul></ul></ul><ul><ul><li>They provide information to create a link edit file </li></ul></ul><ul><ul><ul><li>Same as link edit file you would create for native COBOL code </li></ul></ul></ul><ul><ul><ul><li>Specifies how to package programs into load modules </li></ul></ul></ul>
    28. 28. Step 4: Coding considerations for COBOL Generation
    29. 29. EGL COBOL Generation: Limitations in the language <ul><li>If you are writing source code using the Enterprise Generation Language and intend to generate output in COBOL, the following restrictions are in effect: </li></ul><ul><ul><li>Reports via integration with Jasper or other reporting tools </li></ul></ul><ul><ul><li>BLOB and CLOB support </li></ul></ul><ul><ul><li>Multi-dimensional arrays </li></ul></ul><ul><ul><li>EGL Dictionaries </li></ul></ul><ul><ul><li>JDBC access for supported database products </li></ul></ul><ul><ul><li>Web Support </li></ul></ul><ul><ul><li>External Types (invocation of non-EGL Java classes) </li></ul></ul><ul><li>Be careful not to use Java specific libraries and functions in programs that are intended to be generated to COBOL. </li></ul>
    30. 30. Step 5: Generate the files – Just like everything else (CNTL/G of the file or Generate from Context menu)
    31. 31. Step 6: Look at the Results
    32. 32. EGL COBOL Generation: How do I know if it works? <ul><li>Look in the Generation Results View </li></ul>Good Failed Results returned to client (more on this later)
    33. 33. EGL COBOL Generation – Files produced by generation for z <ul><li>COBOL source </li></ul><ul><li>Linkage editor statements </li></ul><ul><li>Build plan used to control build process </li></ul><ul><li><libname>.cbl </li></ul><ul><li><libname.led </li></ul><ul><li><libname>BuildPlan.xml </li></ul>Library <libname> <ul><li>COBOL source </li></ul><ul><li>Linkage editor statements </li></ul><ul><li>Build plan used to control build process </li></ul><ul><li><tablename>.cbl </li></ul><ul><li><tablename.led </li></ul><ul><li><tablename>BuildPlan.xml </li></ul>DataTable <tablename> <ul><li>Binary Object for Form </li></ul><ul><li>COBOL Source (print forms only) </li></ul><ul><li>Linkage editor statements </li></ul><ul><li>Copy book for forms (IMSVS only) </li></ul><ul><li>MFS source for forms (IMSVS only) </li></ul><ul><li>Build plan used to control build process </li></ul><ul><li><formgrpname>FM.fmt (binary) </li></ul><ul><li><formgrpname>.cbl </li></ul><ul><li><formgpname>FM.led </li></ul><ul><li><formgpname>.cpy </li></ul><ul><li><formgpname>.mfs </li></ul><ul><li><formgrpname>FMBuildPlan.xml </li></ul>FormGroup <formgpname> <ul><li>COBOL source </li></ul><ul><li>Bind Control statement </li></ul><ul><li>Linkage editor statements </li></ul><ul><li>Execution JCL (for ZOSBATCH) </li></ul><ul><li>Build plan used to control build process </li></ul><ul><li><pgmname>.cbl </li></ul><ul><li><pgmname>.bnd </li></ul><ul><li><pgmname.led </li></ul><ul><li><pgmname>,jcx </li></ul><ul><li><pgmname>BuildPlan.xml </li></ul>Program <pgmname> Comments Files produced Generatable Part
    34. 34. EGL COBOL Generation: Buildplan.xml for System z <ul><li>BuildPlan.xml file controls build server……How?? </li></ul><ul><ul><li>What to run on build server </li></ul></ul><ul><ul><ul><li>Via “ command name” </li></ul></ul></ul><ul><ul><ul><li>Correspond to JCL Build Script Names </li></ul></ul></ul><ul><ul><ul><li>Name indicates type of processing </li></ul></ul></ul><ul><ul><li>Host information </li></ul></ul><ul><ul><ul><li>Via “ host name ” </li></ul></ul></ul><ul><ul><ul><li>Location/port </li></ul></ul></ul><ul><ul><ul><li>Code Pages for conversion </li></ul></ul></ul><ul><ul><li>Location of generated files </li></ul></ul><ul><ul><ul><li>Via “ input files ” and “ dependencies ” </li></ul></ul></ul><ul><ul><li>Substitution information </li></ul></ul><ul><ul><ul><li>via “ env ” names </li></ul></ul></ul>
    35. 35. EGL COBOL Generation: Build Results file <ul><li>What do I look at when it fails? </li></ul><ul><ul><li>Either the “results.xml” file or </li></ul></ul><ul><ul><li><progname>.CCUBLDC.log </li></ul></ul><ul><li>Both will be in the same directory as the generated output </li></ul><ul><li>If needed job name/job number is in results </li></ul>
    36. 36. EGL COBOL Generation: Where to find failures for z? <ul><li>Listings can be returned to Workstation by adding these to your build file </li></ul><ul><ul><li>CCUOUT in the symbolics indicates that listings should be returned to client </li></ul></ul><ul><ul><li>Listings are named: </li></ul></ul><ul><ul><ul><li><name>.<stepname>.<listingname> </li></ul></ul></ul><ul><ul><ul><ul><li>Where stepname is “c”, “p”, “t”, etc </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Where listingname is the DDNAME for the listings of that step </li></ul></ul></ul></ul><ul><ul><ul><li>Examples: </li></ul></ul></ul>
    37. 37. Step 7: Test/Run your progam
    38. 38. To run your TUI program <ul><ul><li>(Assuming the Runtime Environment is configured correctly) </li></ul></ul><ul><ul><li>To test the application you just generated, </li></ul></ul><ul><ul><li>Log onto CICS </li></ul></ul><ul><ul><li>Enter the transaction ELAN </li></ul></ul><ul><ul><li>This performs the “New Copy” </li></ul></ul><ul><ul><li>operation on the program you just generated. </li></ul></ul><ul><ul><li>For example, if you generated a program MADELCP and its TUI </li></ul></ul><ul><ul><li>Form called MAP048 </li></ul></ul><ul><ul><li>Exit the ELAN transaction, and then test/run the application. </li></ul></ul>
    39. 39. To run your Batch program <ul><ul><li>(Assuming the Runtime Environment is configured correctly) </li></ul></ul><ul><ul><li>Note: For batch program generation there is a property you can set, genRunFile, that will create the sample runtime JCL for the program just generated. For more information on this see: Runtime JCL templates for z/OS in the RAD Help.) </li></ul></ul><ul><ul><li>To test the application you just generated, </li></ul></ul><ul><ul><li>Verify that the program compiled successfully and is in the appropriate object library. </li></ul></ul><ul><ul><li>Submit the JCL. </li></ul></ul><ul><ul><li>Verify the results. </li></ul></ul>
    40. 40. Miscellaneous
    41. 41. <ul><li>EGL provides sample runtime templates for execution </li></ul><ul><li>The templates that are shipped with the product are installed in the MVSTemplates or iSeriesTemplates subdirectory: </li></ul><ul><ul><li>< RADInstall >egl_cobolgeneclipsepluginscom.ibm.etools.egl. generators.cobol_<ver>MVSTemplates </li></ul></ul><ul><ul><li>< RADInstall >egl_cobolgeneclipsepluginscom.ibm.etools.egl. generators.cobol_<ver>iSeriesTemplates </li></ul></ul><ul><ul><li>File name used varies depending on function of program </li></ul></ul><ul><li>You can customize and change location of templates by setting the build descriptor option “ templateDir” </li></ul>EGL COBOL Generation: Runtime Templates
    42. 42. EGL Batch Generation – outside workbench <ul><li>The EGL software development kit (SDK) is a feature that lets you generate output in a batch environment </li></ul><ul><ul><li>Enables ANT script based generate/builds </li></ul></ul><ul><ul><li>Enables automated Builds </li></ul></ul><ul><ul><li>Still use build descriptors and all processes still work the same way </li></ul></ul><ul><ul><li>EGLSDK </li></ul></ul><ul><ul><ul><li>Generates using files from a directory in the file system </li></ul></ul></ul><ul><ul><ul><li>Self-contained jar with no need for eclipse APIs (at least external) </li></ul></ul></ul><ul><ul><ul><li>Most likely one used for Batch generations </li></ul></ul></ul><ul><ul><li>See: Generation using the EGL Software Development Kit (SDK) in the RAD Help for more information. </li></ul></ul>
    43. 43. Questions?
    44. 44. BACKUP
    45. 45. EGL Generation Process - Overview <ul><li>Code EGL Parts </li></ul><ul><li>Logic </li></ul><ul><li>Data </li></ul><ul><li>I/O </li></ul><ul><li>Build parts </li></ul>Save w/Validation RAD/WDz TCP/IP z/OS or ISeries Workstation <ul><li>EGL Project </li></ul><ul><li>EGL Source Parts </li></ul><ul><li>Build Descriptors </li></ul><ul><li>Other build parts </li></ul>Java Project containing Java code (compiled automatically) Generate Java Directories containing COBOL code, link & bind info Generate COBOL Datasets containing COBOL code, link & bind info Executables and auxiliary files Build Server Compile, link, bind
    46. 46. EGL COBOL Generation Process Overview When you change certain build file options (minimally, setting J2EE to “no”, setting a genDirectory, 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. EGL COBOL Runtime files EGL Build Descriptor (Deployment) … System = z/OSBatch z/OSCICS IMS Prep = Y/N … . COBOL Source LinkEdit Bind Build Plan Format Module …. EGL Projects Preprocessor EGL COBOL Extension for zSeries Code Generation z/OS Batch Z/OS CICS IMS Workstation z/OS EGL Build Server Prep =Y EGL JCL Build Scripts Load Modules DBRMs TCP/IP CICS IMS Batch
    47. 47. EGL COBOL Generation: Build Server on System i <ul><li>Main Job that is supplied by EGL </li></ul><ul><ul><li>ccublds executable in library QEGL (supplied by EGL) </li></ul></ul><ul><ul><li>To start, use following command on system i </li></ul></ul><ul><ul><li>SBMJOB CMD(CALL PGM(*LIBL/CCUBLDS) PARM(’-p’ ’2600’)) JOB(CCUBLDS) JOBQ(QSYS/QSYSNOMAX) </li></ul></ul><ul><li>Build Job </li></ul><ul><ul><li>FDAPREP in QEGL/QREXSRC </li></ul></ul><ul><ul><li>Started by build server when request comes in </li></ul></ul><ul><ul><li>Uses variables sent up to the System i through generation </li></ul></ul><ul><ul><li>Runs online build commands based on information sent from the client </li></ul></ul><ul><li>Note: See for more setup information: </li></ul><ul><ul><li>EGL Server Guide for iSeries (SC31-6841) </li></ul></ul><ul><ul><ul><li>Also on EGL zone in Developerworks </li></ul></ul></ul>
    48. 48. EGL COBOL Generation: Customization on System i <ul><li>The EGL Build Process can be customized </li></ul><ul><ul><li>Modify the FDAPREP REXX program </li></ul></ul><ul><ul><ul><li>Contains “sections” depending on contents of program </li></ul></ul></ul><ul><ul><ul><ul><li>SQL </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Called program </li></ul></ul></ul></ul><ul><ul><ul><ul><li>etc </li></ul></ul></ul></ul><ul><ul><li>Example customization </li></ul></ul><ul><ul><ul><li>Setting DB2 interface method </li></ul></ul></ul><ul><ul><ul><ul><li>SQL vs System </li></ul></ul></ul></ul><ul><ul><li>.evf files provide parameters </li></ul></ul>
    49. 49. EGL COBOL Generation: Functions used on System i <ul><li>Function names passed to FDAPREP to drive build process </li></ul>Called Programs that contain SQL PSC Called programs with no SQL PCL Main (5250/Batch) programs with SQL PSM Runtime CL’s for called programs WSC Runtime CL’s for main programs WCL EGL user messages or messageTable file TCM Print Services Programs PPM Main (5250/batch) programs with no SQL PMN
    50. 50. EGL COBOL Generation: Default System I files <ul><li>Files MUST be created in target destination library </li></ul><ul><li>Can create using following command </li></ul><ul><ul><li>STRREXPRC SRCMBR(EGLSETUP) PARM(xxxxxxxx) Where xxxxxxxx is the destination library </li></ul></ul>QVGNDDS Data Definition Specs (DDS) QVGNMSGS Message Files destLibrary value in build file Load library (physical files) QVGNCBLS <ul><li>COBOL Source Library </li></ul><ul><li>Print Services Program </li></ul>QVGNMAPG Form Group Modules QVGNCLS Runtime CLs QVGNTAB Table Binary Images QVGNEVF Generation Variables File Physical file Name Description
    51. 51. Common Build Descriptor Options for COBOL Gen on i Many others…see EGL Helps! ( hint: Select line and press f1 help will open for option Library on System i to send the generated outputs destLibrary Tells generator to send the generated output to the EGL Build Server prep Target system for generation System Tells generator to also generate any “used” help form groups in a program (for 5250 programs) genHelpFormGroup Name of folder in file system ( not workspace ) that the generated output will be written to genDirectory Port number on which EGL build server is listening destPort Host UserID used for build (case sensitive) destUserId Tells generator to also generate any “used” dataTables in a program genDataTables Tells generator to also generate any “used” form groups in a program (for 5250 programs) genFormGroup Password of UserID that is being used for build (case sensitive) destPassword Host name of machine containing the EGL build server destHost
    52. 52. EGL COBOL Generation: Buildplan.xml for System i <ul><li>BuildPlan.xml file controls build server……How?? </li></ul><ul><ul><li>What to run on build server </li></ul></ul><ul><ul><ul><li>Via “ parms” </li></ul></ul></ul><ul><ul><ul><li>Invokes REXX program </li></ul></ul></ul><ul><ul><li>Host information </li></ul></ul><ul><ul><ul><li>Via “ host name ” </li></ul></ul></ul><ul><ul><ul><li>Location/port </li></ul></ul></ul><ul><ul><ul><li>Code Pages for conversion </li></ul></ul></ul><ul><ul><li>Location of generated files </li></ul></ul><ul><ul><ul><li>Via “ input files ” and “ dependencies ” </li></ul></ul></ul><ul><ul><li>Substitution information </li></ul></ul><ul><ul><ul><li>via “ env ” names </li></ul></ul></ul><ul><ul><ul><li>+ </li></ul></ul></ul><ul><ul><ul><li>.evf file </li></ul></ul></ul>
    53. 53. EGL COBOL Generation: Where to find failures for i? <ul><li>Listings contained in: </li></ul><ul><ul><li><genname>.ccubldc.log </li></ul></ul>

    ×