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 30 of 37

TCL Terminal Control Language Programmer's Manual, pages 291 to 300

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

Direct I/O on TRANZ 330/380 to Transmit a Batch

Requirements

Appendix D. TCL Communication Routines

The following example supports direct Input/Output, specifically on TRANZ 330/380 terminals, and is not for use when a login string appended to the phone number is used. The routine supports 1200 baud - but will work with 300 baud with only a few modifications - and reads and transmits a batch record. After all records have been transmitted, a completion message is sent and communication is finished.

TRANZ 330 version 2.0 and greater. TRANZ 380 - all versions.

WARNING: If a login string is needed to connect to a host, you must fall out of memory location X07/0x07, then link memory location X10/0x10 to a memory location and take over communication from that point.

The following are things in this routine that can be changed: *, The location of the prompts and all control strings

* Memory location 907/0907

¢ Buffers 3&4

* All packet formats (160$, 161$, 162$)

* The termination character (ex. ‘RS’, *P command)

* If used with 300 baud, change ”P....2’ to *P....1’

Variables Control String Used Purpose Used In

#9 Set the connect timeout 920$, 921$

#8 Set the retry count 921$, 922$

#1 Set the retry count 925$, 927$

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

TCL Programmer’s Manual

Locations Locations

Used* Purpose Called From

054 Used as a block counter

160 Builds logon packet 907$

161 Reads batch and builds packet 907$

162 Sends completion 161§

298 Used as a flag for end of batch

900 Host phone number

904 Merchant ID

907 Begin the transaction

920 Connect to host 907$

921 920 continued

922 Wait for ENQ 921$ cont.

925 Sets the retry count 907$

926 Transmits the packet 925 cont. 927§$

927 Analyze response 926 cont.

930 Display error message and quit 922$

931 Display error message and quit 926$, 927$

942-949 Prompts The following is the code for this routine:

900=9-18003334444L9 ; Host phone number 904=TESTMID ; Merchant ID 942=DIALING

943=CONNECTED

944=TRANSMITTING

946=NO CONNECTION

947=WAITING FOR ANSR

948=NO ENQ FR HOST

949=LOST COMM W/HOST 907$ ; Batch close Ss ; Start dialing *L160 ; Build logon packet *L920 ; Connect and login *L161 ; Build batch record packet *L925 ; Send packet *L910 ; Process response I-3 ; Repeat 910$ A298.7 ; If completion hasn't been sent, continue *P6 ; Set termination char. to ACK

*These locations are preceded by "0" for the TRANZ 380.

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

Appendix D. TCL Communication Routines

Locations Used* Purpose U299.2 ; Store response B2 ; Reset buffer 11.1.4 ; If an EOT is sent, quit 12 ; Else continue F14 ; Display "BATCH CLEARED” *K1 ; Quit 920$

; Communication - dialing and connecting ; Set up carrier timeout

P942 ; Display "DIALING" *N#9.20000 ; Connect timeout: 20,000 cycles = 45 seconds B.2 ; Select receive buffer G ; Clear it *V ; Check the phone status B2 ; Select source buffer 1-3.2.56 ; If <> 8 (WAITING FOR ANSWER), go back *P....2 ; Reset modem chip, and set for 1200 baud “w1 ; Delay after reset before checking carrier P947 ; Display "WAITING FOR ANSR”" L921 ; Continue 921$ ; Connect: begin checking for carrier present +K7.4 ; Check for carrier B ; ** need a command that makes the terminal ; scan the keyboard ** 1-2.7.#9 ; No carrier detected - check for 45 seconds P946 ; Display "NO CONNECTION" *K1 ; Die +K0 ; Turn originate carrier on “N#8.3 ; Set retry count to 3 L922 ; Continue 922$ ; Connected: wait for ENQ from host P943 ; Display "CONNECTED" B2.2 ; Reset buffer G ; Clear it +17.15.1 ; Wait for input on modem port for 15 seconds ; or skip 1 L930 ; Timed out, die B2 ; Reset extraction pointer H1.5 ; Search for ENQ

“These locations are preceded by "0" for the TRANZ 380.

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

TCL Programmer’s Manual

Locations Used* Purpose i ; Found it, skip 2 1-6.7.#8 ; Try 3 times to get ENQ P944 ; Display "TRANSMITTING" L925 ; Send packet 925$ ; File transfer - transmit packet *N#1.3 ; Set number of retries L926 926$ ; Transmit packet - continued from 925$ +K7.1 ; Check for carrier on every pass L931 ; Lost carrier, go display and quit B1.1 ; Reset buffers +11 ; Send packet with ETX/LRC B2.2 ; Select receive buffer G ; Clear it +16.10.1 ; Get one packet or one character L931 ; Display "NO RESP” and quit L927 ; Got something! go check it 927$ ; See what is in the receive buffer BS ; Reset pointer in receive buffer 11.2.4 ; Check for EOT L928 ; EOT received, transfer done B9 ; Reset pointer 15.1.6 ; Check for ACK B1.1 ; Select transmit buffer D2 ; Delete last ETX/LRC before re-transmit 11.7.#1 ; If retry count = 0 L931 ; Display "NO RESP” L926 ; Not ACK, re-transmit up to 3 times *M ; Packet acknowledged 930$ ;Timed out or no enq P948 ; Display "NO ENQ FRM HOST" *@1 ; Error beep *K1 ; Quit 931$ ;Lost communication with host P949 ; Display "LOST COMM" *Gl ; Error beep *K1 ; Quit

“These locations are preceded by "0" for the TRANZ 380.

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

Appendix D. TCL Communication Routines

Building Packets _Locations

Used* Purpose 160$ B.1 ; Append the logon header to the transmit buffer G U298 ; Clear completion flag R49 U54 ; Start block counter at 1 G ; Clear transmit buffer R2 ; Append a STX A54 ; Append block ID ’1’ R ; Append a FS R49 ; Append message type '1’ R ; Append a FS A904 ; Append merchant ID R ; Append FS *B ; Select the Batch *P.6 ; Set response character to an ACK 161$ ; Read batch and send It B.3 ; Select work buffer G ; Clear it R49 ; Add one to T54 ; block ID counter G ; Clear buffer *E ; Copy batch record to dest.buffer (buffer 3) *F7 ; Skip 7 if end of batch B3.1 ; Source = Work , Destination = Transmit G ; Clear transmit R2 ; Append STX A54 ; Append block ID R ; Append FS Xx ; Copy batch record 1 ; Skip 1 L162 ; Send completion 162$ ; Build a message completion packet B1.1 ; Select transmit buffer G ; Clear it *P30.4..1 ; Set termination character to EOT R30 ; Append RS - this means hang-up U298 ; Save it send

“These locations are preceded by "0" for the TRANZ 380.

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

Direct I/O on TRANZ for Dial-up Communication

Requirements

TCL Programmer’s Manual

This module allows the TRANZ 330/380 terminal to use dial-up communication on the terminal's local function keys. This module allows the terminal to transmit and receive data packets using VISA first generation protocol.

To be used on the TRANZ 330 terminal, EPROM 2.0 or above and TRANZ 380. Use this module in conjunction with TCOMDLUP.001. It dials and con-nects with the host.

WARNING: This module is designed to work on the local function keys. These memory locations will be called from 031-039.

Note: The memory location of the phone number used to dial can be changed in this routine.

Control String

Variables Purpose Used In #0 Determines the # of retries 383, 385 Locations Locations Used Purpose Called From 383 Receive communication driver

Sets retry limit 384 384 Transfers packet to the host 383, 385 385 Receives data from host 384 386 Display "NO RESP FR HOST" 384, 385 388 Display "LOST COMM W/HOST" 384 389 Send ACK to host 385 773 Transmitting prompt 384 474 Receiving prompt 385 475 No response from host prompt 386 476 No ENQ from host prompt 387 477 Lost communication with host 388

The following is the code for this routine:

383$ ; Set retry limit *N#0.3 ; Set retry limit to 3 *L384 ; Transmit packet 384$ ; File transfer - transmitting P473 ; Display, "TRANSMITTING" B1.1 +11 ; Send packet +K7.1 ; If still connected, skip one L388 ; else, display, "LOST COMM W/HOST" B2.2 G +17.100.1 ; Wait for one character or packet L386 ; Else, "NO RESP FR HOST”

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

Appendix D. TCL Communication Routines

Locations Used Purpose H2.5 ; If "ENQ" found G ; clear buffer 1-4 ; Continue waiting for packet L385 ; Else, wait for response and send ACK 385$ P474 ; Display, "RECEIVING" B H2.2 ; If packet present *L389 ; send ACK *M ; Return and process response B 14.2.6 ; if ACK received +17.100.1 ; wait for packet L386 ; Go to "No Response" *L389 ; Send ACK *M ; and process packet B 12.2.4 ; Check for EOT *L389 ; Send ACK *M ; EOT received, transfer done B1.1 ; Else, D2 ; Delete previous ETX/LRC 1.7.40 ; Decrement variable L386 ; Link "NO RESP” L384 ; Not ACK, re-transmit up to 3 times

; The following is a subroutine that displays "NO RESP FROM HOST" ; on the TRANZ terminal:

386$ ; Reserved for "NO RESP FROM HOST" P475 ; Display, "NO RESP FROM HOST” *K1 ; Abort and leave display

; The following is a subroutine that displays "LOST COMM W/HOST"” ; on the TRANZ terminal:

388§ ; Reserved for "LOST COMM W/HOST" P477 ; Display, "LOST COMM W/HOST" *K1 ; and abort leaving display

; The following is a subroutine that sends an ACK to the host after receiving ; the response packet:

389$ ; send ACK B1.1 G

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

TCL Programmer’s Manual

Locations Used Purpose R6 ; Append ACK

+l

; Associated Special Prompts 473=TRANSMITTING 474=RECEIVING

475=NO RESP FR HOST 476=NO ENQ FROM HOST 477=LOST COMM W/HOST

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

TCLOAD

Installing TCLOAD

Appendix E. TCLOAD Basics

TCLOAD is an easy-to-operate software development tool designed to run on the IBM-PC, -XT, -AT and compatibles having at least 256K of RAM. TCLOAD requires:

¢ an IBM-compatible serial port to transfer its output to the target XL/TRANZ terminal; COM PORT 1 is the standard default serial port, however it is possible to select COM PORT 2.

* The direct download cable available from VeriFone, part numbers are:

XL, PNC 330/340, TRANZ 330/340 to IBM PC: part number 00446-05 XL, PNC 330/340, TRANZ 330/340 to IBM AT: part number 00446-04

Note: TRANZ 380 download protocol does not support the memory image download format used with other VeriFone terminals. See Section 4. TRANZ 380 Packet Formats in the TCLOAD Reference Manual, part number 10016, for further information on TRANZ 380 downloads and other information you will need to operate this development tool.

General-purpose support for all versions of TCL firmware is done through a data file that is external to the .EXE file. This .DBS file is maintained and . updated whenever a new firmware release occurs. Contact your VeriFone sales representative should you require an update of the TCLOAD database.

You may install your database file, TCLOAD.DBS, in any of the following locations: ¢ The directory you are currently working in

¢ Adirectory specified by an environment variable TCLPATH For example, if you added the following line to your AUTOEXEC.BAT file: set TCLPATH=C:\TCLOAD\DBMS TCLOAD would try to find the file:

C:\TCLOAD\DBMS\TCLOAD.DBS * Any directory in your search path (environment variable "PATH")

You can still override all of the above locations using the -b command line option, as explained later; however, you will have to supply the complete path and file name.

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

Writing a TCL File

TCLOAD File Directives

Terminal Operating System Version Number

Include File Directive

TCL Programmer’s Manual

You can write the TCL file using any PC word processor capable of producing an ASCII text file. (WordStar and Microsoft Word are among the more popular word processor programs.) When writing the TCL file, use the word processor's non-document mode and include TCLOAD file directives. TCLOAD file directives control the processing of the TCL commands while running the TCLOAD program.

File directives allow you to link files, define data storage locations, set the EPROM operating system version number, initialize command strings and document each TCL command. The following section describes each file directive option.

When creating a terminal image file for direct download, or when building the -DXL/DTZ file, TCLOAD verifies the version of the operating system resident in the target XL or TRANZ terminal. Therefore, you must identify the EPROM version in your TCL file using the version directive: a percent (%) sign followed by the EPROM version number. (This version directive must be the first non-comment line in the file and must begin in column 1.)

If an incorrect EPROM version is entered, the system will revert to the default XL or TRANZ version and prompt you to "CONTINUE? [Y/N]".

The EPROM operating system software version is displayed when the terminal is first powered up. Use this number with the directive "%".

The following example shows how to set the EPROM version for various signon messages:

Signon Message Use XL 2.11 %2.11 XL XE2BU2.51 %XE2BU251 TZ 330 3E2AU2.10 %3E2AU210

If the terminal is not available, call your VeriFone sales representative to get the proper version ID for your terminal.

Note: The value of the operating system is irrelevant if you are building a -UDL file.

TCLOAD supports modularity by allowing you to create separate TCL files for various terminal functions. For example, you could create one TCL file for transaction keys and another for the VOID function. You could then use the include file directive @ ("at" sign) to link all of the TCL files during a TCLOAD execution. The "@" directive begins in column one and is followed by the file path name.

For example, to direct TCLOAD to include the Root file found in your source directory, type:

@C:\SOURCE\ROOT.EXT<CRLF> Note: TCLOAD permits the nesting of include files; the maximum permissible level depends on your system configuration. Please refer to your DOS system manual for details.