CICS

CICS

CICS

The world's leading application server software for IBM Z

 View Only
  • 1.  CICS CEDF displays line number from program during trace process

    Posted Wed April 19, 2023 09:15 AM
    Hello,


    Where does CICS CEDF function get program line number from in order to display it on screen?

    It would be useful in messages during Error or ABEND handling,
    but I cannot find where it is returned.


    Any suggestions?


    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: CICS CEDF displays line number from program during trace process

    Posted Thu April 20, 2023 08:37 AM

    Hi Gregory,

    It is put in there but the translator and I think imbedded in the call to CICS but whether we document that I am not sure.

    I looked at the job log of a translate and compile of a C program and the translator reports this line:
       00005800   EXEC CICS ADDRESS EIB(dfheiptr) COMMAREA(&rexx_data);
    and the compiler reported the translator produced line :
       116       | /* EXEC CICS ADDRESS EIB(dfheiptr) COMMAREA(&rexx_data) */                                       |   2667
       117       | {                                                                                                |   2668
       118       | DFHEXEC("\x02\x02\xC0\x00\x2F\x05\x06\x00\x00\x00\x00\x00\x00\x00\x00\\                          |   2669
       119       |x00\x00\x00\x00\x00\x00\x00\xF0\xF0\xF0\xF0\xF5\xF8\xF0\xF0",&dfheiptr,\                          |   2670
       120     1 |&rexx_data);                                                                                      |   2671
       121       |   }                                                                                              |   2672
    so  I am pretty certain the end of the first argument passed to CICS is the line number. Sadly without using an exit to access the data when CICS is called I do not think it is easily available.

    Would be a good candidate for an idea though - https://ideas.ibm.com/new-idea


    ------------------------------
    Andy Clifton
    ------------------------------



  • 3.  RE: CICS CEDF displays line number from program during trace process

    Posted Thu April 20, 2023 10:47 AM
    Hello,


    Is LINE number in the COBOL source for the program possibly embedded in one of the fields the dfheiblk that the translator adds in to the program?


    000651 01 dfheiblk.
    000652 02 eibtime comp-3 pic s9(7).
    000653 02 eibdate comp-3 pic s9(7).
    000654 02 eibtrnid pic x(4).
    000655 02 eibtaskn comp-3 pic s9(7).
    000656 02 eibtrmid pic x(4).
    000657 02 dfheigdi comp-5 pic s9(4).
    000658 02 eibcposn comp-5 pic s9(4).
    000659 02 eibcalen comp-5 pic s9(4).
    000660 02 eibaid pic x(1).
    000661 02 eibfn pic x(2).
    000662 02 eibrcode pic x(6).
    000663 02 eibds pic x(8).
    000664 02 eibreqid pic x(8).
    000665 02 eibrsrce pic x(8).
    000666 02 eibsync pic x(1).
    000667 02 eibfree pic x(1).
    000668 02 eibrecv pic x(1).
    000669 02 eibfil01 pic x(1).
    000670 02 eibatt pic x(1).
    000671 02 eibeoc pic x(1).
    000672 02 eibfmh pic x(1).
    000673 02 eibcompl pic x(1).
    000674 02 eibsig pic x(1).
    000675 02 eibconf pic x(1).
    000676 02 eiberr pic x(1).
    000677 02 eiberrcd pic x(4).
    000678 02 eibsynrb pic x(1).
    000679 02 eibnodat pic x(1).
    000680 02 eibresp comp-5 pic s9(8).
    000681 02 eibresp2 comp-5 pic s9(8).
    000682 02 eibrldbk pic x(1).


    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: CICS CEDF displays line number from program during trace process

    Posted Thu April 20, 2023 12:17 PM

    Sorry Gregory, I may have confused things by using the first EXEC CICS call in my translate and compile of a C program. Being a C program, CICS does not set up addressability to the EXEC Interface Block (unlike Cobol. PL/1 or Assembler) so the programmer has to do it themselves.  "dfheiptr" is simply the pointer I am using in my C program to that block. 

    The Contents of the data area re documented at EIB - EXEC interface block - IBM Documentation.

    I should have explained a bit better that the source line was 0005800 in the translator listing which can then be seen at the end of the first argument to function DFHEXEC in the compiler listing. It is not immediately visible as the argument is entered as a series of escaped EBCDIC hex characters \xF0\xF0\xF0\xF0\xF5\xF8\xF0\xF0.

    I mentioned submitting an idea to the development team to make the line number available and, speaking personally,  putting it in the exec interface block along with the various existing values could be the place. 



    ------------------------------
    Andy Clifton
    CICS Test and Consolidated Service Test
    IBM Hursley Park
    ------------------------------



  • 5.  RE: CICS CEDF displays line number from program during trace process

    Posted Thu April 20, 2023 10:56 AM
    You mentioned 'dfheiptr', but not sure how to use it.



    I found addressability is achieved by using the command:

    EXEC CICS

    ADDRESS EIB(WS-PTR)

    END-EXEC.

    How do I declare WS-PTR in COBOL?
    I tried
    01 WS-PTR PIC X(1000)
    and that compiled.

    X(1000) was a guess size.
    But it is not clear how to determine fields in the up to X(1000) area.
    I was thinking to declare WS-PTR like this, since the thought is that the line number is first in the EIB,
    and this compiles.
    01 WS-PTR.
    02 WS-LINE PIC 9(8).
    02 WS-OTHER PIC X(1000).

    Now, to try to get program to show me what is in WS-LINE.


    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.




  • 6.  RE: CICS CEDF displays line number from program during trace process

    Posted Thu April 20, 2023 11:26 AM
    Managed to get to see first 70 characters of WS-PTR group, and I expect there is more.


    Ž- E081E0A1E0C1E0E1E101E121E142002480248044A024A0456025604560656105E0


    No idea how to interpret it?

    Any suggestions?


    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.




  • 7.  RE: CICS CEDF displays line number from program during trace process

    Posted Fri April 21, 2023 11:53 AM

    Gregory,

    Are you compiling a COBOL or PL1 program.  In COBOL you have (by default) Addressability to the EIB.

    However, the line number is not available in the EIB in either case so not sure that will help you. 

    As the line number is only available for CICS command failures and not standard COBOL errors, you can write an error routing that knows where all the CICS Commands are in the program, perhaps by paragraph and put out a message that way.  I have done this quite successfully in the past.



    ------------------------------
    Ezriel Gross
    Rocket Software
    Waltham NJ
    17816842672
    ------------------------------



  • 8.  RE: CICS CEDF displays line number from program during trace process

    Posted Fri April 21, 2023 12:01 PM
    The program is COBOL and is being executed in CICS.


    I am looking for line numbers for the EXEC CICS commands and not the COBOL lines.

    Line numbers are not available in the EIB block, but would be nice if they were.


    Creating a paragraph with line numbers is an interesting idea,
    but then it becomes a maintenance nightmare if any changes are made to the program.


    I was hoping that since CEDF seems to be able to do it,
    then it should be possible to replicate that logic if there was a way to see how CEDF is able to get the line number dynamically.


    I wonder if the code behind the CEDF trace might be available somewhere to see how it is done,
    since I cannot find anything in the documentation about how this might be done.


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

    [cid:image002.jpg@01D8A2A0.BD7F1900]







  • 9.  RE: CICS CEDF displays line number from program during trace process

    Posted Thu April 20, 2023 09:17 AM

    Hi Gregory,

    I have looked for this as well, as I use the line number as it comes out of CICS trace.   Interestingly it is only available with EI=2 trace level, Trace points AP E160 - AP E161.  

    Just an additional note, the line numbers are produced by the "DEBUG" CICS translator option by default, but you may find someone that has turned them off.

    From the manual:

    DEBUG
    (COBOL, C, C++, and PL/I only)
    DEBUG instructs the translator to produce code that passes the line number through to CICS for use by the execution diagnostic facility (EDF). DEBUG is the default; NODEBUG is the alternative. 




    ------------------------------
    Ezriel Gross
    Rocket Software
    Waltham NJ
    17816842672
    ------------------------------