The text of a manual · part 4 of 37
TCL Terminal Control Language Programmer's Manual, pages 31 to 40
Pages 31 to 40 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 31
Transaction Routine
2. Terminal Basics
1. The terminal checks if the idle loop control string is empty. If it is empty, the terminal continues to execute the idle state. Otherwise, the operating system executes the control string in memory location 981/0981.
2. If it is the first of a muitiple transaction, the terminal dials the phone number in location 982/0982 and waits for the ENQ. If it is not the first transaction, the terminal skips to the next step. This step is skipped by the TRANZ 340/330 (202).
3. The terminal sends the request packet, the data in the transmit buffer, to the host computer and waits for a response. Upon receipt, the terminal executes the control string in location 983/0983 and loops back to control string 981/0981 if in multi-trans mode.
Note: To exit the idle loop control string, you must execute the ABORT command. Or, depending on the timeout value set in location 984/0984, the terminal can be set to automatically abort after a specified period of inactivity.
The PNC 330 or PNC 340 terminal, when set in PNC or PNC with Printer mode, will not support the idle loop control string.
From the idle state, pressing one of the keys numbered 1 through 9 causes the terminal to perform the transaction routine. The terminal identifies the host associated with the pressed key, and uses that host’s data during the transaction unless otherwise instructed by the control string. For example, pressing key [4] from the idle state would cause the terminal to use the host information stored in memory locations 400/0400 to 412/0412. Your terminal has two default protocols commonly referred to by the financial industry as VISA first and second generation protocols. These two protocols are described in more detail in Appendix B. Remember, you are not limited to these two protocols. The terminal control language will allow you to use any desired protocol within the framework of VISA first and second generations, and make modifications to the extent allowed by commands *P, *R and *T. Refer to Figures 2-9 and 2-10, "Transaction Routine, Parts 1 and 2” when reading the following description.
1. When a key press begins a transaction, the operating system initializes the transmit buffer with the STX character, where the STX character is not initialized in polled terminals, and the merchant identification (found in location x04/0x04; x = host). If x04/0x04 is empty, the terminal displays "NO MERCHANT ID” and aborts the transaction.
* When executing a first generation transaction, the terminal appends a field separator (FS) to the buffer.
* When executing a second generation transaction, the terminal appends the serial number (001), index code, message sequence number (005) and the message status code to the buffer.
Page 32
TCL Programmer’s Manual
2. The operating system executes the commands in the transaction control string (memory location x07/0x07). If location x07/0x07 is empty, the terminal executes a sequence of commands indicated by the message format flag (set in location x05/0x05). After executing the control string, the terminal prepares the data in the transmit buffer for communication to the host.
* If the terminal is performing a first generation transaction and the last character is a (FS), the (FS) is removed.
*, If the terminal is performing a second generation transaction, it converts the write control character (WCC) to the account data source, and converts the "=" sign (expiration date separator) to a unit separator.
Note: The terminal determines whether it is doing VISA first or second generation by the value stored in x05/0x05, whether or not there is a control string in x07/0x07.
The terminal then appends the termination character and LRC character to the data in the transmit buffer before executing the communicate routine. The terminal will not raise the carrier until x07/0x07 is exited and the communicate routine starts executing.
Note: TRANZ 340 does not append the termination character until running the communicate routine.
3. When performing the communicate subroutine, both the polled and dial terminals will check if there is a communication error. If there is, the terminal clears the response buffer, appends the error code and checks location 990/0990, Communication Error Control String. If there is no communication error, the terminal continues to step 4.
Page 33
2. Terminal Basics
Transaction C. S. X07 Empty?
Display Contents of Transaction Type
Prompt X08
Display Default Host ID
7
A ++ Initialize XMIT Buffer with <STX>, MID (X04) Destination Buffer = Transmit Merchant ID Display NO | ABORT X04 Empty? MERCHANT ID Append Serial No. (001), Index Code, Append <FS> Message Sequence No. (005), Message Status Code L Get Canned Control
Transaction C.S. X07 Empty?
String (CS) pointed to by the MFF (X05)
Execute Transaction C.S. (X07) or (MFF) (X05)
Note: For TRANZ 330 3.60, the terminal checks the dial string and will Predial if the first character is an "R" or a "P". Because the phone number must be checked first with version 3.60, if the phone number has not been set in location x00, the terminal will display "NO TEL NUM".
Figure 2-9. Transaction Routine, Part 1
Page 34
TCL Programmer’s Manual
Remove <FS>
Last Character = <FS>? N
Convert WCC to Account Data Source and Convert '=' {exp date separator) to <US>
.
& +
Append the TERM CHAR,
LAC
Communication Error?
Y Execute, Clear BES MONSE Buffer ge} Communication ABORT Ppend Error Error C.S, 990
Figure 2-10. Transaction Routine, Part 2
Error Codes that may be generated during the communicate subroutine:
Dial Terminals Code
Description
1
5 6 7 TRANZ 340 «2 9 2
TRANZ 330 (202)
Lost Carrier
No ENQ
Exceeded Number of Allowable Response Timeouts (no response from host)
Host Sent EOT
Bad RX Communication
Bad TX Communication
Transmit or Receive Error No Response from Host
Transmit Error
Receive Error or No Response from Host
Page 35
2. Terminal Basics
4. Upon completing the packet transmission to the host computer, the terminal executes the commands in the Response Analysis Control String (found in memory location x10/0x10).
*, If location x10/0x10 is empty and the transaction is of the first generation* type, the terminal displays the host response message.
* _ If location x10/0x10 is empty and the transaction is a second generation* type, the terminal increments the message sequence number, updates the date location, and displays the host response message. Second generation response is more complex than this. It allows for automatic dialing of the Call Center voice line depending on the host.
“transaction type determined by contents of x05/0x05
5. The terminal will then execute the optional control string found in memory location x11, "Print Control String”. If x11/0x11 is empty, the terminal goes to the next step.
6. If multi-trans mode is enabled, the terminal will return to the beginning of the transaction routine x07/0x07.
7. If multi-trans mode is not enabled, the terminal will abort the routine and return to the idle state.
Response Insert Space in Front of Analysis C. S. Every Period and Comma Display Message Destination Buffer = buff3 Increment message Execute Response Sequence Number, Analysis C.S. in Update date location, Location X10 Display Message
Y
Destination Buffer = buff4 Execute Auxiliary C.S. in Location X11
Page 36
Communicate Subroutine
Dial Terminals Only
TCL Programmer’s Manual
During a standard or muiti-trans transaction, the operating system executes the communicate subroutine to send and receive data from the host computer. Please refer to Figures 2-12 and 2-13, the "Dial Terminal Communicate Subroutine” to trace the following description:
1. Upon entering the communicate subroutine the terminal immediately checks to see if the RS-232 port is selected (XL only). If the port is selected, the terminal waits for an enquiry (ENQ).
2. When the RS-232 port is not selected (XL only), the terminal checks to see if it or its parallel phone is on hook. This happens only if the phone number has not been dialed.
*, If the parallel phone is off hook, the terminal displays the "WAITING FOR LINE” message, and loops back to check the line status.
*, If the parallel phone is on hook, the terminal dials the host telephone number stored in memory location x00.
3. After dialing the host's phone number, the terminal waits until it detects the carrier tone from the host. The terminal will then raise its carrier.
4. The terminal will logon to the network if necessary, then wait for an ENQ from the host.
5. Upon receiving the enquiry, the terminal sends the transmit request packet to the host.
6. The terminal waits until it receives a response packet from the host, or until the response timeout expires.
7. Upon receiving the response packet, the terminal sends an ACK to the host computer if the packet was received properly, then waits for the end-of-transmission (EOT) signal from the host. Otherwise, it sends a NAK and waits again for the response packet.
8. When the terminal receives the EOT signal, it returns to the transaction routine. If the terminal does not receive the EOT within the EOT timeout period, but does have a valid response packet, it will return to the transaction routine as if it had received an EOT.
Page 37
O
2. Terminal Basics
Communicate on Hook?
Parallel Phone on Hook?
Y » Dial Phone No. in Location (X00)
Wait for Line
<< y
Wait Until Carrier is Detected y
Login if Needed a
Figure 2-12. Dial Terminal Communicate Subroutine, Part 1
Page 38
TCL Programmer’s Manual
1 Display > Set Error NO ENQ FROM HOST Code 2
) (0
Serd Request Packet
Set Error Code 7
Send ENQ
¥v N ¥ Y Decrement TX NAK NY Display TX NAK count Count BAD TX COMM =0 N » <¢
Response Timeout
Decrement
Counter
Send EOT
Y
RESPONSE FROM HOST
Display NO y qi Bad | a” Wait for \_LRC Response or Decrement Timeo RX NAK Count Good a
Send NAK Response v. N Send ACK uf Display BAD RX COMM
Decrement Set Error Multi ACK Code 6
Set Error Code 4
Count Y Wait fo Time- EOT ait for out Multi-ACK Hang up << ENQ, EOT or Enabled? Timeo =
Figure 2-13. Dial Terminal Communicate Subroutine, Part 2
Polled Terminals Only, _ During a transaction, the polled terminals execute the communicate subroutine to send and receive data from either the LAN controller for the PNC 340/TRANZ 340 or the leased line network for the TRANZ 330 (202).
Figure 2-14, "Polled Terminal Communicate Subroutine,” illustrates the communication subroutine for both polled terminals.
1. The terminal displays "PROCESSING" message. The TRANZ 330 (202) proceeds to step 2; the TRANZ 340 checks to see if the LAN controller is polling. If it isn’t, the terminal displays "BAD TX COMMUN’, sets the error code and returns. If the controller is polling, the terminal continues.
Page 39
2. Terminal Basics
PROCESSING
Is Note: LAN Terminals LAN OK? N Include TRANZ 340, {LAN Terminals PNC 340, ZON 54X Only)
Bulld packet from message In TRANSMIT buffer v
Start TRANSMIT Timer y
Walt for successful transmit, error or thneout
Transmit error _
Displa BAD Tx COMMUN
Start recelve timer
Y
Walt for response error or timeout.
y
Displa BAD RX COMMUN [> no Resp | y
Extract data from tecelved packet and put It In the RECEIVE buffer
FROM HOST
Set error code x TRUE al
Figure 2-14. Polled Terminal Communicate Subroutine
2. The terminal builds a packet from the message found in the transmit buffer and starts the transmit timer.
3. The terminal then waits for either an error, timeout or a successful transmission.
Page 40
TCL Programmer’s Manual
4. If an error or timeout has occurred, the terminal displays "BAD TX COMMUN", sets the error code and returns. If not the terminal starts the receive timer and again waits for a response, error or timeout.
5. If a receive error has occurred, the terminal displays "BAD RX COMMUN", sets the error code and returns.
6. If a receive error has not occurred, the terminal checks if a timeout occurred. If it has, the terminal displays "NO RESP FRM HOST’, sets the error code and returns.
7. If a timeout has not occurred, the terminal extracts data from the received packet, places the data in the receive buffer and returns.
Function Routine, _ Pressing the [FUNC] key from the idle state will cause the operating system to execute its function routine. As shown in Figure 2-15, "Function Routine’: * Pressing one of the keys numbered 1 through 6, or 9, causes the terminal to execute the associated function control string.
* Pressing the [7] key causes the terminal to execute the "RECALL" function. The terminal will allow you to recall and review the data Stored in various memory locations.
¢ Pressing the [8] key causes the terminal to execute the "STORE" function. The terminal will allow you to store data in various memory locations.
* Pressing the [ALPHA] key will enable the password management routines. These management routines allow users to set their own passwords.
Note: The default password for the XL is 166831. The default PNC 330/340 and TRANZ 330/340/380 terminal password is Z66831 or [1] [ALPHA]
[ALPHA] [6] [6] [8] [3] [1].
* Pressing the [*] key causes the terminal to send data during a unit-to-unit download. The terminal will serve as the sending terminal during the download.
* Pressing the [#] key prepares the terminal to receive data during a unit-to-unit download. The terminal will function as the receiving terminal during the download.
* Pressing the [0] key initiates the dial-up download routines. The terminal will wait for the user to select the download type. The user may press the [*] key to request a partial download, or press the [ENTER] key to request a full download.
Note: The PNC/TRANZ 340 will prompt for one/all or full/partial downloads.
* Pressing the [CLEAR] key causes the terminal to abort the function routine and return to the idle state.