|
Just to get the complete picture in place for the archives ...
If using V6R1 (or 6.1 as it is now known) the easiest way to handle the data portion of a variable length field by address is to code using %Addr( fieldName: *Data) which will automagically skip the first two or four bytes as appropriate. So these:two lines
%len(Input_String) = %size(Input_String)-VARPREF (VAPREF is 2)
Len = RdLine( cli : %addr(Input_String) + VARPREF : %len(Input_String) :
*On );
Can be simplified to one - and of course the constant VARPREF is not required either.
Len = RdLine( cli : %addr(Input_String: *Data): %len(Input_String) :
Jon Paris
www.Partner400.com
www.SystemiDeveloper.com
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.