Skip to main content
Nelson Schroth
Participating Frequently
Oct 29, 2021 3:00 PM UTC
Question

Calling another program with release

I have a need to track some statistics with Web Services operations.  The U2 programs that run under the covers all call a subroutine that picks up some control file flags, so it seems like that would be the place to log the stats (one program change covers all 22 operations)

I do not want to impact the responsiveness of the web services any more than necessary.  I see the following choices:
  1. hard code the stats update logic in the shared control flag pickup subroutine
  2. call a new external subroutine that actually does the stats update
  3. find a way to call the external subroutine and keep going while the external subroutine continues until it has finished updating the appropriate stats (kind of call and release).  Unfortunately, I do not see such a command in U2 Basic (not CALL, EXECUTE, PERFORM or CHAIN).
If anyone can offer some real world advice or suggestions, I would appreciate it.

Nelson

    2 replies

    Manu Fernandes
    Inspiring
    Oct 29, 2021 5:55 PM UTC
    I have a need to track some statistics with Web Services operations.  The U2 programs that run under the covers all call a subroutine that picks up some control file flags, so it seems like that would be the place to log the stats (one program change covers all 22 operations)

    I do not want to impact the responsiveness of the web services any more than necessary.  I see the following choices:
    1. hard code the stats update logic in the shared control flag pickup subroutine
    2. call a new external subroutine that actually does the stats update
    3. find a way to call the external subroutine and keep going while the external subroutine continues until it has finished updating the appropriate stats (kind of call and release).  Unfortunately, I do not see such a command in U2 Basic (not CALL, EXECUTE, PERFORM or CHAIN).
    If anyone can offer some real world advice or suggestions, I would appreciate it.

    Nelson
    Why not starting a PHANTOM ?
    EXECUTE 'PHANTOM PROG ARGS'...?
    Nov 5, 2021 9:06 AM UTC
    I have a need to track some statistics with Web Services operations.  The U2 programs that run under the covers all call a subroutine that picks up some control file flags, so it seems like that would be the place to log the stats (one program change covers all 22 operations)

    I do not want to impact the responsiveness of the web services any more than necessary.  I see the following choices:
    1. hard code the stats update logic in the shared control flag pickup subroutine
    2. call a new external subroutine that actually does the stats update
    3. find a way to call the external subroutine and keep going while the external subroutine continues until it has finished updating the appropriate stats (kind of call and release).  Unfortunately, I do not see such a command in U2 Basic (not CALL, EXECUTE, PERFORM or CHAIN).
    If anyone can offer some real world advice or suggestions, I would appreciate it.

    Nelson
    If on UniVerse and using a PHANTOM command here (which sound s a useful approach)  it's worth adding NOTIFY IGNORE first.