|
David, I've never heard of the "System Data Structure"??? I'm going to assume you ment the Program Status Data Structure in RPG (PSDS) as follows: D PSDS SDS D ... If this is the case, then what might be happening is the programs are not ending and restarting. RPG only updates the job, user ID and many other fields when the program is initially loaded. The only way to refresh the PSDS is to end the program *INLR=*ON and return to the caller. Then call the program again. Bob Cozzi www.rpgiv.com/seminars -----Original Message----- From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com] On Behalf Of David Gibbs Sent: Thursday, August 29, 2002 4:15 PM To: rpg400-l@midrange.com Subject: Odd handle switching behavior in ILE RPG I've got an odd behavior when switching user handles in a ILE RPG program. My application is a CGI program running under the standard web server. The program starts out running as current user = QTMHHTTP I then switch the user id to the user profile specified in REMOTE_USER environmental variable (for discussion, let's call this user "A") using the standard API's QSYGETPH and QWTSETP. This user profile switch is reflected in job status. The program then operates as this new user happily. It calls various programs, which call procedures in service programs, some of which use the current user field in the system data structure. The system data structures 'Current User' field accurately reflects the correct user profile ("A"). When the web application is done it returns to the main web cgi program, who switches the user profile back to QTMHHTTP. On the next invocation, the REMOTE_USER variable is "B". Again I call the appropriate API's and the user profile switch is successful. Again the job status reflects the correct user profile. Once again the program operates as this new user ... and calls programs, which call procedures in service programs. HOWEVER, this time when the program references the system data structure, the current user field does not have the actual current user "B", but it has user "A". This is obviously incorrect. The programs operate in either the default activation group or QILE activation group. Any idea why this would happen? Thanks! david -- David Gibbs Sr. Software Engineer / R&D / MKS Inc., www.mks.com Lombard, IL, USA; tel: 630-495-2108; fax: 630-495-3591 Build Better Software _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.