• 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.

Swapping user

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

  • Swapping user

    Hello,
    I am using a trial version of Valence 6 and trying to call an RPG program on the server that needs the IBMi user id to create a copy of a sales order. The backend program fails because the user id is coming over as QTMHHTTP. I tried retrieving the IBMi user id by including vvUtility_getCurrentUser(UserNum:IBMiUser), then using vvUtility_ovrUsr('1':*blank:IBMiUser) to override QTMHHTTP to the IBMi user id. I get a '1' response after _ovrusr, but the RPG program still shows QTMHHTTP as the user. Can someone give me an example of how this works.
    Thanks,
    Bruce Wilson

  • #2
    First...how are you logging in? Are you using an IBM I username to login?

    Comment


    • #3
      Also, how is your RPG program pulling in the user ID?

      This blog post may be helpful...
      Programs running on IBM i routinely need to retrieve the specific user ID associated with the person executing the code. In traditional interactive 5250 programs, the user ID is often accessed in RPG through the program status data structure, or by making a call to a CL program that uses the RTVJOBA…

      Comment


      • #4
        Hi Sean,
        I am using my IBMi userid to log into Valence. When I debugged the RPG program, everything looked good, but when I called my order printing program after overriding the user id, it was still QTMHHTTP. I'll go thru the tip that Robert posted.
        Thanks,
        Bruce

        Comment

        Working...
        X