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


  • Subject: Re: Code Problem...
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 18 Aug 1999 16:46:46 -0500

Tim,

     SomeDS is occupying the same area of memory in your AS/400 as
the *IN array.  However, when you display the value of SomeDS in
STRDBG, it doesn't display the contents of SomeDS, but rather it
displays the contents of each subfield in the SomeDS data structure.

So, at the start, because all 99 indicators are '0', SomeDS will
be '000000000000'

*OFF means "all zeroes".   so they are the same.

When you change *IN02 to '1', then SomeDS is '010000000000'

Which is no longer "all zeroes".

Granted, you didn't change the values of Indcat03, 05, 10, 11, 12...
and these are whats displayed in STRDBG, but you DID change the 2nd
position of SomeDS, you just dont have a subfield there.

Make sense?




"Hatzenbeler, Tim" <thatzenbeler@clinitech.net> wrote:
> I need help figuring out why this doesn't work the way I think it
>  should....
>
> D  InPtr          s               *   inz(%addr(*in))
>  *
> D  SomeDs         ds                  Based(InPtr)
> D   Indcat03                      n   overlay(SomeDs:03)
> D   Indcat05                      n   overlay(SomeDs:05)
> D   Indcat10                      n   overlay(SomeDs:10)
> D   Indcat11                      n   overlay(SomeDs:11)
> D   Indcat12                      n   overlay(SomeDs:12)
>  *
> C                   Eval      *In02     = *Off
> C                   If        SomeDs = *Off
> ???-- at this statement, the value of SomeDS is = *off, which I agre
>  with.
>
> But if I add...
> C                   Eval      *In02     = *On
> C                   If        SomeDs = *Off
> ???-- at this statement, the value of SomeDS is NOT EQ to *off
>
> I guess what i'm not understanding is this, why would setting on *in
> effect the value of the SomeDS, since *in02 is not part of the
>  subfield? or
> is it?
> If it is part of the subfiled, what would I need to do to only check
>  the
> subfileds that I have defined...
>
> Keep in mind, that when I used the debugger, to eval the SomeDs it
>  always
> showed me '0' for all it's components.
>
> thanks,  tim
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.