Retrieving User Profile from Job



SDS positions 254-263 will give you the wrong user profile in a web environment. This is the “job start” user profile which is always QTMHHTTP on the web. What you’ll want to use is positions 358-367. This is the “current user profile” of the job which will give you who signed in.

If using the RTVJOBA command, try using the CURUSER parameter instead of the USER parameter. This will make it work properly for you.

The 2 user profiles are always the same in a green-screen session, but always different on the web. Using “current user” will work in the green-screen, too.

D PSDS SDS D JobStartUser 254 263A D CurrentUser 358 367A

                                                                                    

Another way to get the current user profile is to use INZ(*USER) on a D-spec. This is equivalent to using positions 358-367 of the PSDS, but you might find it nicer.

D CurrentUser s 10a inz(*User)