|
Good idea Joe :) Well -- I created a file with public *exclude using TEST user profile. Logged off -- logged back in as SECTEST and ran the program. After the crash, created another IFS file using EDTF -- and looked at the owner -- sure enough it was TESTSWITCH! Then used EDTF on the original test file (with public *exclude) -- it worked -- could add lines, save and exit. The mystery remains...... -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta Sent: Wednesday, February 07, 2007 1:06 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: More on the Java call error Good testing, Mike! Okay, the next thing I would try would be to try to create the file from outside of Java but after the profile swap. You can try to create a file in a folder using EDTF, like this: EDTF '/myfolder/myfile.txt' Now, the assumption is that you WILL be able to do this signed on either as profile TEST or TESTSWITCH, but not as profile SECTEST. If that's not the case, there are other issues. But assuming this to be true, I would then run your program as SECTEST and after it bombs (at which point you say the user profile is now TESTSWITCH) then try to execute the EDTF command. If it doesn't work after changing to TESTSWITCH, then you know the adopted *ALLOBJ doesn't do what you need. Joe
From: Mike Silvers 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?
-- 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 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.