ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

callp(E) ANYTHING in call stack

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by Barbara Morris View Post

    No, I think you need to make BHFWSINT a linear main program. I think that's the one that's getting the inquiry message due to the failed call to C, right? Inquiry messages are issued for RPG programs if the cycle-main program is DFTACTGRP(*YES) or if it is on a control boundary. Looking at your stack, PGMB is on a control boundary, so that's the one you have to prevent getting an inquiry message.

    From your program stack listing, I assume BHFEIINT is ACTGRP(*CALLER), so any unhandled error messages will percolate to its caller.

    But since getting inquiry messages is Not A Good Thing in your environment, it would probably be a good idea to prevent any RPG program from issuing an inquiry message if it crashes, either by avoiding the RPG cycle, and/or by adding MONITORs. MONITOR is a good way to handle this, but then you to have some way of communicating errors back to your caller.
    Code:
    [FONT=courier new]Program Actgrp Number Control Boundary
    QZRCSRVS QSYS *DFTACTGRP 0000000000000001 Yes
    QZRCSRVS QSYS *DFTACTGRP 0000000000000001 No
    QZRCSRVS QSYS *DFTACTGRP 0000000000000001 No
    WS00000000 DVBDCOBJ *NEW 000000000000001A Yes PGM0 (program-entry-procedure)
    WS00000000 DVBDCOBJ *NEW 000000000000001A No (main procedure)
    WS00000000 DVBDCOBJ *NEW 000000000000001A No (some other procedure)
    BHFPBRATE DVBDCOBJ *NEW 000000000000001A No PGMA (program-entry-procedure)
    BHFPBRATE DVBDCOBJ *NEW 000000000000001A No (main procedure)
    [B]BHFWSINT DVBDCOBJ *DFTACTGRP 0000000000000002 [COLOR=#FF0000]Yes[/COLOR] PGMB (program-entry-procedure)[/B]
    BHFWSINT DVBDCOBJ *DFTACTGRP 0000000000000002 No (main procedure)
    BHFEIINT DVBDCOBJ *DFTACTGRP 0000000000000002 No PGMC (program-entry-procedure)
    BHFEIINT DVBDCOBJ *DFTACTGRP 0000000000000002 No (main procedure)
    QRNXUTIL QSYS *DFTACTGRP 0000000000000002 No[/FONT]
    Here is the msgw...

    Additional Message Information

    Message ID . . . . . . : RNQ0202 Severity . . . . . . . : 99
    Message type . . . . . : Inquiry
    Date sent . . . . . . : 02/13/17 Time sent . . . . . . : 03:00:05

    Message . . . . : The call to *LIBL/BHFEIINT ended in error (C G D F).
    Cause . . . . . : RPG procedure BHFWSINT in program SQBDCOBJ/BHFWSINT at
    statement 506 called program or procedure *LIBL/BHFEIINT, which ended in
    error. If the name is *N, the call was a bound call by procedure pointer.
    Recovery . . . : Check the job log for more information on the cause of the
    error and contact the person responsible for program maintenance.
    Possible choices for replying to message . . . . . . . . . . . . . . . :
    D -- Obtain RPG formatted dump.
    S -- Obtain system dump.
    G -- Continue processing at *GETIN.
    C -- Cancel.
    More...
    Type reply below, then press Enter.
    Reply . . . .

    F3=Exit F6=Print F9=Display message details
    F10=Display messages in job log F12=Cancel F21=Select assistance level



    Here is the call stack at this point...

    Display Call Stack
    System: S10B5181
    Job: QZRCSRVS User: QUSER Number: 225312
    Thread: 00000013

    ------Activation Group------ Control
    Type Program Name Number Boundary
    QZRCSRVS QSYS *DFTACTGRP 0000000000000001 Yes
    QZRCSRVS QSYS *DFTACTGRP 0000000000000001 No
    QZRCSRVS QSYS *DFTACTGRP 0000000000000001 No
    WS00000000 SQBDCOBJ *NEW 000000000000001A Yes PGM0 (program-entry-procedure)
    WS00000000 SQBDCOBJ *NEW 000000000000001A No (main procedure)
    WS00000000 SQBDCOBJ *NEW 000000000000001A No (some other procedure)
    BHFPBRATE SQBDCOBJ *NEW 0000000000000016 No
    BHFPBRATE SQBDCOBJ *NEW 0000000000000016 No
    BHFWSINT SQBDCOBJ *DFTACTGRP 0000000000000002 Yes
    BHFWSINT SQBDCOBJ *DFTACTGRP 0000000000000002 No
    BHFEIINT SQBDCOBJ *DFTACTGRP 0000000000000002 No
    QRNXIE QSYS *DFTACTGRP 0000000000000002 No
    QRNXIE QSYS *DFTACTGRP 0000000000000002 No
    More...
    F3=Exit F5=Refresh F11=Display statements F12=Cancel F16=Job menu
    F17=Top F18=Bottom F22=Display entire field



    and yes, BHFEIINT is *CALLER

    The rest of the stack is...

    WS00000000 = *NEW
    BHFPBRATE = *CALLER
    BHFWSINT = Runs in DFTACTGRP
    BHFEIINT = *CALLER

    So if I changed BHFWSINT to be *CALLER, would everything not percolate all the way up to WS00000000 and solve my issue for this particular stack?
    Last edited by jayvaughn; February 13, 2017, 07:24 AM.

    Comment


    • #17
      Yes, if all of BHFPBRATE, BHFWSINT, and BHFEIINT were *CALLER, then everything would percolate up to WS00000000.

      (Strangely, the activation group numbers for WS00000000 and BHFPBRATE are different (000000000000001A vs 0000000000000016) in your new post, but they are the same (000000000000001A) in your original post and my reply. I almost said that there was a control boundary at BHFPBRATE because of the different actgrp number, but then I noticed the "no" in the ctl-boundary column.)

      Comment

      Working...
      X