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




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.

This thread ...

Follow-Ups:
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.