The .r command executes stack statements stored in a file item.
The .r (run) command is used in conjunction with the .c (copy) command to save frequently performed command procedures and recall them for execution. The .r command executes one or more stack statements that have been stored in a file item with the .c command. You can also load these statements into the stack, and then selectively execute them.
.r [dict] filename item-ID [(L)]
|dict||Specifies the file dictionary.|
|filename||Specifies the name of the file.|
|item-ID||Identifies the item in the filename that contains the stored statements you want to execute.|
|L||Loads the statements in item-ID into the stack without executing them.|
After each command executes, it becomes statement 1 in the stack.
To stop executing the statements stored in the file item, press BREAK. Even though all of the statements in the file item have not been executed, they will all be stored in the stack.
>.R TC ORDER-REPORTS SORT ORDERS BY DATE BY CUST-ID BREAK-ON QUARTER (P) [The command is executed.] SORT ORDERS BY DATE BY CUST-ID BREAK-ON MONTH (P) [The command is executed.] SORT ORDERS BY DATE BY CUST-ID BREAK-ON WEEK (P) [The command is executed.] >
>.L3 001 SORT ORDERS BY DATE BY CUST-ID BREAK-ON WEEK 002 SORT ORDERS BY DATE BY CUST-ID BREAK-ON MONTH 003 SORT ORDERS BY DATE BY CUST-ID BREAK-ON QUARTER
>.R TC ORDER-REPORTS (L) >
You can now selectively execute any of the statements with the .X command.