Selecting records using the Open Query File (OPNQRYF) command
These examples show how to select database records using the Open Query File (OPNQRYF) command.
In all these examples, it is assumed that a single-format database file (physical or logical) is being processed. (The FILE parameter on the OPNQRYF command allows you to specify a record format name if the file is a multiple format logical file.)
- Example 1: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to select records with a specific value using the Open Query File (OPNQRYF) command.
- Example 2: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to select records with a specific date value using the Open Query File (OPNQRYF) command.
- Example 3: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to select records in a range of values using the Open Query File (OPNQRYF) command.
- Example 4: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to select records using the contains function of the Open Query File (OPNQRYF) command.
- Example 5: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to select records by specifying multiple fields on the Open Query File (OPNQRYF) command.
- Example 6: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to use the Open Query File (OPNQRYF) command many times in a program.
- Example 7: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to map fields for packed numeric data fields using the Open Query File (OPNQRYF) command.
- Example 8: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to select records using the wildcard function of the Open Query File (OPNQRYF) command.
- Example 9: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to specify complex selection statements when you select records using the Open Query File (OPNQRYF) command.
- Example 10: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to use coded character set identifiers (CCSIDs) when you select records using the Open Query File (OPNQRYF) command.
- Example 11: Selecting records using the Open Query File (OPNQRYF) command
This example shows how to use a sort sequence and a language identifier when you select records using the Open Query File (OPNQRYF) command.
Parent topic:
Selecting records without using DDS
Related concepts
Control language