• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

exit programs

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

  • exit programs

    I have a Session login program. Upon logon it first removes all groups for the user from VVUSRAUTH and grants the user access to groups based on some menu access and authority control files we have within our application. It enables us to leverage the access controls we already have and avoids us having to the tedious user-group maintenance in the portal.

    One of the files this exit program uses is VVUSERS. Well come to find out that VVUSERS got a new 23rd field at some point after this exit program was compiled and installed. I will be changing that program from native to SQL here shortly, but the point is it was not doing anything because it was level checking on VVUSERS. It took me a while to figure out what was going on. We would grant users menu access to stuff in our application and the session login program was supposed to put that in Valence next time the user logs in. That wasn't happening because the login program was level-checking and did nothing at all. It did not revoke the user's existing vvusrauth group assignments either. The point of the post is: the call to the exit program failed completely and yet the user was able to log on just fine. That tells me calls to customer exit programs are monitored. At long last I did figure out what was going on and I did see errors in VVERRLOG (Note to self: review that log on a DAILY BASIS!) but the question I am posing here is: if I have an exit program on something and I do not want the action that invoked said exit program to continue if it fails, how would I accomplish that?

  • #2
    You could put some wrapper logic into the exit program to accommodate that. Just move the logic for your session login routine into a standalone program, then call it from the first-level exit program with an on-error trap, setting the abort flag on if it blows up.

    The wrapper would look something like this (assuming it's modeled on EXEXITPGM):
    Code:
    if vvExitMode='LOGIN';
      monitor;
        call your_exit_program;
      on-error;
        vvAbort='1';
        IOexitDS=exitDS;
        vvOut_toJSONpair('success:false,fld:user,lit:genericMsg,'+
                         'var1:Error encountered in your_exit_program. Call IT!');
      endmon;
    endif;
    Last edited by robert.swanson; 07-30-2021, 03:16 PM.

    Comment

    Working...
    X