Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 9 of 37

TCL Terminal Control Language Programmer's Manual, pages 81 to 90

Pages 81 to 90 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 81 read from a scan by OCR; it may hold reading errors

Description:

Category:

Buffer Status:

Terminals Supported:

+B - Calculate Block Character Check

Calculates the Block Character Check (BCC) on the contents of the destination buffer and places the result in the designated variable. To allow BCC calculation of data from multiple destination buffers, the initial value of the BCC is understood to be the current contents of the designated variable each time the +B command is executed. The BCC is used as a checksum to ensure validity of communications data; currently the only type of BCC offered is an LRC.

NOTE: Do not attempt the +B command on an empty buffer.

Communications Control

Source Buffer Destination Buffer

No change No change; buffer read

Terminal Special Conditions

PNC 330/340 None

XL 2.60 or greater

TRANZ 330 Available on versions 2.0 or greater* TRANZ 340 Available on versions 2.1 or greater TRANZ 380 “a1" available on versions 1.10 or greater

*The command will not execute in TRANZ 330 version 2.0 if the initial value of the variable is 00. You must first initialize the variable to a non-zero value, execute the command, then exclusive OR (XOR) the result of +B with the | initial value for the correct LRC in the variable.

Page 82 read from a scan by OCR; it may hold reading errors

Command Format:

Parameters:

Examples:

+B - Calculate Block Character Check

Default Parameter Value Description #v 0 Optional; variable to place result of calculation a 0 Optional; the type of BCC 0 LRC 1 CRC (TRANZ 330 3.60+, PNC 330 3.5+, and TRANZ 380 version 1.10+) Command Operation

; This routine builds a packet and calculates the LRC, then appends the ; packet to the <STX> in the transmit buffer

; Packet format is: <STX>account number<FS>expiry

; date<FS>amount<ETX>LRC

; Note that LRC is calculated on packet prior to appending the <STX>

270$ B.1 ; Select transmit buffer as destination G ; Clear destination buffer R2 ; Append B.5 ; Select work buffer as destination G ; Clear destination buffer A75 ; Append account number from memory location 75 R ; Append A76 ; Append expiration date from memory location 76 R ; Append A77 ; Append amount from memory location 77 R3 ; Append +B#0 ; Calculate LRC, add to the variable #0 +Q#0.1 ; Append variable #0 to buffer, converted to ; ASCII char B5.1 ; Select work buffer as source, transmit buffer ; as dest X ; Append work buffer to in transmit buffer

Page 83 read from a scan by OCR; it may hold reading errors

Description:

Category:

Buffer Status:

Terminals Supported:

Command Format:

Parameters:

C - Verify Check Digits

Causes the terminal to perform the LUHN (MOD 10) check digit algorithm on the last data entry or contents of the destination buffer. The command also allows MOD 11 verification. This algorithm is designed to find data entry errors and is used as a fraud control measure to ensure the legitimacy of a credit card account number. MOD 11 only accepts a nine-digit number. A valid account number contains 0-9 digits. A space or control character is not valid.

If the terminal finds an error, it can display the message "BAD ACC’T NUM- BER" and aborts the transaction leaving the message on the display, or skips "s" commands.

(Will not execute properly on Track 1 cardreader data input in TRANZ 330 versions less than 3.60.)

Fraud Control

Source Buffer Destination Buffer

No change No change

Terminal Special Conditions

PNC 330/340 None

XL “s" available on version 2.5 or greater TRANZ 330/340 C2 and "s" available on version 2.1 or greater TRANZ 380 None

Default Parameter Value Description a 0 Optional; Options for this parameter are: 0 verify LUHN check digit within the last data entry

1 verify LUHN check digit within the contents of the destination buffer

2 verify the Mod 11 check digit on the data in the destination buffer

Note: When the "a" parameter equals zero (0), the "C" command must immediately follow the data entry ("E" or "K") command.

s 0 Optional; number of commands to skip if check digit is invalid

Page 84 read from a scan by OCR; it may hold reading errors

C - Verify Check Digits

Parameters: Default (continued) Parameter Value Description s (cont.) 0 If invalid check digit, terminal displays BAD ACC’T NUMBER and aborts <> 0 if invalid check digit, skip this number of commands (allowable values:1-120); a plus skip must not use a "+" sign in the control string. Example: Command Operation

; Get the account data either manually or from the cardreader. ; Do Luhn check digit test.

121$ 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 Ci ; Do mod 10 check digit on manually entered number *L122 ; Get expiration date manually, store account number, ; and expiration date 17 ; Skip over MAG stripe handling code Cc ; Do Luhn check digit U95 ; Store account number and expiration date 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 pass "=" x4 ; Copy the expiration date from source buffer

; to the destination buffer

Note: Following is an example of a LUHN calculation.

if the card number is equal to 4012888888881 881, then the Check digit is equal to the last digit. Check digit = 1.

The calculation is as follows:

40128 8 8 8 8 8 8 818 8 1 x2 x1 x2 x1 x2 x1 x2 x1 x2 x1 x2 x1 x2 x1 x2

8 02216 816 8168 168 2 8 16

Page 85 read from a scan by OCR; it may hold reading errors

C - Verify Check Digits

Add the digits together:

8+0+2+2+1+6+84+1714+6+84+1+6 +8+1+6+8++2+8+%1+ 6 = 89

Round the result up to the nearest multiple of 10 and subtract the sum result from the rounded number:

90 - 89 = 1

The remainder is the check digit of the calculation.

Page 86 read from a scan by OCR; it may hold reading errors

*C - Copy Destination Buffer to Batch

Description: | Copies contents of destination buffer to open batch. If there is not enough memory to add record to open batch, terminal will set data capture error 1, NOT ENOUGH MEMORY.

Note: When programming a PNC/TRANZ 330, this command can only be used to add records to the latest opened batch. Use the +G command for record addition to older batches. The *C command can replace a detail record of the same length in an older batch. Refer to Appendix D of the TRANZ 380 Reference Manual for execution details.

See Also: | Command Description *A Create/Open Batch *B Select Batch *D Delete Batch Information *E Copy Batch Detail to Buffer *F Detect Data Capture Errors +G Append Detail Record to Batch

Category: Data Capture and Batch Operations

Buffer Status: | Source Buffer Destination Buffer No change No change; buffer read Terminals Supported: Terminal Special Conditions PNC 330/340 "s" not available XL "s" not available TRANZ 330/340 "s" not available TRANZ 380 "s" available on versions 1.10 or greater

Command Format:

Page 87 read from a scan by OCR; it may hold reading errors

Parameters:

Example:

*C - Copy Destination Buffer to Batch

Default Parameter Value Description a 0 Optional; select one of the following values for this parameter: 0 copy destination buffer to the end of the open batch 1 replace the current detail record with the contents of the destination buffer Ss 0) Optional; number of commands to skip if the operation is successful.

Note: When replacing a detail record, the destination buffer length must be exactly the same length as the record being replaced. Exercise caution, it is the COMPRESSED memory size that is compared; both the destination buffer and record must have the same number of alpha and numeric characters to have the same compressed size.

Command Operation

; Add a record to the latest opened batch. Also check for error of not having ; enough memory to add a record. 73=OUT OF MEMORY

286$ *C : Add record to batch with contents built ; in current destination buffer *F2.1 ; If not out of memory skip 2 else P73 ; Display "OUT OF MEMORY" *K1 ; Abort and leave the current display

Page 88 read from a scan by OCR; it may hold reading errors

+C - Buffer Comparison

Description: | The "+C" command is used for buffer comparison. The terminal makes a byte-by-byte comparison of source and destination buffers and determines if the source buffer is equal to, greater or less than the destination buffer.

See Note and tables at the end of this command description.

Note: This command does not filter out such special characters as space, -/ *. If used, these characters will be included in the comparison on a byte-by-byte basis. See Also: | Command Description +A Compare Variable

1 Comparison Operator

Category: Process and Flow Control

Buffer Status: | Source Buffer Destination Buffer

Buffer read; no No change; buffer read change to the pointer

Terminals Supported: Terminal Special Conditions PNC 330/340 None XL Not available TRANZ 330 Available on versions 1.3 or greater TRANZ 330 (202) Available on versions 2.1 or greater TRANZ 340 Available on versions 2.1 or greater TRANZ 380 None

Command Format:

Parameters: Default Parameter Value Description a 0 Optional; options for this parameter are: 0 the source buffer is equal to the destination buffer.

1. source buffer is greater than the destination buffer

2 source buffer is less than the destination buffer

Page 89 read from a scan by OCR; it may hold reading errors

Examples:

Note:

+C - Buffer Comparison

Command

Optional; the number of commands to skip if the comparison is true.

Operation

: Search batch for user-entered ticket #

326$ *L328 *L754 B4.4G A729

11.1.°00000000’

L330 G FA K2.25 L327 330$

B3.3 G *E

*F13 B3.5 G 053 X8 B4.5 +C.1 I-10 G B3.3 O63

11.2.’0000000’ L334

L G A316 Vv *K

; Get the ID number - Get the Ticket number & store it in 729

; Append Ticket # ; If data entered : And see if ticket # found in the batch : Else, clear destination buffer ; Try to get the next key (account number) ; From the keyboard : Continue in location 327 : buffer 4 contains user-entered ticket number : buffer 3 will contain batch data

; Skip to the batch header containing gratuity ; Field to be updated

; While not end of file else exit loop

; Set up to get user-entered key

; Point to key in record

; Get the ticket # from the batch

; Compare buffer 4=ticket # to 5=batch ticket

; If ticket # not found

; Skip this record and loop to next one

; Else

; Ticket found in batch

; ENDIF. Now check if gratuity blank

; Skip over to gratuity amount

; If gratuity amount not blank, skip 1

; Else gratuity blank, display amount and auth and ; allow entry of gratuity amount ; Gratuity filled in, so skip to next record

; Otherwise, say ’no data match’ ; Until enter is pressed ; Exit

When using +CO (source buffer equal to destination buffer), the two buffers must be EXACTLY the same, including length, in order to be found equal. The following table summarizes this.

Page 90 read from a scan by OCR; it may hold reading errors

+C - Buffer Comparison

Source Destination Equal/Not Equal A A Equal TRUE A AB Not Equal FALSE AB A Not Equal FALSE A A (leading blank) _|Not Equal FALSE When using +C1 (source buffer greater than destination buffer), the source is found to be greater if it is longer than the destination, as summarized in the following table. Source Destination Less or Equal/Greater A A Less or Equal FALSE A AB Less or Equal FALSE AB A Greater TRUE A B Less or Equal FALSE B A Greater TRUE A A (leading blank) |Less or Equal FALSE A (leading blank) |A Greater TRUE

When using +C2 (source buffer less than destination buffer), the source buffer is found to be less if it is shorter than the destination, as summarized in the following table.

Source Destination Greater or Equal/Less

A A Greater or Equal FALSE A AB Less TRUE AB A Greater or Equal FALSE A B Less TRUE B A Greater or Equal FALSE A A (leading blank) |Less TRUE

A (leading blank) |A Greater or Equal FALSE