|
How about defining it as VARYING in your program, then passing it to the other program with VALUE OPTIONS(*STRING) to get it converted for the other program into a null-terminated string? Then in the called program you could convert it back to a "normal RPG" character variable using the %str() bif. PGMA calls PGMB.. PGMA: D val1 S 25a varying D PgmB PR extpgm('PGMB') D val 25 value options(*string) ...code... call pgmb(val1); PGMB: D ValX S 25a D pgmB PI extpgm('PGMB') D valp 25 value options(*string) ...code... Valx = %str(valp) ....Alan -----Original Message----- Behalf Of Albert York Subject: RE: Pointers and LR I realize I could just pass a string but I wanted to have the flexibility to change the length of the string in the future without recompiing the calling program. It doesnt' need to know what is in the string, it just needs to pass it to other programss. Albert
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.