× 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.



Simon,

That's what I did, with Scott Klement's help. I was generating a new
profile token for the current job user and switching back to that when the
work needing authority was done. It was switching, but any subsequent calls
to a CGI program using that job, would kill the job. I switched to profile
handles, doing what you stated, and it works great.

Thanks,

Mark

Mark D. Walter
Senior Programmer/Analyst
CCX, Inc.
mwalter@xxxxxxxxxx
http://www.ccxinc.com


                                                                           
             Simon Coulter                                                 
             <shc@xxxxxxxxxxxx                                             
             om.au>                                                     To 
             Sent by:                  Web Enabling the AS400 / iSeries    
             web400-bounces@mi         <web400@xxxxxxxxxxxx>               
             drange.com                                                 cc 
                                                                           
                                                                   Subject 
             03/10/2005 04:22          Re: [WEB400] Switching Profiles     
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             Web Enabling the                                              
              AS400 / iSeries                                              
             <web400@midrange.                                             
                   com>                                                    
                                                                           
                                                                           





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  / \
--------------------------------------------------------------------


--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.