As400 Developer Interview Questions And Answers

4 Explain the rpgle TEST opcode and its function with an example

A test opcode is used whenever there is a need to determine whether or not a particular date, time, or timestamp has been accurately recorded. If the date is not valid, the low-level signal will be turned on; if it is valid, the indicator will not be turned on. In order to conduct the tests, operator extenders will be utilized. For example, test (d), test (t), and test (z) will be utilized for the date, the time, and the time stamp, respectively. Date of the test excluding the extended factor by default (z).

1 What is meant by the term “bind by reference”?

When we first create a module, we bind that module to an SRVPGM and then use that SRVPGM in one or more of our programmes, we are implementing a method that is known as “bind by the reference“.

2 In what ways exactly is the utilization of RGZPFM beneficial?

The RGZPFM technique is often utilized by our team if there is a need to recycle previously deleted data in a file for usage in subsequent insert processes. When adding information to a file, it is done so in a specific order that has been set beforehand. If we delete some entries in the middle of other entries, the open spaces that are created as a result wont be used to make way for new records because there wont be enough room. Because of this, the amount of space used up by records that have been deleted keeps growing, and we wont be able to use these records until we use the RGZPFM command to reorganize the storage space that is currently accessible. As soon as we delete the records, the file will be reorganized, and this will cause the record numbers of the remaining records to shift relative to one another. Lets imagine that the bulk of the programs use a particular file since the value of its key is the most common one. If we want to alter the access path of this file from sequential to key, or if we want to change the key value from one to another, we can utilize GZPFM. This will allow us to do either of those things.

  • The use of this file-level keyword specifies that the files selection and omission checks (provided with select/omit specifications) will be performed at runtime. In contrast to the select/omit that is normally associated with access paths, the dynamic variety is indicated by this keyword.
  • You cant save information in anything other than a physical file. All thats in a logical file are references to other locations in the file or to subsets of data that need to be processed in a certain order.
  • To prevent data loss when a record is added, modified, or deleted from a physical file, the system places a lock on the file and then checks and updates any associated logical files. While the time spent doing this is negligible in and of itself, it can add up if a large number of edits need to be made to a file at once.
  • The aforementioned steps are not required during record updates when using the Select/Omit feature of your DDS in conjunction with DYNSLT.
  • This is helpful if your criteria for selecting records encompasses nearly all of those in the file. Now, instead of performing all the necessary upkeep before processing, DYNSLT will read all the entries in the file and choose which ones to process at the time of processing.
  • AS400 interview questions – Part 1

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *