× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Mike,

The QWTSETP does not change the username associated with job so a CL
doing a RTVJOBA to get the username or an RPG using the System Data
Structure positions 254-263 still return the original username.

Obviously, jobs on the system are identified by number/user/jobname -- if QWTSETP changed that user component of the job name, it'd essentially become a different job. So that isn't going to change. Your code needs to stop relying on it being the current user id.

As everyone has already mentioned. Both the SDS and the RTVJOBA will give you the info you need. You just can't retrieve teh components of the job name, you need to use CURUSER and positions 358-367 of the SDS. You've already had about 5 replies to that effect -- so why am I responding?

Because I'd like to say this: PLEASE write *all* of your code to use the "current user" instead of the "job name user". By that, I mean that everything you write (whether it uses QWTSETP or not) should use CURUSER and/or positions 358-367 or an equivalent. When the profile is not swapped, those other areas will work exactly the same as the older areas. There's no disadvantage to using CURUSER instead of USER. That way, if at any point later someone decides to add swapping (via QWTSETP or one of the various other means of doing the same thing) your code will work without changes.

Furthermore, you may want to consider using INZ(*USER) in RPG instead of the SDS. It's a little easier to code and understand.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.