|
This is a multipart message in MIME format. -- [ Picked text/plain from multipart/alternative ] I didn't think it went into using a command to get around the 15,5 limitation imposed by a CALL used via SBMJOB. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "John Taylor" <jtaylor@rpg2java.com> Sent by: rpg400-l-admin@midrange.com 04/15/2002 10:26 AM Please respond to rpg400-l To: <rpg400-l@midrange.com> cc: Fax to: Subject: Re: Error Message 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 _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l or email: RPG400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
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.