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



Ok, my euphoria was short lived.

When I run the real command y'all have been helping me with as a literal
constant, it works. When I construct it with the variable function
argument, it fails. The command string looks ok on the EGL side. I tried
specifying a length on the string declaration, but that didn't do
anything. Do I need to convert it to an array of char or something? If
so, do I need to do it a byte at a time, or is there a memcopy or
something similar?

Here's what I've got

i joblog:
----------
Job 274215/QUSER/QZRCSRVS started on 07/03/09 at 15:48:14 in subsystem
QUSRWRK in QSYS. Job entered system on 07/03/09 at 15:48:14.
<snip> ... all happy to here ...
Client request - run program *LIBL/QCMDEXC.
String ' Ê ' contains a character that is not valid.
Error found on *N command.
Errors occurred in command.

Here's the entire source:
--------------
package com.vcpi.services;
// service
service submit
// Variable Declarations
cmdString string;
cmdLength decimal(15,5);
returnVal string;

// Function Declarations
function submit(payor string in) returns(string)
syslib.setRemoteUser("xxxxx", "xxxxxxx");
cmdString = "AR8350 PAYOR(" + payor + ") UPDATE(*NO)";
cmdLength = strlib.characterLen(cmdString);
returnVal = "Submitted batch for " + payor;
try
call "COMMANDONI" (CmdString, cmdLength);
onException (ex AnyException)
returnVal = CmdString + " (" + cmdLength + ")" + " Batch submission
failed for " + payor + " failed " + ex.messageID + " " + ex.message;
end
return(returnVal);
end
end

And here's the value that comes back in returnVal. The command is as
expected, command length looks correct:
--------------
return (string): AR8350 PAYOR(UGS) UPDATE(*NO) (29.00000) Batch
submission failed for UGS failed EGL0150E EGL0150E An error occurred
calling the QCMDEXC program. Error: EGL0095E The run unit stopped
because an application error on the systemb.vcpi.com system occurred
trying to call the QCMDEXC program. Message: AS400Message (ID: CPF0006
text: Errors occurred in
command.):com.ibm.as400.access.AS400Message@15fb38 EGL0002I The
error occurred in submit processing the submit function. EGL0002I The
error occurred in submit processing the submit function.

CPF0006 is just "Errors occurred in command."

If I change the call to use a literal value, it works:
---------------------
call "COMMANDONI" ("AR8350 PAYOR(UGS) UPDATE(*NO)", cmdLength);


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