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



Hello,

I've been reading about the problem of calling a CLP with parameter
that's more than 32 characters long. To call it from the command line
is it reasonable to add a second parameter *DEC 15 5 to tell it how
long the parameter actually passed is ?

Adding a second parameter is certainly a reasonable solution -- that's that IBM did with the QCMDEXC API, in fact.

However, I'd suggest that if the caller is a human being typing data at the command-line, it'd be very cumbersome to always have to count the number of characters. And it'd be error prone, since it's easy to count it wrong.

An easier solution is to put a *CMD front-end on your program. It takes only a little more work to write the CMD source, but as long as the user runs the command, it solves the problem entirely, and is much more user-friendly.

One more note... this is a little thing... but, the problem has nothing to do with CLP. This same problem occurs with ANY language that you're calling, whether it be CLP, CLLE, RPG, RPGLE, CBLLE, etc. It doesn't matter... the "problem" (if you want to call it a problem) is in the way i5/OS program calls pass parameters.

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.