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



Rob Berendt wrote:

> Definetly isn't.  Those faq's do not deal with the numeric.  They deal
> more with mismatched strings.

Are you sure? From the FAQ:

Now that you know the system is creating variables behind the scene, you
might wonder how it knows what size those variables need to be. The answer
is that it doesn't. Instead, the designers have imposed some specific rules
about how literals are transformed to variables, and thereby passed as
parameters.
CL supports only three basic data types: character, decimal, and logical.
For the purposes of this discussion, you can consider the logical data type
equivalent to the character type, because it's treated in the same manner.

The simplest rule is the one that handles decimal literals. All decimal
literals will be converted to packed decimal format with a length of (15 5),
where the value is 15 digits long, of which 5 digits are decimal places.
Therefore, any program that you expect to call from the command line, or
SBMJOB etc., needs to declare it's numeric input parameters as *DEC(15 5).

and....

Things to Remember
-always match the type/size of parameters on your pgm to pgm calls.
-remember that the system converts literals to variables in the background.
-remember that decimal literals are always converted to *DEC(15 5).
-and that char literals less than or equal to 32 bytes are converted to
*CHAR(32).
-and that char literals greater than 32 bytes are converted to variables of
equivalent size.


The numeric didn't receive as much attention as strings because it's not
that complicated. Still, maybe what's there isn't clear enough. However, you
can always go in and add some additional information.

Regards,

John Taylor






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.