PDA

View Full Version : QSYSObjectPathName



mamadou_toure@yahoo.com
02-26-2008, 07:23 PM
Hi Everyone, I would like to know if there is a way to use *LIBL instead of hardcoding a library name in the QSYSObjectPathName ? Instead of QSYSObjectPathName programName = new QSYSObjectPathName("UC_MTO", "TESTPGMCAL","PGM"); QSYSObjectPathName programName = new QSYSObjectPathName("*LIBL", "TESTPGMCAL","PGM");

J.Pluta
02-26-2008, 09:07 PM
This requires a slightly different syntax than *LIBL: QSYSObjectPathName programName = new QSYSObjectPathName("%LIBL%", "TESTPGMCAL","PGM"); Notice that there are TWO percent signs, one before and one after. Joe

mamadou_toure@yahoo.com
02-26-2008, 09:42 PM
Thanks Joe, The other problem I have now is that as the program is run under QUSER and not under my real profil. So is there a way to setup the environement with a my library list before I call my RPG ? Regards

J.Pluta
02-26-2008, 11:48 PM
Use either a CommandCall object to execute a CHGLIBL command or a ProgramCall object to call a CL program to set your library list. That will change the library list for the QZRCSRVS job associated with your AS400 object. Joe Pluta www.plutabrothers.com