>> How would you 'clear' 'setoff' a block of indicators in a INDDS?

Based on what Barbara and Charles suggested, I split the difference and did the 
following. Note the second line from the bottom, "Clear ErrorIndicators;". 
Seems to do the trick. 

fTG0002_D01cf   e             WorkStn InfDs(FI01)            
f                                     UsrOpn                 
f                                     InDDS(dsIndicators)    
f                                     Include(RD01_02:       
f                                             SFMSG_CTL)     

This is part of copy block.

d dsIndicators    ds                                                
d  GenericIN01                    n   Overlay(dsIndicators: 1)      
d  GenericIN02                    n   OverLay(dsIndicators: 2)      
d  GenericIN03                    n   Overlay(dsIndicators: 3)      
....
d  GenericIN98                    n   Overlay(dsIndicators:98)    
d  GenericIN99                    n   Overlay(dsIndicators:99)    
d  ErrorIndicators...                                             
d                                 n   Dim(29)                     
d                                     Overlay(dsIndicators:50)    

Code itself.

 /copy *libl/qsrcf,CB_MAP_IND                                       
d DisplaySubfileControl...                                          
d                                     Like(StdLgl)                  
d                                     Overlay(GenericIN26)          
d DisplaySubfile...                                                 
d                                     Like(StdLgl)                  
d                                     Overlay(GenericIN27)          
d ClearSubfile...                                                   
d                                     Like(StdLgl)                  
d                                     Overlay(GenericIN28)          
d DisplaySubfileEnd...                                              
d                                     Like(StdLgl)                  
d                                     Overlay(GenericIN29)          
 .....

    DisplaySubfileMessages();                                            
    If RecordsLoadedInSubFile > 0;                                       
      DisplaySubFile = cTrue;                                            
    Else;                                                                
      DisplaySubfile = cFalse;                                           
      Write SF_BLANK;                                                    
    EndIf;                                                               
    DisplaySubFileControl = cTrue;                                       
                                                                         
    Write RD01_03O;                                                      
    ExFmt RD01_03C;                                                      
                                                                         
    MSGF_ClearProgramMessageQueue(cMainProcedureName            :        
                                  SystemDataStructure.ModuleName:        
                                  ProgramName                   );       
    Clear ErrorIndicators;                                               
                                                                         
    DisplaySubfile = cFalse;                                      
....

I wish IBM would give us true(*True) or false(*False) values. 

-----Original Message-----
From: Andy Hautamaki [mailto:ahautamaki@xxxxxxxxxxxxxxx]
Sent: Friday, June 24, 2005 3:52 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: RPG Free Format question


How would you 'clear' 'setoff' a block of indicators in a INDDS?

Building on the example;

d gDisplayFileControl...
d                 ds                  qualified
d  exit                           n   overlay(gDisplayFileControl : 3)
d  printList                      n   overlay(gDisplayFileControl : 5)
d  cancel                         n   overlay(gDisplayFileControl : 12)
d  pagedown                       n   overlay(gDisplayFileControl : 25)
d  pageup                         n   overlay(gDisplayFileControl : 26)
d  RI_Field1                         n   overlay(gDisplayFileControl : 51)
d  RI_Field2                         n   overlay(gDisplayFileControl : 52)
d  RI_Field3                         n   overlay(gDisplayFileControl : 53)
d  RI_Field4                         n   overlay(gDisplayFileControl : 54)
d  RI_Field5                         n   overlay(gDisplayFileControl : 55)
d  RI_Field6                         n   overlay(gDisplayFileControl : 56)
d  RI_Field7                         n   overlay(gDisplayFileControl : 57)
d  RI_Field8                         n   overlay(gDisplayFileControl : 58)
d  RI_Field9                         n   overlay(gDisplayFileControl : 59)
d  RI_Field10                        n   overlay(gDisplayFileControl : 60)


Say you want to do a

RI_Field1 = *off;
RI_Field2 = *off;
RI_Field3 = *off;
RI_Field4 = *off;
RI_Field5 = *off;

Would it be a;

%subst(gDisplayFileControl:51:5) = *off;



Or is there a better way to do this?

 Thanks
Andy
----- Original Message ----- 
From: "Barbara Morris" <bmorris@xxxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, June 23, 2005 5:00 PM
Subject: Re: RPG Free Format question


> "Wilt, Charles" wrote:
>> d gDisplayFileControl...
>> d                 ds                  qualified
>> d  exit                   3      3n
>> d  printList              5      5n
>> d  cancel                12     12n
>> d  pagedown              25     25n
>> d  pageup                26     26n
>>
>
> An alternative way of defining an INDDS that's slightly less error prone
> since you only code the position once:
>
> d gDisplayFileControl...
> d                 ds                  qualified
> d  exit                           n   overlay(gDisplayFileControl : 3)
> d  printList                      n   overlay(gDisplayFileControl : 5)
> d  cancel                         n   overlay(gDisplayFileControl : 12)
> d  pagedown                       n   overlay(gDisplayFileControl : 25)
> d  pageup                         n   overlay(gDisplayFileControl : 26)
>
> -- 
> 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 thread ...

Follow-Ups:

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.