Dynamic Select

770 pts.
 What is the purpose of DYNSLT (Dynamic Select) keyword?Why do we use Dynamic Select.?

Software/Hardware used:

Answer Wiki

Thanks. We'll let you know when a new response is added.

Instead of having the overhead of dynamic access path maintenance, you can use this keyword.
Here is a link to and IBM site that will give you more information

Discuss This Question: 6  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • ankit2002
    Charlie I tried the same link for reading and making the concept clear however I did not the exact concept can you make the concept clear to me..?
    770 pointsBadges:
  • CharlieBrowne
    Only a Physical file contains data. Logical files just contains pointers for processing the data in a specific sequence and/or subset of data. When a record is added/changed/deleted in a physical file, the system has to put a lock on the it and then go out to check and update any logical files before it can release the lock. While the amount of time to do this is hardly measurable, it can be signicant if massive batch updates are done to a file. If you are using the Select/Omit option in your DDS and using DYNSLT, the above process does not need to be done at record update time. Where this is benefical is when yourt selection process includes almost all the records in the file. Now when you process using DYNSLT, it will read all the records in the file, but do the selection of which records to process at that time rather than having done all the maintenance ahead of time. Here's an example that might make it more clear. Lets say you have a very large file and one of the fields is a STATUS CODE and that value is constently changing with different batch processes. You have a Logical that selects only a specific status code. This Logical is only used for a month end report and at the time that it runs most of the records will have be set to be selected. So now by using DYNSLT, the program will take about the same amount of time to process but all the access path maintenance thoughout the month did not have to be done.
    62,280 pointsBadges:
  • BigKat
    If you are familiar with SQL, it is kinda like using a view. Only when you open the view does it process the query to determine the data set. In a similar manner, only when you open a DYNSLT logical does it determine the records to include/omit.
    8,760 pointsBadges:
  • ankit2002
    @Charlie:Tks a lot for such an elaborated explanation. @BigKat:Nice example,tks.
    770 pointsBadges:
  • TomLiotta
    CharlieBrowne gave a good summary of DYNSLT, and BigKat appropriately compared it to a SQL VIEW. Multiple factors go into choosing DYNSLT or leaving it out. A logical file might be in use by thousands of users (or jobs) at the same time. It won't always be most efficient for each individual job to make dynamic selection. If the system can do it once for the access path, then each job can rely on that access path without dynamic selection. But if a logical file is rarely in use by jobs, the system won't have to take time to update that access path every time the physical file is changed. The rare job can make its selection dynamically. Number of jobs, number of records, number of updates and other factors might make significant differences in performance. The differences might be in individual jobs (localized job performance) that use that logical file, or they might show up in all jobs (system-wide performance) as DB2 takes more or less time in updating the access path. Tom
    125,585 pointsBadges:
  • philpl1jb
    Great responses. If I remember correctly, which rarely happens, DYNSLT allows other logicals (with the same keys) to share the index. Phil
    54,090 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: