Filter records with a certain value in AS/400 subfile

285 pts.
Tags:
AS/400
AS/400 Subfiles
did the above steps but its not working… Example::

 —————————————– FLD1 FLD2 FLD3 AAA AAAA AAAAA AAA AAAA AAAAA AAA AAAA AAAAA rrn = 3 —————————————– BB ______ _________ 

I need to filter the records having the value BB, but there are no records having that value. There are no records having the value as BB. Now rrn = 0 in this case i need to display subfile with rrn = 0.


Software/Hardware used:
AS400

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • philpl1jb
    You could load one row which says -- no records exist Or you could set the indicator for DSPSFL off, DSPSFLCTL on and exfmt the control this will show the headings with blank space were subfile would be. Phil
    49,550 pointsBadges:
    report
  • NickHutcheson1
    D NoRcds         C                   'No More Records          '
    
    C     SrLoad        BEGSR                          
    C                   Clear                   Cnt    
    C                   eval      rrn = lastrrn        
     * Load one Page at a Time                         
    C                   DOU       Cnt = sflpag         
     *                                                 
    C                   IF        *in73 or rrn = 9999  
    C                   LEAVE                          
    C                   ENDIF                          
     *                                                 
    C                   ExSr      SrRead               
    C                   If        *in73                
    C                   Leave                          
    C                   EndIf                          
     *                                                 
    C                   ExSr      $mov2sfl             
    C                   EVAL      RRN = RRN + 1        
    C                   EVAL      Cnt = Cnt + 1        
    C                   WRITE     sflrcd               
     *                                                 
    C                   ENDDO                                 
     * No Records?                                            
    C                   If        RRN = *Zero                 
    C                   Eval      RRN = 1                     
    C                   Clear                   sflrcd        
    C                   WRITE     SFLRCD                      
    C                   EndIf                                 
     *                                                        
    C                   If        CNT = *ZERO                 
    C                   Eval      message = NoRcds            
    C                   Eval      *in88 = *on                 
    C                   LeaveSr                               
    C                   EndIf                                 
     * Save the last rrn                                      
    C                   eval      lastrrn = rrn               
     *  Set Subfile to top before display                     
    C                   EVAL      RRN = RRN - Cnt + 1         
     *                                                        
    C                   ENDSR           
    1,380 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following