Free software training Videos

Free software training Videos

List Of Best WebSites

Wednesday, 9 January 2013

what is open query file in as400

One of the most exotic usages of external files is the open query file, which has nothing to do with query, the utility. An open query file can combine data from many different, related files, but unlike a join file, it can also summarize, reformat and perform mathematical operations upon the data. As always, your program receives its input in the form of a record. The advantage of the open query file is that a great deal of programming can again be "pushed out" of the program, and given to the system to handle. This type of technique can be useful in a "division of labor" situation; for example, experienced AS/400 programmers can create the definitions that other, less-experienced AS/400 programers will use. 
 The Open Query File command. OPNQRYF, is a lot like creating a temporary logical file that disappears when the job is done. It not only resequences the data but can easily select a subset of the records. It resembles Structured Query Language (SQL) in structure. With it you can join records from different files, group records together and even calculate new field values.
list of the major functions supplied by OPNQRYF

  • Dynamic record selection
  • Dynamic keyed sequence access path
  • Dynamic keyed sequence access path over a join
  • Dynamic join
  • Handling missing records in secondary join files
  • Unique-key processing
  • Mapped field definitions
  • Group processing
  • Final total-only processing
  • Improving performance
  • Open Query Identifier (ID)
  • Sort sequence processing

  • Using the Open Query File (OPNQRYF) Command
  • Creating a Query with the OPNQRYF Command
  • Using an Existing Record Format in the File
  • Using a File with a Different Record Format
  • OPNQRYF Examples
  • CL Program Coding with the OPNQRYF Command
  • The Zero Length Literal and the Contains (*CT) Function
  • Selecting Records without Using DDS
  • Considerations for Creating a File and Using the FORMAT Parameter
  • Considerations for Arranging Records
  • Considerations for DDM Files
  • Considerations for Writing a High-Level Language Program
  • Messages Sent When the Open Query File (OPNQRYF) Command Is Run
  • Using the Open Query File (OPNQRYF) Command for More Than Just Input
  • Date, Time, and Timestamp Comparisons Using the OPNQRYF Command
  • Date, Time, and Timestamp Arithmetic Using OPNQRYF CL Command
  • Using the Open Query File (OPNQRYF) Command for Random Processing
  • Open Query File command: Performance Considerations
  • Open Query File command: Performance Considerations for Sort Sequence Tables
  • Performance Comparisons with Other Database Functions
  • Considerations for Field Use
  • Considerations for Files Shared in a Job
  • Considerations for Checking If the Record Format Description Changed
  • Other Run Time Considerations for the OPNQRYF command
  • Typical Errors When Using the Open Query File (OPNQRYF) Command
  • No comments:

    Post a Comment