Record does not fit in subfile for file

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
ZoeW
Profound User
Posts: 24
Joined: Thu Jan 07, 2016 9:24 am
First Name: Zoe
Last Name: W
Company Name: Previously Anker International
Country: United Kingdom
Contact:

Record does not fit in subfile for file

Post by ZoeW »

Hi, first post and new user to Profound UI (which is a great product BTW :))

I am experiencing a strange issue when populating a grid, it seems to be objecting to the size of SFLPAG. I've done a few other grids without any issue and have checked the properties of these with the new grid - there does not appear to be any differences.

To diagnose the problem I created a really simple, small program with a grid containing one field and the issue still persisted. With traditional DDS the SFLSIZ value would be at least 1 greater than SFLPAG, so I can 'fix' the problem by changing SFLSIZ to 2 in QSFLCTL001 in the DDS, which I know I'm not supposed to do.

Without the 'fix' the program will crash when it writes the second subfile record (observed when debugging the program).

Any thoughts on what's up with this?

Below is the code from my simple grid program and the full error message.

Code: Select all

H DatFmt(*iso) DftActGrp(*No) Option(*SrcStmt: *NoDebugIO)          
H PgmInfo(*PCML:*MODULE) ActGrp(*Caller)                            
FSOP999SW  CF   E             WORKSTN HANDLER('PROFOUNDUI(HANDLER)')
F                                     SFILE(sfl1:sfl1rrn)           
                                                                    
FSOPWODP   IF   E             Disk                                  
                                                                    
 /free                                                              
                                                                    
  Read SOPWODP;                                                     
  DoW Not %EoF;                                                     
    s1product = odproduct;                                          
                                                                    
    sfl1rrn += 1;                                                   
    Write SFL1;                                                     
    Read SOPWODP;                                                   
  EndDo;
  
  exfmt scrnmain;        
                        
  return;                
 /end-free                                                                             

and the DDS source:

Code: Select all

A          R SFL1                      SFL                                 
A            QPUI000001     1A  O  2  2                                    
A            S1PRODUCT      8A  H                                          
A          R QSFLCTL001                SFLCTL(SFL1)                        
A                                      SFLSIZ(0001)                        
A                                      SFLPAG(0001)                        
A                                      SFLDSP                              
A                                  1  2HTML('QPUISFLSCRNMAIN')             
A          R SCRNMAIN                                                      
A                                  1  2HTML('QPUICTL1    SFL1      4    RS-
A                                      FLDSP    0     RSFLDSPCTL 0     RSF-
A                                      LPAG    1    C1    6 RSFLSIZ    1  -
A                                        C2    99 0    0    ')             
A                                  1  2HTML('{"screen":{"record format nam-
A                                      e":"scrnMain"},"items":[{"id":"sfl1-
A                                      ","field type":"grid","css class":"-
A                                      crystal-grid","left":"40px","top":"-
A                                      45px","number of rows":"7","number -
A                                      of columns":"1","column widths":"15-
A                                      0","column headings":"Heading 1,Hea-
A                                      ding 2,Heading 3","header height":"-
A                                      26","row height":"26","height":"182-
A                                      px","width":"151px","record format -
A                                      name":"sfl1","subfile record number-
A                                      ":{"fieldName":"sfl1rrn","dataLengt-
A                                      h":"5","decPos":"0","numSep":"false-
A                                      ","zeroBalance":"false","numBlankFi-
A                                      ll":"false","zeroFill":"false","noE-
A                                      xtraSpaces":"false","curSym":"","da-
A                                      taType":"zoned","formatting":"Numbe-
A                                      r","negNum":"-999.00","units":""},"-
A                                      subfile size":"99"},{"id":"s1produc-
A                                      t","field type":"output field","css-
A                                       class":"outputField","value":{"fie-
A                                      ldName":"s1product","dataLength":"8-
A                                      ","trimLeading":"false","trimTraili-
A                                      ng":"true","blankFill":"false","rjZ-
A                                      eroFill":"false","dataType":"char",-
A                                      eroFill":"false","dataType":"char",-
A                                      "formatting":"Text","textTransform"-
A                                      :"none","designValue":"[s1product]"-
A                                      },"left":"55px","top":"5px","grid":-
A                                      "sfl1","column":"0"}]}')            
A            SFL1RRN        5S 0H                                          
Message details

Code: Select all

Message ID . . . . . . :   CPF5043       Severity . . . . . . . :   30       
Message type . . . . . :   Sender copy                                       
Date sent  . . . . . . :   28/01/16      Time sent  . . . . . . :   15:13:32 
                                                                             
Message . . . . :   Record does not fit in subfile for file SOP999SW in      
  library WEBLIB.                                                            
Cause . . . . . :   If SFLSIZ equals SFLPAG, SFL cannot be extended.  Subfile
  page contains available screen lines, but not enough to contain specified  
  record.  If SFLSIZ does not equal SFLPAG, SFL cannot be extended. The      
  internal space used for the subfile has reached the maximum space size.    
Recovery  . . . :   Reply C causes the request to be canceled and CPF5104 to 
  be sent.  Reply I causes the request to be ignored and processing to       
  continue.  If the message was verified, the verifying program gained       
  control.  If not, the system used the default reply.                       
  
Thanks in advance.

Zoe
dieter
Experienced User
Posts: 122
Joined: Tue May 22, 2012 6:45 am
First Name: Dieter
Last Name: Schröder
Company Name: Ecclesia Holding GmbH
State / Province: Outside Canada/USA
Country: Germany
Contact:

Re: Record does not fit in subfile for file

Post by dieter »

Hello Zoe,
i compared your DDS with my DDS. I think it looks OK. Maybe you forgot to increase the sfl1rrn?

Dieter
ZoeW
Profound User
Posts: 24
Joined: Thu Jan 07, 2016 9:24 am
First Name: Zoe
Last Name: W
Company Name: Previously Anker International
Country: United Kingdom
Contact:

Re: Record does not fit in subfile for file

Post by ZoeW »

Hi Dieter

I am increasing sfl1rrn by one each time, as normal.

Thanks

Zoe
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Record does not fit in subfile for file

Post by Scott Klement »

Zoe,

Usually when I see this error it's because someone tried to run a Rich Display inside Client Access or a similar environment where you can only run green-screens.

Try running your program from either a Genie or Rich Display session.

Good luck!
ZoeW
Profound User
Posts: 24
Joined: Thu Jan 07, 2016 9:24 am
First Name: Zoe
Last Name: W
Company Name: Previously Anker International
Country: United Kingdom
Contact:

Re: Record does not fit in subfile for file

Post by ZoeW »

Hi Scott,

if I run the program from Atrium it will only write a few records before crashing.

Regards

Zoe
Scott Klement
Experienced User
Posts: 2711
Joined: Wed Aug 01, 2012 8:58 am
First Name: Scott
Last Name: Klement
Company Name: Profound Logic
City: Milwaukee
State / Province: Wisconsin

Re: Record does not fit in subfile for file

Post by Scott Klement »

I took the code you posted, created a SOPWODP file with 9999 records in it, and ran your program. It loads all 9999 records and does not give any errors.
ZoeW
Profound User
Posts: 24
Joined: Thu Jan 07, 2016 9:24 am
First Name: Zoe
Last Name: W
Company Name: Previously Anker International
Country: United Kingdom
Contact:

Re: Record does not fit in subfile for file

Post by ZoeW »

Hi Scott

I ran the program again today, with SFLSIZ set back to 1 and weirdly it works fine.

I can only conclude that the system is behaving now that the head of IT is back from holiday...
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests