|
Trying to figure out why the following /free code is blowing raspberries at me: cuPD = %dec( %char( %date : *ISO0 ) : %len( cuPD ) : %decpos( cuPD ) ); cuPD is defined as P(8,0) in a database file defined for output. The compiler errors I'm getting are related to the 2nd & 3rd parameters of the %dec BIF: RNF0328: The second parameter for %DEC or %DECH is not valid. The second parameter for built-in function %DEC or %DECH must be a numeric literal; a built-in function that has a value known at compile-time; or a numeric named constant. In addition, the value of the parameter must be between 1 and 30 with no decimal digits. A float literal is not allowed. The built-in function is ignored. RNF0329: The third parameter for %DEC or %DECH is not valid. The third parameter for built-in function %DEC or %DECH must be a numeric literal; a built-in function that has a value known at compile-time; or a numeric named constant. The value of the parameter must be between 0 and 30 with no decimal digits. Also, the value must be less than or equal to the value of the second parameter specified for this built-in function. A float literal is not allowed. The built-in function is ignored. I would have thought that these are "known values at compile-time" and, therefore, would have satisfied the second condition in the error messages. Previous to getting these errors, I had hardcoded the numeric literals 8 and 0 for the 2nd & 3rd parameters of the %dec BIF, respectively, and this compiled fine. I am still playing catch-up after my layoff. Is this the easiest/best way in /free to populate an 8-digit numeric with the current date? It seems there should be an easier way to do this. TIA, Dan
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.