Data queues are an integral part of the operating system of the IBM i. This article shows you how data queues can extend the functionality of system objects you use every day.
Written by Joe Pluta
In my previous twoarticles on data queues, I focused more on the technical details of using the data queue APIs in your programs. This article is a little different: it centers on the ways that data queues are used by the IBM i itself. Seeing how IBM uses data queues may give you some ideas as to how they could be applied in your own applications. The three areas I'm going to cover today include display files, output queues, and the alert function.
In IBM i, high-level language (HLL) programs are dependent on receiving, at run time, an externally described file (a database file, or a device file, such as a display file, or a printer file) whose format agrees with what was copied into the program at compilation time. For this reason, the system provides a level-checking function that ensures that the format is the same. Level-checking occurs on a record-format basis when the file is opened unless you specify LVLCHK(*NO) when you issue a file override command or create a file. If the level-check values do not match, the program is stopped by a level-check error, aka the CPF4131 error message.