×
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.
Apologies if this is a duplicate. I wasn't subscribed (I thought I
was) and didn't see anything on this in the archives.
Hello;
We have an RPGLE program that is called using PCML from a Java
application by a software vendor. The call to the RPGLE program
results in a server job being started that then calls the RPGLE
program. The RPGLE program does it's thing and returns information
to the calling Java program. This all works okay, except the server
job never ends and each time the vendor calls this pcml program, it
starts another server job. There are hundreds of these jobs and we
have to bring down the subsystem to kill them.
What are we or the vendor missing? I would think that when the job
ends, it should just go away.
// uncomment lines below for logging (never got
this to work but kept them
// they are from ibm.com example PCML program...
//com.ibm.as400.data.PcmlMessageLog.setTraceEnabled(true);
//com.ibm.as400.data.PcmlMessageLog.setLogFileName("PCML.log");
KQLOG.D("Beginning PCML");
KQLOG.D(" Constructing ProgramCallDocument for
PSHPINF API...");
// Construct ProgramCallDocument
// First parameter is system to connect to
// Second parameter is pcml resource name.
// PCML source file "pshpinf.pcml" must be found in
the M3 classpath.
pcml = new ProgramCallDocument(sys, "PSHPINF");
// Package/Carton Number PANR
XXPANR.moveRight(MMUPDREPDS.getM9PACN().toStringRTrim());
//BR02002 MICKYB
pcml.setValue("PSHPINF.PACKAGENO", XXPANR);
// Total package TPKG
// Get Total Package
int count = 0;
PTRNS.setCONO(HDISH.getCONO());
PTRNS.setDIPA(0);
PTRNS.setWHLO().move(HDISH.getWHLO());
PTRNS.setDLIX(HDISH.getDLIX());
PTRNS.SETLL("00", PTRNS.getKey("00",
4));
while (PTRNS.READE("00", PTRNS.getKey("00", 4))) {
count++;
}
//this.PXNUM = count;
//this.PXDCFM = LDAZD.DCFM;
//this.PXALPH.clear();
//SRCOMNUM.COMNUM();
XXCNT.move(count);
pcml.setValue("PSHPINF.TOTALPKGS", XXCNT);
// Total Package end
// User ID to run RPG program
XXUSER.moveLeftPad(this.DSUSS);
pcml.setValue("PSHPINF.USERID", XXUSER);
pcml.setValue("PSHPINF.TRACKINGNO", EnvName);
pcml.setValue("PSHPINF.STATUSCODE", " ");
// Call PSHPINF API
pcml.callProgram("PSHPINF"); // program
name <----- Dave this is the call right here. Above setups up
the parameters, below here is the return processing....
// Returned values from PSHPINF API
StatusCode = (String) pcml.getValue("PSHPINF.STATUSCODE");
ShipperTrackerNo = (String)
pcml.getValue("PSHPINF.TRACKINGNO");
}
catch (PcmlException pe)
{
String err = pe.getMessage();
if (err.length() > 50)
{
ShipperTrackerNo =
err.substring(err.length()-50, err.length());
}
else
{
ShipperTrackerNo = err;
}
StatusCode = "1";
IN60 = true;
this.MSGDTA.moveLeftPad(pe.getMessage());
this.MSGID.moveLeftPad("CPF9898"); // Package
number &1 does not exist.
}
catch (Exception pe)
{
String err = pe.getMessage();
if (err.length() > 50)
{
ShipperTrackerNo =
err.substring(err.length()-50, err.length());
}
else
{
ShipperTrackerNo = err;
}
StatusCode = "1";
IN60 = true;
this.MSGDTA.moveLeftPad(pe.getMessage());
this.MSGID.moveLeftPad("CPF9898"); // Package
number &1 does not exist.
}
varStatus.move(StatusCode);
KQLOG.D("Varsity user: " + XXUSER);
KQLOG.D("Varsity status code returned 0=OK 1=Error: "
+ varStatus);
KQLOG.D("Varsity tracking number: " + ShipperTrackerNo);
// Display error if found
if (StatusCode == "1") {
IN60 = true;
this.MSGDTA.moveLeftPad(ShipperTrackerNo);
this.MSGID.moveLeftPad("CPF9898"); // Package
number &1 does not exist.
}
// Update ETRN with varsity number returned
PTRNS.setCONO(HDISH.getCONO());
PTRNS.setDIPA(0);
PTRNS.setWHLO().move(HDISH.getWHLO());
PTRNS.setDLIX(HDISH.getDLIX());
PTRNS.setPANR().moveLeftPad(MMUPDREPDS.getM9PACN());
IN91 = !PTRNS.CHAIN_LOCK("00", PTRNS.getKey("00"));
if (!IN91) {
PTRNS.setETRN().moveLeftPad(ShipperTrackerNo);
PTRNS.UPDAT("00");
}
} // ZVARSITY END B
Dave Murvin
DRM Enterprises, Inc.
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.