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



Hi Richard,

One of the often ignored facts about pointers - you don't need to define them,
the compiler will define them for you.
Since you had a field based on $QxChkBase, but hadn't defined $QxChkBase the
compiler went ahead and defined it for you. It's RPG - but not as we know it
:-).

HTH

Paul Tuohy

Richard B Baird wrote:

> never mind on why my pointer was not set....  but now I even more confused.
>
> my pointer was not set because I misspelled my pointer variable name -
> $QxChkBase should have been $QzChkBase.
>
> which begs the question - how did my program compile?  $QxChkBase is not a
> valid variable or pointer.
>
> Hans? Barbara?  Stop me before I kill again!
>
> Rick
>
> ---my original message---
>
> Now I'm really confused.
>
> I'm just now getting around to testing what I thought was a sound solution
> to my redefining data structure fields as an array.  here is the code:
>
> DDSINPUT        E DS                  EXTNAME(DSUPDPAG)inz
>
>  * dsupdpag has QZAMT1-12 and QZCHK1-12 defined.
>
> D $QzAmtBase      S               *   inz(%addr(QZAMT1))
> D $QzAmt          S                   like(QZAMT1) based($QzAmtBase)
> D                                      dim(12)
> D $QzChkBase      S               *   inz(%addr(QZCHK1))
> D $QzChk          S                   like(QZCHK1 ) based($QxChkBase)
> D                                      dim(12)
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
> or email: RPG400-L-request@midrange.com
> 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 thread ...

Replies:

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.