RPGspRunQry Function


Embeds an iSeries (AS/400) query within an RPGsp page. Does not return a value.


Syntax

RPGspRunQry( [library /] query name [: header rows : library / file : member : ignore line] )

Part Description
library / query name Required. Indicates the name of an existing iSeries (AS/400) query to execute and the library where the query is located. If library is omitted, the Run-time Library List is used. You may also specify '*NONE'.
header rows Optional. Specifies the number of rows taken up by column headings. This allows RPGsp to highlight column headings and to avoid repeating header rows in the report. If omitted, header rows defaults to a value of 1.
library / file Optional. Specifies the database file to be queried and the library where the file is located. If library is omitted, the Run-time Library List is used. This parameter overrides the file defined within the query. The file parameter is required if query name is '*NONE'.
member Optional. Specifies the file's member name to be queried. If omitted, the first member is used.
ignore line Optional. Identifies a specific line of text not to be shown within the query. This may include a specific header or footer line that you want to show in a spooled version of the query, but hide in the Browser version of the query.


Remarks

You can either provide a named query or run the function over a specific database file by specifying '*NONE' for the query name. The query is presented in an HTML table. You can surround the call to RPGspRunQry with any HTML/RPG code as necessary to prepare the data and to present page headers and footers.


Examples

The following line runs a query in library RPGSP, indicating that the column headings take up 2 rows.

     C                   CallP     RPGspRunQry('RPGSP/MYQRY':2)


The following line runs the same query, but overrides the File and Member.

     C                   CallP     RPGspRunQry('RPGSP/MYQRY':2:
     C                             'QTEMP/STAT1P':'JANUARY')


The following call lists records in file ITM001P.

     C                   CallP     RPGspRunQry('*NONE':1:'ITM001P')


See Also

QCMDEXC


Profound Logic Software, Inc.
www.ProfoundLogic.com
(937) 439-7925