× 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: =?Windows-1250?q?V=E1lasz=3A_Simple_Subfile_question?=
  • From: Refaie.Heba@xxxxxx
  • Date: Fri, 30 Mar 2001 20:50:16 +0200


Hi Jim

I used to solve this by writing just one empty record to the subfile if the selection from the database result in no records, you can also define a ND non display
Indicator to hide the subfile fields in this case, another way you can set off the subfile display indicator so only the control is shown when you EXFMT.


Kind regards
Heba


Jim Langston <jimlangston@conexfreight.com>
Feladó: owner-rpg400-l@midrange.com

04/04/01 07:33 PM
Kérem, válaszoljon ennek a személynek: RPG400-L

       
                Címzett:  "RPG400-L@midrange.com" <RPG400-L@midrange.com>
                Másolat:  
                Tárgy:  Simple Subfile question                


I don't work on subfiles too often, so this is really a simple question
but...

I am writing a new program and display file with a subfile.  I loaded the
subfile with dummy records and all is well.  Now I am ready to read my
real file, etc.. and I am displaying my screen for user input.  Now I'm
getting a session or device error, and I'm sure it's being caused by the
subfile being empty.

How do I display my subfile with empty records?  Or do I have to check
my SF_RecNum and only display it if it's not zero?

 *** Clear Subfile ***                            
C                   Eval      *IN55 = *On          
C                   Write     SubCtl              
C                   Eval      *IN55 = *Off        
C                   Eval      SF_RecNum = *Zero    
                                                   
C                   DoW       NOT (*IN03 OR *IN12)
                                                   
 *** Display Subfile and get input ***            
C                   Write     Footer              
C                   Write     Header              
C                   Exfmt     SubCtl              
                                                   
C                   EndDo                          

bombs out on the Exfmt SubCtl with
Session or device error occurred in file MNTSTGDFM (C G D F).

However:

 *** Clear Subfile ***                            
C                   Eval      *IN55 = *On          
C                   Write     SubCtl              
C                   Eval      *IN55 = *Off        
C                   Eval      SF_RecNum = *Zero    
                                                   
 *** Load some dummy records ***                        
C                   Eval      DFType = '* Test1 *'      
C                   Eval      DFUnit = 100              
C                   Eval      DFSplt = 10              
C                   Eval      DFCuFt = 100.101          
C                   Eval      DFAmnt = 1000.01          
                                                       
C                   Eval      SF_RecNum = SF_RecNum + 1
C                   Write     SubFile                  

C                   DoW       NOT (*IN03 OR *IN12)
                                                   
 *** Display Subfile and get input ***            
C                   Write     Footer              
C                   Write     Header              
C                   Exfmt     SubCtl              
                                                   
C                   EndDo                          

works, but is obviously not what I want.

Regards,

Jim Langston
+---
| 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.