beautypg.com

Command-line-argument variables – Gasboy CFN III Mgnr's Mnl V3.4 User Manual

Page 204

background image

Making Your Own Commands

Variables for Use in Command Files

Page 188

MDE-4315 CFN Series CFN III Manager’s Manual for Windows NT · August 2004

In two of the last three variables above, %M7C# and %M8C#, the # can be replaced by the
console number, as described, or it can be replaced by a %a-%z user variable (discussed in this
chapter and the Advanced command files chapter) to allow variable selection of the console
number.

Command-line-argument Variables

These are the variables that can be used in command-line arguments:

You can use command-line arguments in command files. Command-line arguments are strings
typed on the command line after the command and separated by spaces. The form is the same
as is used by Windows NT or MS-DOS.

Where you want to use the argument in the file, put a percent sign (%) followed by the position
number of the arguments on the command line. Arguments entered after a command are
numbered from left to right, starting with 1. The first argument after the command is %1, the
second argument is %2, and so on.

For example, you could create a command file called NEWSHIFT.CMD to be executed at shift
changes. Under this example, an employee would later use the NEWSHIFT.CMD file by
typing only its name, NEWSHIFT, without the extension. The employee would also add two
arguments: first, the number of the just-completed shift and, second, the number of the new
shift. The NEWSHIFT command would then perform a LOAD SHIFT upon the second
argument (the number of the new shift) and a PRINT TOTALS upon the first argument (the
number of the just-completed shift).

%M

Miscellaneous options where # stands for:

0 = returns the value (in cents) contained in a non-resettable totalizer that adds the
absolute value of all sale-related items; that is, all sales add to the totalizer,
regardless if they are reversals, returns, payouts, etc. (Must have JOURNAL.LOG
enabled.)
1 = returns the initial drawer balance in SYS_PAR
2 = transaction number of first transaction in file
3 = transaction number of last transaction in file
4 = status of bank modem (0=down, 1=available, 3=connected)
5 = status of CFN modem (0=down, 1=available, 3=connected)

(for 6 - 8 see the discussion in the NEXT CLERK command about the unique shift #s
for every console parameter in SYS_PAR)

6 = if the SYS_PAR parameter is enabled, returns a 1; if disabled, returns a zero
7C# = if the SYS_PAR parameter is enabled, returns the shift number of console
#; if disabled, returns the system’s shift number
8C# = if the SYS_PAR parameter is enabled, returns the shift serial number of
console #; if disabled, returns the system’s shift serial number
9 = returns CFN Remote port config 0=Dumb, 1=ANSI, 2=VT52

Name

Definition

%0

Number of arguments on command line.

%1 - %9

Command line arguments one through nine.

Name

Definition

This manual is related to the following products: