Writing CALLP Statements Using Database Routines
Write a CALLP statement to one of the three database input/output procedures for a file using the appropriate operation. The three types of input/output procedures are:
-
D<FilePrefix>@IO(<Procedure>)
where <FilePrefix> indicates the database file and <Procedure> indicates the specific I/O operation. This procedure type includes operations that apply to an entire record.
Example: DVDR@IO(E@DBSTORE)
where VDR indicates the DBAPVDR or AP Vendor Address file and E@DBSTORE is the procedure to add or update a record.
-
DN@<Logical>(<Procedure>)
where <Logical> identifies the database file and index to use and <Procedure> indicates the specific I/O operation. This procedure type includes operations that apply to single records or a range of records based on an index.
Example: DN@DBARARH6(E@DBFINDBEGRNG)
where DBARARH6 indicates that the ARH6 index should be used and the procedure (E@DBFINDBEGRNG) is to find the first record in a range. The ARH6 index is for the AR Transaction Header file (DBARARH)
-
DS@<Logical>(<Procedure>)
where <Logical> identifies the database file and index to use and <Procedure> indicates the specific I/O operation. This procedure type includes operations that apply to a subrange of records based on an index and to aggregate operations.
Example: DS@DBAPVEN2(E@DBFINDSUBRNG)
where DBAPVEN2 indicates that the VEN2 index should be used and the procedure (E@DBFINDSUBRNG) is to find the first record in a subrange. The VEN2 index is for the Vendor file (DBAPVEN)
Example of a CALLP Statement
|