1.5 Other File Opening Considerations

By default, all RDML functions attempt to "overlap" the first user/screen interaction with a mass opening of all the databases files which will be used by the function. In other words, while the user is working with the first screen, a concurrent open of the database is being performed. Effectively, this technique is designed to reduce the user's perceived response time.

Although this approach always works, in some situations it does not perform the required action in the best possible way. For example, some of the situations where this action may not be the best result are:

<< if running online >> 

        get report parameters and submit report job 

<< else >>

        produce required report using report parameters 

<< endif >>

 

In the above case, obviously no database files whatsoever are required when the job is running online. Only when the job is running in batch and the report is being produced are the database files needed.

Performance of the online portion of this program (and any other program that does not need to keep open all its files) may be considerably improved by inserting this command which states that database files should only be opened when they are used (ie: on demand):

                  OPEN FILE(*ALL) USE_OPTION(*ONDEMAND)

 

                OPEN FILE(*ALL) USE_OPTION(*ONDEMAND)

     then the RDML compiler will decide that there is never any need to overlap file opens with the first screen I/O, and will thus use DFRWRT(*YES) when creating the associated screen display file. This should improve perceived response time for remote users and reduce the overall system load of the program.