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




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


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.