A week ago, I posted the below message. Unfortunately, I did not get a
reply. Today, I picked up this problem again. I have done all kinds of
experiments, but again to no avail. I am afraid I will start the weekend
feeling very frustrated. (I'm in Europe, so it's somewhat later here, and
the weekend is about to start, which should normally make me happy.) I
repeat my previous e-mail, hoping this time someone can provide a

Have a good weekend! (Ok, after all, I think I will enjoy the weekend


I am very confused. I want to call a service program from Java. The Java
code looks like this:

public boolean login() throws LoginException {

ServiceProgramCall sPGMCall = null;
AS400 system = null;
AS400Text txtCnv = new AS400Text(10);

try {
ProgramParameter[] parameterList = new
parameterList[0] = new
system = new AS400(auth_server, user, password);
sPGMCall = new ServiceProgramCall(system);
QSYSObjectPathName fullSrvPgmName = new
QSYSObjectPathName("%LIBL%", "ALSRVWRP", "SRVPGM");
if (sPGMCall.run() != true) {
AS400Message[] messageList =

I copied this setup (defining an AS400Text object, and using method
toBytes on that object to define the parameter) from numerous pages on the
internet. However, when I do a debug on service program ALSRVWRP, all I
see is gibberish (some ASCII characters way out of the normal range).

What on earth is wrong with this code?


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.