CICS

CICS

CICS

The world's leading application server software for IBM Z

 View Only
  • 1.  JCL sample to compile COBOL program for CICS using integrated translator

    Posted Mon May 01, 2023 01:40 PM
    Hello,


    I have a cobol program to compile for CICS that has EXEC CICS statements in several of the COPY books.

    I have been using the translator pre-processor followed by COBOL compiler,
    but the translator does not translate the statements in the COPY books.


    I considered pre-translating the COPY books, but could not work out how to do this.

    Any samples or suggestions about this would be of interest.


    The integrated translator looks like a great solution, but I cannot find any good examples of how to set this up in JCL. Any samples or suggestions would be great.


    Regards,
    Gregory Oakes
    Professor
    Faculty of Science, Engineering and Information Technology
    Durham College

    [cid:image002.jpg@01D8A2A0.BD7F1900]
    ________________________________
    This message is intended only for the named recipients. This message may contain information that is confidential or exempt from disclosure under applicable law. Any dissemination or copying of this message by anyone other than a named recipient is strictly prohibited. If you are not a named recipient or an employee or agent responsible for delivering this message to a named recipient, please notify us immediately, and permanently destroy this message and any copies you may have. Warning: Email may not be secure unless properly encrypted.


  • 2.  RE: JCL sample to compile COBOL program for CICS using integrated translator

    Posted Mon May 01, 2023 02:11 PM

    Back in the day before the integrated translator, if you had PROCEDURE DIVISION copybooks that contained EXEC CICS commands, you would need to run a translator step against the copybook and store the translated output into a different copy library which would be input to the compile job.  But that procedure imposed a burden on the application developer or the DevOps team as whenever the copied code change, someone had to remember to run the translator and store the output in the 2nd copy library.

    So, CICS & COBOL development gave us the integrated translator.  At the time that the copy source is imported by the compiler, it is run through the CICS translator so that there's no need to maintain two versions of the copied code.

    > I cannot find any good examples of how to set this up in JCL.

    Fortunately, CICS delivers sample JCL procedures in SDFHPROC.  <hlq>.CICS.SDFHPROC(DFHZITCL) contains the sample JCL to compile & link-edit your COBOL program.



    ------------------------------
    Leigh Compton
    Consulting IT Specialist - CICS and Enterprise Integration
    IBM
    TX
    ------------------------------



  • 3.  RE: JCL sample to compile COBOL program for CICS using integrated translator

    Posted Mon May 01, 2023 05:47 PM
    Hello,


    Thanks for the pointer to <hlq>.CICS.SDFHPROC(DFHZITCL).

    I found the file.


    I have a few small problems:

    1) The process was not finding the COPY books.


    - I solved this by adding a new DD under the SYSLIB for COBOL
    that was passed in by primary JCL with the DSName of the PDS that contains
    the main cobol source, and all the COPY books for the program.


    //SYSLIB DD DSN=&DSCTLIB,DISP=SHR
    // DD DSN=&PROGSRC,DISP=SHR


    2) I am using EXEC CICS INQUIRE commands, so the SP option was needed.


    - I solved it by adding if like it is shown. Also, I deleted the SIZE option that is not needed.
    This I found after a google search that discussed how someone else solved this.


    This original CBLPARM


    // CBLPARM=('NODYNAM,RENT', Compiler options

    // 'SIZE(4000K),CICS(''COBOL3'')'), Translator options


    changes to this CBLPARM


    // CBLPARM=('NODYNAM,RENT', Compiler options
    // 'CICS(''COBOL3,SP'')'), Translator options


    3) In main JCL, I added a few parameters on EXEC statement

    - PROGLIB which the procedure uses, and is the load library to store the compiled program in

    - PROGSRC which is the PDS dataset that holds the cobol source and copy books

    - PROGMNR which is the name of the cobol source member in PROGSRC, and should be the name of the compiled program stored in PROGLIB after LKED step


    //COBOL.SYSIN DD DSN=&PROGSRC(&PROGMBR),DISP=SHR
    //LKED.SYSIN DD *
    NAME CMINQFDX(R)
    /*


    4) I was trying to change the LKED step to not use DD * and use DSN with some syntax for the member name to store, but this did not work. I might try a few more ideas, but any suggestions would be helpful.


    //LKED.SYSIN DD DSN=&PROGLIB(&PROGMBR),DISP=SHR

    - this does not work, and LKED step fails


    //LKED.SYSIN DD *
    NAME &PROGMBR(R)
    - this does kind of work,
    except it saved program as '&PROGMBR' in PROGLIB library
    Not quite what I expected or wanted.

    //LKED.SYSIN DD DSN=&PROGMBR(R)
    - this is trying to create a dataset with PROGMBR name, and cannot

    I was hoping to use the parameter PROGMBR for the input to LKED step, but cannot figure out a way to do it./

    Thanks,
    Greg



    Regards,
    Gregory Oakes
    Professor
    Faculty of Science, Engineering and Information Technology
    Durham College

    [cid:image002.jpg@01D8A2A0.BD7F1900]
    ________________________________
    This message is intended only for the named recipients. This message may contain information that is confidential or exempt from disclosure under applicable law. Any dissemination or copying of this message by anyone other than a named recipient is strictly prohibited. If you are not a named recipient or an employee or agent responsible for delivering this message to a named recipient, please notify us immediately, and permanently destroy this message and any copies you may have. Warning: Email may not be secure unless properly encrypted.




  • 4.  RE: JCL sample to compile COBOL program for CICS using integrated translator

    Posted Tue May 02, 2023 08:59 AM
    I am getting this error/warning during the JCL compile process.


    MEMBER DFHAPIR NOT FOUND


    Should I worry about this, or is there something I should set up to stop this message:


    IEF764I CMINQFDX COMPLI COBOL DFHAPIR DFHEIMOD PARMLIB READ FAILED - MEMBER DFHAPIR NOT FOUND.


    After some searching, I found this: https://knowledge.broadcom.com/external/article/214100/endevor-generate-getting-an-ief764i-memb.html


    The message "IEF764I xxxxxxxx NDVRBAT DFHAPIR DFHEIMOD PARMLIB READ FAILED - MEMBER DFHAPIR NOT FOUND" is not a problem and does not cause the generate to fail. The message arises during the execution of the CICS preprocessor DFHECP1$ and means that the program has failed to find a member (DFHAPIR) which resides in SYS1.PARMLIB or any equivalent library searched by the system.



    and this: https://www.ibm.com/docs/en/cics-ts/5.6?topic=configuring-controlling-use-specific-cics-api-spi-commands


    The CICS translator attempts to read a DFHAPIR member. If a DFHAPIR member is not found, informational message IEF764I is issued. If a DFHAPIR member is found, informational message IEE252I is issued stating in which PARMLIB the member was located.

    If a DFHAPIR member is found, the CICS translator reads the list of restricted commands and keywords defined and uses this list to check program source during translation. If a DFHAPIR member is not found, no restrictions are applied.

    The check is performed only when a source program is being translated, and does not affect translated programs. If you want to ensure compliance by all application programs, you need to recompile your programs.


    Regards,
    Gregory Oakes
    Professor
    Faculty of Science, Engineering and Information Technology
    Durham College

    [cid:image002.jpg@01D8A2A0.BD7F1900]
    ________________________________
    This message is intended only for the named recipients. This message may contain information that is confidential or exempt from disclosure under applicable law. Any dissemination or copying of this message by anyone other than a named recipient is strictly prohibited. If you are not a named recipient or an employee or agent responsible for delivering this message to a named recipient, please notify us immediately, and permanently destroy this message and any copies you may have. Warning: Email may not be secure unless properly encrypted.




  • 5.  RE: JCL sample to compile COBOL program for CICS using integrated translator

    Posted Tue May 02, 2023 01:22 PM

    As the web pages state, the IEF764I message is simply informational.  

    DFHAPIR is an optional member of SYS1.PARMLIB.  In this member, you can set up "policies" that control the translation of CICS commands.  One reason to create these policies is to enforce coding standards.  For example, in an environment where the CICS systems programmers have implemented remote resources and dynamic routing, you might have a standard that the application programmer should not include the SYSID parameter on any command.  You can code this as a rule in DFHAPIR and if the SYSID parameter is found during translation of the program, an error is thrown and the translation completes with a return code of 12.

    If the IEF764I message is annoying, you can simply create a DFHAPIR member in SYS1.PARMLIB with no restrictions.  Your job will receive message IEE252I indicating that the DFHAPIR member was found.  You might consider having your systems programmers create a separate parmlib dataset for you so that you can be given the authorization to create and update a DFHAPIR member without affecting their parmlib datasets and members.

    And, as you're interested in the whole process of translation and compilation, you might enjoy reading this article in Enterprise Tech Journal from 2021 --> https://mydigitalpublication.com/publication/?m=23234&i=708161&p=24&ver=html5



    ------------------------------
    Leigh Compton
    Consulting IT Specialist - CICS and Enterprise Integration
    IBM
    TX
    ------------------------------