ADDR Verb - Load Public Program as Resident

Syntax

ADDR fileid{,ERR=lineref}

Description

The ADDR verb loads a public program into memory as a resident program.

Note:

Although the ADDR and DROP verbs are functional in BBj, their use is discouraged. Because the BBj program cache automatically adds and drops programs as needed, explicitly adding and dropping programs is no longer necessary and can interfere with BBj's automatic caching.

In BBj 20.0 and higher, setting the IGNORE_ADDR_DROP STBL("!COMPAT") option to TRUE will cause BBj to ignore the ADDR and DROP verbs. After setting this option to TRUE, legacy applications should be carefully tested to ensure that they don't include assumptions about the values returned by the PUB() function.

Parameter

Description

fileid

Public program to be loaded.

ERR=lineref

Branch to be taken if an error occurs during execution.

Use ADDR on frequently called public programs to reduce access time. If ADDR is already specified in the program, an error is returned. The DROP verb removes an ADDR program from memory.

Examples

>ADDR "XYZ"
1000 ADDR "XYZ",ERR=9500

PRO/5 remembers the ADDR program by the name used in the ADDR statement. For a CALL (or DROP) statement to access the ADDR program, the CALL statement must use the exact same name. For example, if the following ADDR statement were executed,

>ADDR "MYPROG"

the following CALL and DROP statements would be used:

>CALL "MYPROG"
>DROP "MYPROG"

The following example statements would not call the resident program specified with the ADDR verb. Each program would be continuously reloaded, significantly increasing access time:

>CALL "C:MYPROG"
>CALL "myprog"
>CALL "/BASIS/VPRO5/MYPROG"

See Also

Verbs - Alphabetical Listing