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



Joe,

The reason I am swapping user profiles is because adopted authority
support for Java will not be supported in future releases.  

I am sure the profile is being swapped.  The way I know this is because
I did not code the Java program to swap the user back after the program
has run.  I intentionally left this code out to test the process.  Even
when the program fails to run, the user profile is set to the target
profile after the error message is received.

User profile TESTSWITCH - *allobj - target of the Java program

Works: 
user profile TEST - *allobj
Logon as TEST.
Call the RPG program from the command line.
Java constructor changes user profile to TESTSWITCH
Java completes with no errors
On command line, the user is now TESTSWITCH

Does Not work:
User profile SECTEST - limited authorities
Logon as SECTEST
Call the RPG program from the command line
Java constructor changes user profile to TESTSWITCH
Java constructor errors on StringBuffer
RPG error ends in error
On the command line, the user is now TESTSWITCH

So -- why?

Thanks :)

Mike

-----Original Message-----
From: rpg400-l-bounces+msilvers=hbs-inc.com@xxxxxxxxxxxx
[mailto:rpg400-l-bounces+msilvers=hbs-inc.com@xxxxxxxxxxxx] On Behalf Of
Joe Pluta
Sent: Wednesday, February 07, 2007 12:38 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: More on the Java call error

I'm getting a little lost in the various profiles and authorities here,
Mike, but just a side point: as far as I understand, Java is not the
only thing picky about authorities.  I'm pretty sure the IFS in general
doesn't support adopted authorities, either.

In any case, though, the symptoms indicate that the profile swap is not
occurring.  It works when you run with a user profile with *ALLOBJ, but
not when you with a profile without *ALLOBJ.  That tells me that the
profile swap in the constructor is not really working.

Joe


From: Mike Silvers

Wow -- this is getting more interesting.

In the constructor, the program switches to another user profile with 
*allobj authority.  It also creates log files and redirects sysout and

syserr to these new log files.  the creation of these log files is 
where the problem occurs.

When I run the program with a user profile having *allobj authority, 
it works.

When I run a program with lesser authority, the user profile switches 
during the execution and the error occurs when creating name of the 
log files in a stringbuffer.


--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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 thread ...

Follow-Ups:

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.