On 11/03/2005, at 5:56 AM, MWalter@xxxxxxxxxxxxxxx wrote:
After some research, I've determined that the problem is happening
when I
try to switch the profile back. I watch the service program in debug,
the
error DS is empty. The profile does indeed switch back, but the next
call
to a CGI program ends the CGI job. Nothing in the job log. It states
that
the job completed normally. I'm generating a new profile token from
the
user profile in positions 254 to 263 of the status data structure. It
would
be QTMHHTTP in this case. Any ideas?
The proper way to do this is to get the current profile handle before
you change anything. Store this in a variable. Get the new user handle
and swap. When done swap back using the saved handle you got
previously.
The same process applies when using profile tokens.
You are likely running into authority problems where the new user
(under whose authority the job is now running) is not authorised to the
original profile.
As to why the CGI job dies I don't know but may be due to invalidating
handles or tokens etc. due to authority problems.
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software AS/400 Technical Specialists
http://www.flybynight.com.au/
Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\
Fax: +61 3 9419 0175 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------