The text of a manual · part 17 of 37
TCL Terminal Control Language Programmer's Manual, pages 161 to 170
Pages 161 to 170 of 362
The original document is the PDF (13 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the VeriFone Tranz 330
Page 161
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
Parameters:
*N - Set Variable
Use the "*N" command to set any variable. On the PNC 330/340, TRANZ
330/340 versions 1.3 or greater, and TRANZ 380, a variable can be any value ranging from 0-65535. On TRANZ versions 1.2 and below and all XL versions the variable value range is 0-255. The terminal will truncate any set variable that is greater than its range. You must use a "#" (pound sign) to indicate a variable, even when using the default variable 0.
WARNING: Setting a variable to an alphanumeric string will have unpredictable results.
Command Description +A Compare Variable *O Arithmetic on Variables +Q Append Variable to Buffer *Q Set Variable from Buffer
Variable Operations
Source Buffer
Destination Buffer
No change No change Terminal Special Conditions PNC 330/340 None XL None TRANZ 330/340/380 None Default Parameter Value Description #V 0 Optional; variable you want to set; when specifying a number as a variable, remember to precede the number with the pound (#) sign; for example, to set the variable 3 to the value of 100, write *N#3,100 c 0 Optional; value associated with variable;
this parameter may be a decimal constant or another variable
Page 162
Examples:
*N_ - Set Variable
Command
Operation
; This routine gets the receipt header MEMORY MAP ; 133 = Print data : Header Line 1
; 134 = Print data : Header Line 2
; 135 = Print data : Header Line 3
; 136 = Print data : Header Line 4
* 719 = Subroutine : Initialize variables
; 720 = Prompt : RECEIPT HEADER #
; 721 = Temporary storage
720=RECEIPT HEADER
719$
*N#1
*N#2.4
*N#3.132
B4.4
A950
12.1.51 *N#4.40 I
*N#4.26
*M
; This routine initializes variables
; Initialize receipt header number to 0
; Initialize loop counter to 4
; Initialize header storage memory location ; Select buffer 4
; Append type of printer
; If the printer type is 100 (a ’3’) then skip ; Else printer type is 200 (a ’2’) so set
; #4 to 40 - maximum number of printable ; columns
; Printer type 100: 26 is the maximum number ; of printable columns
; Return
Page 163
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
Parameters:
O - Move Extraction Pointer Within Source Buffer
Moves the extraction pointer either forward or backward within the source buffer by the number of characters you specify.
Command Description B Select Buffers D Delete Characters from Buffer G Clear Destination H Search for String
+J Buffer Modification Buffer Operations
Source Buffer Destination Buffer
Moves extraction No change pointer n positions
Terminal Special Conditions PNC 330/340 None XL None
TRANZ 330/340/380 None
Default Parameter Value Description n 1 Optional; the number of characters to move the extraction pointer; use a positive number to increment, or a negative number to decrement the extraction pointer (insert a "-" to indicate a negative number)
Page 164
O - Move Extraction Pointer Within Source Buffer
Example: Command Operation
; Get the account data either manually or from the cardreader. Extract the ; expiration date from the Track 2 data and store separately.
131$
B3.3 ; Select source and destination buffer as 3
G ; Clear destination buffer
F1 ; Display fixed prompt "ENTER ACCOUNT #"
E5.3 ; Accept entry from cardreader or keypad, skip 5 ; commands if the input is from the cardreader, ; accept alphanumeric characters
1-3.1 ; If nothing is entered, start over getting input
D ; Delete field separator at end
*L122 ; Get expiration date manually,
U95 ; store account number and expiration date
\7 ; Skip over magnetic stripe handling code
U95 ; Store magnetic stripe data
B.5 ; Select destination buffer 5
G ; Clear destination buffer
H.61 ; Search source buffer for an "=", ; which is start of expiration date
O ; Move extraction pointer 1 past "="
X4 ; Copy the expiration date from source buffer to ; the destination buffer
U96 ; Store the expiration date separately
5 - 100
Page 165
*O - Perform Arithmetic on Variables
Description: | Performs arithmetic operations on a variable. The result of the operation is stored in the first variable, the "v" parameter. On PNC 330/340, TRANZ 330/340 versions 1.3 or greater and TRANZ 380, a variable can be any value ranging from 0-65535. On TRANZ versions 1.2 and below and all XL versions the variable range is 0-255. The terminal will truncate any set variable that is greater than its range. You must use a "#" (pound sign) to indicate a variable, even when using the default variable 0.
Note: Specifying a command parameter as 0 is the same as not specifying the parameter at all and will result in the default value for the parameter being used.
WARNING: Setting a variable to an alphanumeric string will have unpredictable results; it will not execute the command if the divisor is zero.
See Also: | Command Description
Arithmetic Commands:
T Arithmetic on Memory Location Variable Commands:
+A Compare Variable
*N Set Variable
+Q Append Variable to Buffer
*Q Set Variable from Buffer
Category: Variable Operations
Buffer Status: | Source Buffer Destination Buffer No change No change Terminals Supported: Terminal Special Conditions PNC 330/340 None XL Logical operations not supported
TRANZ 330/340/380 None
Command Format:
5-101
Page 166
5 - 102
*O - Perform Arithmetic on Variables
Parameters: Default
Parameter Value Description
#vV 0 Optional; the variable or first operand fe) 0 Optional; the operation code; the default code 0 is addition; operation code options include: 0 addition 1 subtraction 2 multiplication 3. division to produce a quotient 4 division to produce remainder 5 logical AND 6 logical OR 7 logical XOR
Cc Oor1 Optional; the second operand; operand can be either a decimal constant or another variable; if it is not specified and "o" parameter =
0-4, the value is set to 1;
if "o" parameter is 5, 6 or 7, the value is set to 0 Ss 0 Optional; number of commands to skip if result of operation is 0.
Command Operation
Examples: *O#6.0.25 ; Add 25 to the variable 6 *O#7.2.3 ; Multiply the variable 7 by 3 *O#9 ; Increment the variable 9 by 1
Page 167
P - Display Custom Prompts
Description: | Causes the terminal to display the contents of a specified memory location. This command is often used to display custom prompts or other messages stored in general record memory locations.
Note: On the PNC 330 and TRANZ 330/380, the “"P" command will not affect the display until keyboard entry has occurred. For example, if the card is swiped from the idle prompt and a "P" command appears in the code before the "E" or "K" command, the display will not be updated. Use the "V" command if the prompt is to be displayed regardless of data availability.
See Also: Comand Description F Display Fixed Prompt *J Justify Display V Display Buffer
Category: Outputs and Data Display
Buffer Status: Source Buffer Destination Buffer No change No change Terminals Supported: Terminal Special Conditions PNC 330/340 None XL None
TRANZ 330/340/380 None
Command Format:
Default Parameters: Parameter Value Description m 000 Optional; memory location where the prompt is stored; default value, 000, displays download phone no. Examples: Command Operation
; This routine prompts for the tip amount. 60=ENTER TIP AMOUNT
720$ B.4 ; Select destination buffer 4 G ; Clear destination buffer P60 ; Display custom prompt "ENTER TIP AMOUNT" K4 ; Accept dollar amount U90 ; Store the tip amount
5-103
Page 168
5 - 104
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
*P - Specify Communication Characters
Allows you to specify or change the communication characters to be used in the transmit packet. Using this command, you can set the termination character and a special receive character. You can also specify the number of NAKs the terminal will allow before hanging up the telephone connection. This command also allows you to set the modem speed for TRANZ 330 212A terminals.
Note: If using direct custom communications on TRANZ 330 212A, you must use the "*P" command to set the modem baud rate.
Command Description
+D Tone Diai
+F Response ACK
+l Send Over Modem
+K Carrier Control
+M Set Modem Parameters
*R Specify Device, Speed and Format
S Dial Phone Number
*T Specify Timeouts
"V Append Phone Status
+X Transmit Data to Network
+Y Receive Data from Network Communications Control
Source Buffer
Destination Buffer
No change No change
Terminal Special Conditions
PNC 330 None
PNC 340 Not available
XL Parameter a2 not available
TRANZ 330 Parameter a2 available on (212) model and TRANZ 330 M/TELCO
TRANZ 330 (202) Not available
TRANZ 340 Not available
TRANZ 380 None
Page 169
Parameters:
Examples:
*P - Specify Communication Characters
Default Parameter Value Description C1 ETX Optional; the decimal equivalent of the character desired for the termination character of the request packet (character signaling the end of the request packet), such as the ETX; the default value is no change.
c2 STX Optional; the decimal equivalent of a special receive exit character; after sending the transmit packet, the terminal waits for a response packet and watches for this special character; upon receiving the special receive character, the termina! exits the communication subroutine and sends only this character to the response analysis buffer. It will only receive an entire packet if this character is <STX>. Note: The character must be from decimal 1 to 127.
n 3 Optional; number of NAKs that can be sent or received before the terminal hangs up; for example, if the "n" parameter equals 3, terminal can send and receive three NAKs without hanging up; once it sends or receives a fourth NAK, it will hang up; when the "n" equals 0 or blank, the number of NAKS remains at the current value at 0 Optional; multiple ACK protocol specifier; if EOT not received, resend ACK up to 4 times 0 nochange (disabled upon abort) 1 multi-ACK disabled 2 multi-ACK enabled a2 0 Optional; modem speed 0 nochange (300 baud upon abort) 1 300 baud 2 1200 baud
Command Operation
*P23.64..2 ; Set the termination character to ETB,
; and wait for the host response package ; or an "@" sign, enable multi-ACK
Refer to Appendix D for communication examples using this command.
5-105
Page 170
5 - 106
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
Parameters:
Examples:
+P - Timeout in Milliseconds
Allows you to wait for a selected period of time in milliseconds. The default is 1 second, or 1000 milliseconds.
Command Description Ww Wait for Print Buffer *W General Wait
Process and Flow Control
Source Buffer Destination Buffer
No change No change
Terminal Special Conditions
PNC 330/340 None
XL Available on 2.70 and greater TRANZ 330 Available on 3.40 and greater TRAZZ 380 None
Default
Parameter Value Description t 1000 Allows you to wait for a selected period of time in milliseconds. The default is 1 second, or 1000 milliseconds. Valid values can range from 1 to 30000, and if any other value is entered, the default will be used. If you need more than 30 seconds, use the command again to get the required value.
Command Operation
+P ; Wait for 1 second (1000 milliseconds).
+P5000 ; Wait for 5000 milliseconds (5 seconds).
+P800 ; Wait for 800 milliseconds.