× 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, Birgitta:

The value in the PSDS is initialized once by the generated code, just prior to calling any *INZSR subroutine, if one is present.

The problem is, the application could swap to another profile, e.g. by calling QSYGETPH and QWTSETP, and the value in the PSDS would no longer name the correct profile.

In a CL program or module, you can issue:

RTVUSRPRF USRPRF(*CURRENT) RTNUSRPRF(&CURUSER)

In RPGLE, you could call the QUSRJOBI API with format JOBI0600 to retrieve the current user dynamically.

So long as you _know_ that the application does not swap profiles, the PSDS value should be fine.

Does that help?

All the best,

Mark S. Waterbury

> On 12/15/2010 8:33 AM, Birgitta Hauser wrote:
Hi,

Can someone enlighten me! We have some discussions.

I used the current user out of the program status data structure (position
358) instead of calling a CL Program that does nothing else than RTVJOBA
CURUSER(&X).

My colleague insists I have to call this CL program because it is not the
same.

Can someone enlighten me? Is the current user (job attribute) the same as
the current user within the PGMSDS or not?

Mit freundlichen Grüßen / Best regards

Birgitta Hauser


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.