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



1. The slow way - start at the end with %SST, looking at each character in turn until you get a non-blank - that starting position is your length

2. There's probably a REXX way to do this - return the length via the operating environment variable means

3. Write a little RPGLE procedure (NOMAIN) to get the length, bind it to the CL (CLLE member type).- use RTNVAR

4. Use STRQMQRY to run an SQL statement like "select decimal(length(strip(cmdstring)), 5, 0) from qsqptabl" and write to a file. Then RCVF that single record to get the value.

5. Write a command that accepts the command string as parm, with a return variable.

This is all so much easier in anything else! Eh, Rob?

HTH

Vern

At 03:49 PM 10/24/2003 -0700, you wrote:
I don't mean to whip a dead horse, but I haven't found a solution for this one. At least, not an answer that I'm satisfied with. I know this question has been solved on the RPGIV threads.

How do you know the actual length of parameters passed for call to QCMDEXC within a CL program? I'm trying to modify an old Midrange Computing program that has a "Wait R U Sure?" question for those critical update programs to stop users from running inadvertently.

I want to add the ability to pass parms to it. The PARM is defined as TYPE(*X) on the command. I have &QPARM defined as *CHAR with a length of 1282 (32 chars per parm X 40 parms). This however won't work because the TYPE(*X) varies in length.

Any ideas?



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.