Database Application Processing
Database procedures are called from the application program whenever an I/O function is required. Each Lawson database file or table has its own procedures that are called whenever the database is accessed for inquiries or updating.
The source files for the procedures for accessing the database
are in the $LAWDIR/productline/rpg/dbiosrc
directory. The names of these source files consist of the letters
"DB," followed by a two-character application system code,
a three-character file identifier for the database file, and the letter
"P." There is a corresponding source file ending in the
letter "D" that contains the definition specifications
for the record and the procedures.
For example, DBHRPRSP.COPYILE contains the procedures and DBHRPRSD.COPYILE contains the data definition specifications that are compiled into the application program so that program can access the PRSYSTEM (DBHRPRS) file.
To access a database for I/O functions, the application program
-
selects the access path by loading the logical file name into a unique variable and updating the key fields
-
calls the procedure compiled from the DBxxxxxP.COPYILE file, which in turn calls LARPGRTS (Lawson RPG runtime system), which in turn calls the database driver.