Last Update: 26 June 2008
Product: StarSQL
Version: 5.x
Article ID: SQV00SQ035
By default, a SELECT statement against a physical file containing multiple members returns the first member of the file. This document explains how to use StarSQL to access members in multi-member files on the AS/400 system.
This example shows how to access files using Microsoft Query, and it assumes the following:
This results in the contents of the first member of the file.
The first parameter is the OVRDBF command. The second parameter is the number of characters, including spaces, between the single quotes in the OVRDBF command, which in this case is 65. Note: The second parameter must be contain exactly 15 digits: ten to the left of the decimal and five to the right. (If you are building a custom application, you can write a module to count the length of the command and create the second parameter for you.)
For example, to access member SRCVR in file QCSRC, if you know that it is NOT the first member of the file, issue the following command:
CALL QSYS.QCMDEXC('OVRDBF FILE(QCSRC) TOFILE(DAVIDLIB.QCSRC) MBR(SRCSVR) OVRSCOPE(*JOB)', 0000000068.00000)
SELECT * FROM DAVIDLIB.QCSRC
This returns the contents from the member SRCSVR.
The information in technical documents comes without any warranty. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The information in technical documents may be gathered from various sources, including IBM, Microsoft, and other organizations.