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



From: Richard B Baird [mailto:rbaird@esourceconsulting.com]

<SNIP>

>DDSINPUT        E DS                  EXTNAME(DSUPDPAG) INZ

>D @QzAmt          S               *   INZ(%addr(qzamt1))
>D @QzChk          S               *   INZ(%addr(qzchk1))

>D $QzAmt          S                   like(QZAMT1 ) based(@qzamt)
>D                                      dim(12)
>D $QzChk          S                   like(QZCHK1 ) based(@qzchk)
>D                                      dim(12)

1. the '*' in the field length implies "variable length"?

The * in the field type (not length) implies a pointer.

2. is it the "based" keyword on the $qzxxx that eventually defines the
length of the @qzxxx fields?

The based keyword defines this as a variable(array) that will start at
the memory pointed to by @qzamt.

3. or is it the fact that the next field in the DS (@qzchk) starts at the
address of QZCHK1 that defines the length of @qzamt?   if so, what defines
the length of @qzchk?

The length if @qzchk is a pointer length.  It is a pointer and you can't
use it's memory directly, you need another variable based on it to look
at what it points to.

A little confusing, I know.  We want the array @qzamt to start at the
same spot in memory as qzamt1.  To do this, we first set up a pointer
to point to the same memory location (which is what INZ(%addr(qzamt1))
is doing.  Then we set our array to be based on this pointer (which is
what based(@qzamt) is doing.

All you really need to remember is, create a pointer pointing to the
memory you want to use, then set up your variable/array/structure and
base it on that pointer.

HTH,

Jim Langston


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.