image\bbj40.gifMiscellaneous Language Changes for BBj


General Language Enhancements

Program Pinning

When BBj encounters the command CALL filename, it executes an algorithm to find and load the correct program file. BBj traverses the disks and directories defined by PREFIX and DSKSYN statements in the current configuration. After finding the correct file, BBj checks the program cache to determine whether the program file is already in memory. If the file is in memory, BBj then examines the file on disk to determine whether it has been modified since the file in memory was loaded. In most cases, and especially if the PREFIX list is long, BBj is required to make a number of calls to the filesystem.

This algorithm ensures that the next time the command CALL filename with the same filename is encountered:

If BBj Services is configured to pin previously loaded programs, the standard search algorithm will not be executed. Instead, BBj will continue to use the same file each time it encounters CALL filename, unless the process has executed CHDIR or SETDRIVE. If either CHDIR or SETDRIVE has been executed, then BBj will re-do the standard search algorithm the next time it encounters CALL filename.

It is common practice for BBx developers to create a new file on disk or to modify an existing file anticipating that programs will immediately begin to use the new/modified file. If programs are pinned, then they will not use the new/modified file when the file can be obtained from the program cache.

To make all programs load a new/modified file, use the Enterprise Manager if program pinning is enabled. The Environment Tab in the Enterprise Manager contains an "Unpin All Programs" button. This button is only available when 'logged' into BBj Services. Clicking this button causes BBj to execute the standard search algorithm to find the file filename the next time BBj encounters the command CALL filename. After the program is reloaded, it becomes repinned and the standard search algorithm will not be executed in subsequent CALLs to the same program name.

Memory Requirements

While PRO/5 uses a fixed workspace allocated by the -m parameter or the START verb, BBj uses whatever memory was allocated to the JVM in which it is running. Therefore, the workspace concept is not applicable to BBj.

Numeric Expressions

String Templates