|
Tim, Because you don't specify a length for SomeDs, its length is calculated to 12, based on the fields you specify. So when you point SomeDs to *In, it contains indicators 01 to 12, including some you did not specify. Initially its value is '000000000000' (12 times *OFF). When you seton indicator 02, SomeDs contains '010000000000'. When you use the debugger, it will only show you the subfields you have defined, so you will not see the '1' in position 2. But why are you comparing a data structure to *OFF? According to the documentation *ON is all ones and *OFF is all zeros, so after you set on *IN02, SomeDs is neither *ON nor *OFF. Joep Beckeringh ----- Oorspronkelijk bericht ----- Van: Hatzenbeler, Tim <thatzenbeler@clinitech.net> Aan: <RPG400-L@midrange.com> Verzonden: woensdag 18 augustus 1999 20:25 Onderwerp: Code Problem... > 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 agree 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 *in02 > 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 > +--- > +--- | 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 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.