|
Ok, I understand (Or now I also want to understand it). This procedure is aimed to be used in a large scale conversion where amounts must be represented in the decimal of the actual Currency involved. That means that all places where the amount surfaces (screens and reports) the original field will become hidden and a character field will represent the notation. The aim though was to have to define as less as possible in all these many, many places to give as much change that it is done correct. As I understand correct I will not use the *VARSIZE and need at least one extra line to get the result in the correct field. Correct me if I'm wrong. Kind regards, Eduard Sluis. Jon Paris <Jon.Paris@xxxxxxxxxxxxxx> wrote: *VARSIZE means "Allow the parameter to be shorter than I said. _I_ will make sure that no corruption occurs as a result." It is your responsibility to ensure that you do not affect data beyond the end of the passed parm. Remember - when you pass a parm by reference the ONLY information passed to the called program is the address of the data. Not the length, not the data type, nothing but the address. You need to control the data loaded into the parm based on the actual length of the parm. If you don't want to pass the actual length of the field, then you will have to specify operational descriptors and retrieve the length information in the called routine. Bottom line. You probably need to use %Subst to load the data into the parm and control it with the length of the field. e.g. %Subst(ParmField: 1: LengthOfFieldPassed) = newData. Jon Paris Partner400 www.Partner400.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.