Comments and Examples
BR automatically closes the most recently executed, active procedure file before opening and executing the procedure file specified with the PROC command. If a procedure is executed from a sub-procedure, the calling sub-procedure is canceled, but its parent remains active.
The following command causes the procedure file PROCNAME, located on drive B, to be opened and executed:
The next command starts execution of the procedure file START. The asterisk prevents F2 logging of the commands within START.
- Log procedure commands for recall by the F2 key
The ECHO parameter reverses the affects of the PROC NOECHO command.
The NOECHO parameter prevents procedure lines from being displayed on the screen as they are executed. This command will apply to all procedures until PROC ECHO is entered or until Business Rules is exited.
The procedure file name parameter identifies the procedure file to be opened and executed. When procedure file name is preceded by an asterisk *, command logging will be turned off. Thus pressing of the F2 key will recall the PROC command, but not the commands in the procedure.
- If an error occurs while PROC NOECHO is active, F2 and F3 can be used to recall and display the error-causing command.
- ALERT commands which are executed while PROC NOECHO is active will not be displayed on the screen. The operator must press F2 or F3 to view the message. Use of PROC ECHO before and PROC NOECHO after the ALERT command is recommended to avoid this situation.
- Each open procedure file counts as one open file against the operating system limit on open files.
- Business Rules closes a procedure before executing the last line in the procedure. This eliminates procedure stacking (and an added open file) in situations such as when one procedure ends with a SUBPROC command to call another procedure, or when RUN is the last command in a procedure, or when a procedure has only one command.
- As the procedure file is closed before the last command is executed, the last command cannot be a SKIP to branch back to an earlier part of the procedure. If you want to end with an option to branch backward, you must add another line (such as a blank line or a remark) to keep the procedure file open.
- Procedure files with names that end in a .$$$ extension will automatically delete themselves when they close. (This feature applies only to procedure files.)
See also Free's Technical Considerations.
CLEAR PROC command.