No announcement yet.

How to get Valence User No?

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get Valence User No?

    Hi Guys, I have an actual Valence question for a change. I'm trying to use vvSecure_isMember, which I've used a million times to see what security group the logged in user is in. I use vvUtility_getCurrentUser with no parms to get logged in user, then feed that to vvSecure command. getCurrentUser returns a 64a varying.

    The twist here is I am pulling a i5 Userid (same as Valence Id here) from a file, I want to check vvSecure_isMember with that User. But vvSecure wants a User Id number, not the User Id. How do I get that to feed isMember?

  • #2
    Hi Terry,

    You'd probably need to go directly at the VVUSERS file to get that Valence ID. i.e.,
    select vvusrid into :valenceID from vvusers where vvibmiuser=:ibmiUser;


    • #3
      I am adding a link to the documentation for vvUtility. Find getCurrentUser and you will see that you can pass it additional parameters to get what you are looking for. In your case, I believe you just need to pass one additional parameter.



      • #4
        Hi Terry -

        Don't want to add any confusion, I misunderstood your original post. getCurrentUser would not be helpful in your case.


        • #5
          Yeah that will work fine, Robert, thank you! I see you even have a LF (VVUSERS3) with IBM i5 Id as key. That opens door to RPG CHAIN also. Take care!