I have a subfile program that is loaded via SQL. I want to add a "position to" field to allow the user to reposition the subfile. How do I code the SQL to perform this function?
Never heard of anybody building a subfile from SQL before.
If you have a large file you are reading a lot of records that you might not need to read if you used a SETLL on a logical file.
I could be wrong, but for a 'position to', I don't think you can without creating a procedure that reads through the subfile records after they have been loaded from SQL and doing a comparison between the required 'poisition to' value and the field you are comparing it to.
Once you have found the record that first satisfies your criteria, set the subfile relative record number ( SFLRCDNBR ) to the record you want to be at the top of your subfile page.
Thanks for the input, but I figured it out. The reason I am using SQL for the subfile is to allow the users a flexible way to search on names. I used the positon to as a variable in the SQL and did a search that was >= to the varible which set the subfile beginning with the search variable and records following it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.