Well here I go again!
First I’d like to say to Birgitta – Notice my sqldata is now called MySqlData…
Here is the cursor definition
Then I have a page at a time subfile… where the page down works smashingly
Variables for the selection
So now the question my pageup/rolldown looks like this.
Can I position up 20 records without actually reading the data?
If anyone cares here is the load subfile section
First I’d like to say to Birgitta – Notice my sqldata is now called MySqlData…
Here is the cursor definition
Code:
*-------------------------------------------------------- * openList - Open a cursor to read file *-------------------------------------------------------- p openList b d openList pi /free exec sql declare MyCursor scroll cursor for statement; exec sql prepare statement from :mysqlstmt; exec sql open mycursor;
Code:
//---------------------------------------- // $read next group of records //---------------------------------------- begsr $ReadNext; exsr $clearSubfile; exec sql fetch from mycursor for :Rows rows into : mysqldata; exsr $writeSubfile; endsr;
Code:
d mysqldata e ds extname(ii) occurs(10) qualified d rows s 5 0 inz(%elem(mysqldata))
Can I position up 20 records without actually reading the data?
Code:
//---------------------------------------- // $read previous group of records //---------------------------------------- begsr $ReadPrevious; exsr $clearSubfile; for count2 = 1 to (Rows*2); exec sql fetch prior from mycursor into :mysqldata; endfor; exsr $ReadNext; endsr;
Code:
//-------------------------------------------------------- // $writesubfile - wrote the group of records... //-------------------------------------------------------- begsr $writesubfile; if SavRrn1 > *zeros; RRN1 = SavRrn1; SCRRN1 = SavRrn1; endif; rows_fetched = SQLER3; for count = 1 to rows_fetched; clear sub01; %occur(mysqldata) = count; s1item = MySqlData.icat; s1iname = MySqlData.idsco; RRN1 += 1; SCRRN1 = RRN1; write SUB01; endfor; // *in33 = *on; savrrn1 = rrn1; endsr;
Comment