|
(Just back from a week out.)
The offset is for passing a data structure to InfoPrint server. Seems
that it wanted this big field and you gave it the offset to the subfields
within that. Alas, the problem was as you pointed out - the 2 byte part
of the length of the variable length field. I suggested that maybe he
dump using the data structure and instead use variable length fields,
eval's, %trim, or whatever else was necessary to put them into a non
varying length field.
Rob Berendt
--
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
Benjamin Franklin
"Jon Paris" <Jon.Paris@xxxxxxxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
09/06/2003 03:06 PM
Please respond to RPG programming on the AS400 / iSeries
To: <rpg400-l@xxxxxxxxxxxx>
cc:
Fax to:
Subject: RE: %OFFSET
>> If I have a datastructure, full of variable length fields, how do I
determine the offset to a particular field?
The varying length fields always occupy the same amount of storage - i.e.
the maximum length + 2. They are only _treated_ as being variable in
length
when used. So to calculate the offset is no different than for a fixed
length field - Addr(VarFieldn) - %Addr(DS). For the actual data content
(as
opposed to the length) you need to add 2 to that.
I'm fascinated as to why you want to know the offset.
Jon Paris
Partner400
www.Partner400.com
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.