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



Hello Michael,

thank You that You have noticed my issue and spent some time researching it.

Let me gloss some of Your comments.
I have been integrating a quite complex Java application into a core RPG 
application. The java app have plenty of methods and among them are those that 
provide simplified interface based on passing data in a Properties object (see 
java.util.Properties class). I feed the Properties object with the method 
setProperty:
....
setProperty( Dapi_propsIn                 
           : String( 'Psysid' )           
           : String( %char(insysid) ) );  
setProperty( Dapi_propsIn                 
           : String( 'Pforid' )           
           : String( %char(inforid) ) );  
....
and get output data with getProperty:
...
OUSUBTYP  = getBytes( getProperty( Dapi_propsOut       
          : String( %char(iRSRows) + '.Ousubtyp' ) ) );
....
I could have names of parameters in varying variables but it seems of no sense 
in my situation. This way above seems straightforward to me. The definitely 
worse performance of Properties- parameters exchange with java methods does not 
matter (so far).

>From a performance perspective, the bigger penalty may be in retrieving java 
>strings
>in RPG via the "getBytes" method call.  While you can specify VARYING on the
>prototype, I'm not sure if (in my example) 65k is allocated for the returned
>string.  This would provide a serious performance issue if calling "getBytes"
>multiple times.  Again, this depends on what is happening at the lower levels.

I once encountered an article on new things in RPG V5R1 (or R2?) by Barbara 
Morris on www.mcpressonline.com where the return value of getBytes method is 
65k varying.
Not having suspected of any side effect (as the prototype is of IBM), I have 
used it with trust and no doubt. Thank You for the warning.

Regards
Otto Steffan


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.