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



A command object can be used as a user interface to the program. A good option is to create a command (*CMD) object to define the interface between the program and the user [to avoid using the CALL command]. Depending on how the character parameter is declared, the unexpected /expression operator/ could still be an issue [at least if not prompted]. Having created a *CMD object with the three parameters, thus having avoided the non-described space-separated parameter notation on the elements of the PARM() parameter of the CALL command, the invocation [for the command MYCMD in library MYLIB] might look like:
MYLIB/MYCMD PARM1(18424) PARM2('524771/1') PARM3(1)

Three parameters for a command-line invocation using the CALL command requires that each literal is separated by a blank. Each numeric parameter is inferred by the feature to be a P(15,5) when coded without [hex] string notation [as non-delimited digits and optional decimal separator]. All character string parameters which contain effectively anything other than English Upper Case characters are best delimited with apostrophes and remain under 32-bytes in declared length. Assuming the numeric parameters were declared as is inferred by the feature, then the request would be:
CALLbPgmNamebPARM(18424b'524771/1bb'b1) /* pass 18424 as P(15,5), the apostrophe delimited character string, and 1 as P(15,5) */

If the numerics are S(6,0) and always positive, then one manner to invoke is by passing the number as a string of digits [without any decimal separator]:
CALLbPgmNamebPARM('018424'b'524771/1bb'b'000001') /* pass 18424 as a 6-byte string that matches positive zoned decimal, the apostrophe delimited character string, and 1 as a 6-byte string that matches positive zoned decimal */

Assuming the fields are P(6,0) instead, the invocation would need to be done using hex notation:
CALLbPgmNamebPARM(x'0018424F'b'524771/1bb'bx'0000001F') /* pass 18424 as a 4-byte hex string that matches positive 6-digit packed decimal, the apostrophe delimited character string, and 1 as a 4-byte hex string that matches positive 6-digit packed decimal */

Regards, Chuck

lwl wrote:

Have a program expecting 3 parameters:
Parameter 1 is described as 6,0. The test value is 18424
Parameter 2 is described as 10 and can contain â/â. The test value is 524771/1
Parameter 3 is described as 6,0. The test value is 1

Iâve tried entering the command as
âCALLbprogram-nameb(018424524771/1bb000001)â
where âbâ represents a blank.

When I enter the above string I get Expression operator not
allowed for parameter PARM. Any suggestions on how I fit this?


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.