EGL Development User Group

EGL Development User Group

EGL Development User Group

The EGL Development User Group is dedicated to sharing news, knowledge, and insights regarding the EGL language and Business Developer product. Consisting of IBMers, HCL, and users, this community collaborates to advance the EGL ecosystem.

 View Only
  • 1.  DUALMODE EGL Cobol generation for z/os

    Posted Mon July 24, 2017 10:44 PM

    Hi,

    Has anyone used the dualmode option to generate an EGL application for both Batch and CICS.

    I have read the page https://www.ibm.com/support/knowledgecenter/SSMQ79_9.5.1/com.ibm.egl.gg.doc/topics/gegl_cobol_dualmode.html but it does not tell you how to do it in detail.

    What I am missing:

    Where do I set the dualmode symbolic parameter and with what value?

    How do I specify a different bind package for batch and cics in the build descriptor?

    Is there a more detailed explanation on dualmode than what is provided in the link above?

    Thank you

    Regards

    Bruce

    dcsprodsupt


  • 2.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Thu July 27, 2017 02:22 PM

    Hi Bruce.

     

    Yes, the dualmode feature is used by several companies. It allows you to generate once and use the same load module in both batch and CICS.

    Be aware that there are restrictions:

    (1) if it contains SQL, it must be bound twice, once for each environment

    (2) no file I/O can be used as CICS will not know how to handle batch-type I/O

    Think of the program as a batch program that can also run under CICS. In order to use dualmode, you need to set the DUALMODE symparm with a value of YES. This is done in your EGL build descriptor. When you use the built-in editor for RBD for the build descriptor, you will see on the right-hand side a grid that allows you to enter various parameters. These are called symbolic parameters, or symparms for short. It is there you add one called dualmode and specify the value as yes.

    Once you generate the program with dualmode set, then the generated COBOL source will call slightly different initialization routines. These routines will be linked with the program and it is here that the logic automatically determines which environment the program is running in. It will set up the appropriate runtime for you.

     

    JeffDouglas


  • 3.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Fri July 28, 2017 11:42 AM

    Hi Jeff!

    I will seize the opportunity, to ask for another approach to gain DUALMODE functionality :)

    Is it possible to define more than one EGL build descriptor for generatable parts? I couldn't find it in RBD UI, but I have a feeling, that it is possible in XML configuration files.

    Sincerely,
    Goran

    starki7


  • 4.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Fri July 28, 2017 12:58 PM

    Sure, you can define any number of build descriptors. There can be multiple individual ones, or any number of ones that "chain" off of others. If you use the "next build descriptor" option selection in the build descriptor editor (see left-hand side in build descriptor edit session), you can select this and have it point to another build descriptor. Then those descriptors will be combined. Of course there can be any number of descriptors involved in this chain.

    For example, you could have build descriptor A pointing to build descriptor B, which points at build descriptor C. If A also contains the dualmode symparm, then when you generate using A, it will pick that up, along with the other settings from A as well as from B and C. This is a good way to isolate specific options to prevent redundancy.

    JeffDouglas


  • 5.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Fri July 28, 2017 01:12 PM

    Let me rephrase the question, I have program A, and  build descriptor B for batch and C for CISC.
    What I would like to achieve, it to set build descriptors B and C as (default) descriptors for A, in that order, so when I press Generate on A, it generates with B and C (for batch and CICS).

    I have tried chaining, but didn't get it to work that way?

    It can be achieved with Generate With Wizard, but I don't know how to save that setting for later use with Generate.

    starki7


  • 6.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Fri July 28, 2017 10:17 PM

    Only from Ant or the wizard can you cause more than 1 generations to occur. You are describing the automatic generate process by using ctrl-G, which only allows 1 build for cobolgen along with (if desired) 1 build for javagen. There is no setting process that will cause multiple cobolgen generations to occur with ctrl-G.

    However, with dualmode, you could (in most cases) generate once (for batch, with dualmode active) and then use that load module for both batch and cics. It depends on what the egl application does.

    JeffDouglas


  • 7.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Sat July 29, 2017 07:16 AM

    Thank You Jeff!

    We can't use DUALMODE, because modules use SQL and we have two more generation environments, for MQ and RRSAF.
    I think we will do it with UCD.
    By the way, is UCD still in the RBD roadmap, and is there a new RBD roadmap?

    Sincerely,
    Goran

    starki7


  • 8.  Re: DUALMODE EGL Cobol generation for z/os

    Posted Tue August 01, 2017 02:32 AM

    Thanks Jeff. With that info and a lot of trial and error we got it working.

    Followed the steps from the website in the original question.

    The other steps we did:

     

    In the Build Descriptor panel:

     

    Create a new linkedit part:

     

    ENTRY %EZEALIAS%

     REPLACE DSNELI

     INCLUDE INPUT(%EZEALIAS%)

     INCLUDE SYSLIB(DSNCLI)

     NAME %EZEALIAS%(R)

     

     

    Create new bind part:

     

    Copy bind member and duplicate contents and change second PLANPKG to PLANPKG2.

     

    DSN SYSTEM(%DSYS%)

    BIND PACKAGE(%PLANPKG%) -

    MEMBER(%EZEALIAS%) -

    ACT(REP) -

    VALIDATE(BIND) -

    CURRENTDATA(NO) -

    ISOLATION(CS) -

    OWNER(%OWNER%) -

    QUAL(%OWNER%) -

    LIB('%EZEPID%.%SYSTEM%.DBRMLIB')

    BIND PACKAGE(%PLANPKG2%) -

    MEMBER(%EZEALIAS%) -

    ACT(REP) -

    VALIDATE(BIND) -

    CURRENTDATA(NO) -

    ISOLATION(CS) -

    OWNER(%OWNER%) -

    QUAL(%OWNER%) -

    LIB('%EZEPID%.%SYSTEM%.DBRMLIB')

     

     

    Create a new Build Descriptor part:

    Set system as ZOSBATCH.

    Link in the new bind and linkedit parts.

    Add the new Symbolic parameters DUALMODE and PLANPKG2.

     

     

     

    dcsprodsupt