The JQLFETCH statement fetches the next result in a compiled jQL statement.
NOTE: This function is only available in jBASE 4.1 and later.
JQLFETCH(Statement, ControlVar, DataVar)
Statement is the result of a valid call to a JQLCOMPILE statement, followed by a valid call to aJQLEXECUTE statement.
ControlVar will receive the ‘control break’ elements of any query. For example, if there are BREAK values in the statement, described here are the totals:
The format of ControlVar is:
Attr 1 Level: 0 means detail line 1 – 25 for the control breaks, the same as the A correlative NB.
Attr2 Item ID
Attr 3 Break control Value is 1 if a blank line should be output first.
Attr 4 Pre-break value for 'B' option in header
Attr 5 Post-break value for 'B' option in header
DataVar will receive the actual screen data on a LIST statement for instance. The format is one attribute per column. Applies Attribute 7 Conversions (or attribute 3 in Prime-style DICTS) to the data. If the property STMT_PROPERTY_FORMAT is set then each attribute is also formatted according to the width and justification of the attribute definition and any override caused by the use of FMT, of DISPLAY.LIKE on the command line –
NOTE that column headers may also affect the formatting for that column.
This function is called until there is no more output (multiple).