Hi,
As i Know in expandable subfile rollup handeled by programer and rolldown system automatic handeled
but in my program rolldown is not working, here i mention some code of my program
in dds ROLLUP(20)
if *in20=*on and *in43=*on (43 is SFLEND(*MORE) )
eval frn=0
eval *in42 = *on (SFLCLR)
write EMPCF
eval *in42 = *off
loadsr
endif
Thanks in Advnace
In expandable sub file page down(roll up) handled by programer and page up (roll down) system automatic handled.
M i right or not if sub file have SFLSIZ(0010) SFLPAG(0009)
in dds ROLLUP(20)
if *in20=*on and *in43=*on (43 is SFLEND(*MORE) )
eval frn=0
eval *in42 = *on (SFLCLR)
write EMPCF
eval *in42 = *off
loadsr
endif
This looks entirely wrong for a growing sufbile
1. You don't clear the subfile before adding additional reows
-- eval frn=0 <-- don't reset RRN counter
-- eval *in42 = *on (SFLCLR) <-- don't clear subfile
-- write EMPCF <-- don't clear subfile
-- eval *in42 = *off <-- don't clear subfile
2. Do run a routine or procedure like loadsr
-- this procedure should start as if the first record to be added is currently in memory
no SETLL or READ before creating and writing the first subfile record
and the RRN (fn???) is ready to be added to
Phil
You'll probably need to press page down to create the second page but the system will position the cursor on redisplay on the first page and you'll have to press page down again to see the second page . That's a different issue requiring the DDS keyword
A SFLRCD 4S 0H SFLRCDNBR(CURSOR)
If you use this, you will have to populate SFLRCD with the RRN of the first record you want to display every time before you issue an EXFMT.
In expandable sub file page down(roll up) handled by programer and page up (roll down) system automatic handled.
M i right or not if sub file have SFLSIZ(0010) SFLPAG(0009)
as i post above ,i am confuse for roll up and roll down
The concept is that each time user presses page down key
another page of rows is added to the subfile
Lets say that the subfile has 10 rows per page.
Then the initial load is 10 rows.
When the screen showing the last page is displayed and user presses page down
Processing is returned to the program though the PageDn (RollUp) key
the program then populates subfile rows 11-20.
This process continues whenver the last page is displayed and user presses pageDn
until the end of the data file is encountered (changing the SFLMOR display and turning off the indicator that allows the PageDn (RollUp) key.
This process will also stop if 9999 rows are loaded into the subfile.
Setting SFLSIZ to 10 and SFLPAG to 9 will allow the file to grow as necessary up to the max of 9999 rows.
fine in my program page down(Roll up) key work fine but page up key dose not work
if i pressed roll up key once subfile showing 9 record but wen i want to go first page and pressed roll down key it the screen still on second page ........
fine in my program page down(Roll up) key work fine <--appears to work
second page is displayed.
does first page still exist in memory?
PageUp key should not be coded in DDS
On second page press page down -
- message top --- do you get this message?
- you must have wiped out the first page when you created the second page
The subfile clear logic must only be used when you want to start a new subfile, not when you add a page.
Phil
...page down(roll up) handled by programer...
That is true when the key is pressed at the end of the subfile. If the user has scrolled backwards to a previous page, then the system will handle page down(roll up) until reaching the end of the subfile. When the end is reached, that's when the system hands control back to the program.
The "end" means the "current end". If it's an expandable subfile, the program is allowed to add more pages. When more pages have been added, the end of the subfile has been moved down.
In any case, as Phil has said, if you execute SFLCLR, then the previous pages have been erased. You cleared them. They are gone. The page up (roll down) has nowhere to go.
So don't do SFLCLR until you need to clear the subfile.
Tom
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!
Discuss This Question: 12  Replies