Thank you David
excellent tutorial , much appreciated
best regards
Bob
________________________________
From: David Morris <david.morris@xxxxxxx>
To: Java Programming on and around the IBM i <java400-l@xxxxxxxxxxxx>
Sent: Thu, March 31, 2011 7:06:42 AM
Subject: Re: How to use Library List in JOBD when invoking an RPG program via
PCML
Hi Bob,
I am writing a small how-to document on this so I can refer back to it
later.
Feel free to take a look at it via the below link.
I am still working on it, but what I have so far may be helpful to you
now.
http://www.dsmtech.com.au/iseries/pcml/60-intro-to-pcml-part-5-java-source-code.html
Regards
David.
From:
"I. Addoum." <sol_xpert@xxxxxxxxx>
To:
Java Programming on and around the IBM i <java400-l@xxxxxxxxxxxx>
Date:
30/03/2011 08:26 PM
Subject:
Re: How to use Library List in JOBD when invoking an RPG program via PCML
Sent by:
java400-l-bounces@xxxxxxxxxxxx
Dear David,
I am currently working on an identical solution to call RPG programs from
Java
could you please share the code ?
thanx in advance
Bob
________________________________
From: David Morris <david.morris@xxxxxxx>
To: Java Programming on and around the IBM i <java400-l@xxxxxxxxxxxx>
Sent: Wed, March 30, 2011 7:43:38 AM
Subject: Re: How to use Library List in JOBD when invoking an RPG program
via
PCML
I think I have found the solution.
The PCML file used to look like the following:
<program name="IP028" path="/QSYS.LIB/LIBNAME.LIB/PGMNAME.PGM">
Changing it to the below has worked a treat;
<program name="IP028" path="/QSYS.LIB/%LIBL%.LIB/PGMNAME.PGM">
Looks like other "special" values are allowed as well. %ALL%, %ALLUSR%,
%CURLIB%, %USRLIB%.
Regards.
David.
From:
David Morris <david.morris@xxxxxxx>
To:
java400-l@xxxxxxxxxxxx
Date:
30/03/2011 12:51 PM
Subject:
How to use Library List in JOBD when invoking an RPG program via PCML
Sent by:
java400-l-bounces@xxxxxxxxxxxx
Hello,
I have successfully setup a java program to call an RPG program on the
iSeries via PCML. However I see you need to specify the exact path to the
program object either via the ProgramCallDocument.setPath statement or by
including the path in the PCML file itself.
I want to be able to use *LIBL as an entry somewhere rather than having to
hardcode a library name anywhere.
Why do I want to do this? Because the program object can exist in multiple
libraries depending on if it is in the middle of development, or ready for
testing, or in production.
I'll explain a theoretical setup below:
Library DEV has permanent copies of all PF's and LF's. It also has program
objects, display files, printer files etc currently being developed.
Library UAT has permanent copies of all PF's and LF's. It also has
program objects, display files, printer files etc ready for testing.
Library PRDFIL has production PF's and LF's.
Library PRDOBJ has production program objects, display files, printer
files etc.
The program object will only exist in DEV or UAT while we are making and
testing changes. Once the program has been moved to production the object
is deleted from DEV and UAT.
User profile USRDEV has *jobd with library list DEV, PRDOBJ.
User profile USRUAT has *jobd with library list UAT, PRDOBJ.
User profile USRPRD has *jobd with library list PRDFIL, PRDOBJ.
When connecting to the AS/400 with user profile USRDEV I want the program
object to be called from DEV (if it is there) or from PRDOBJ.
We currently get around this problem by have copies of all programs called
via the Java interface in DEV, UAT and PRDOBJ. The trouble is our
automatic change control system cleans up after itself and deletes
programs objects from DEV when it moves it to UAT and then deletes it from
UAT when it is moved to PRDOBJ.
How is Java to know which library the object is in?
I would like to do something like String mypath = "*LIBL/PROGRAM.PGM"
Any ideas on how to use the library list to find the object name rather
than needing to specify an exact path?
Regards
David.
- ----------------
IMPORTANT NOTICE : The information in this email is confidential and may
also be privileged. If you are not the intended recipient, any use or
dissemination of the information and any disclosure or copying of this
email is unauthorised and strictly prohibited. If you have received this
email in error, please promptly inform us by reply email or telephone. You
should also delete this email and destroy any hard copies produced.
As an Amazon Associate we earn from qualifying purchases.