The text of a manual · part 8 of 37
TCL Terminal Control Language Programmer's Manual, pages 71 to 80
Pages 71 to 80 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 71
A - Append Data from Memory Location
Description: | Appends data from a specified memory location to the destination buffer and allows you to skip commands if the memory location is empty. See Also: Command Description J Append Clock Data Q Append Write Control Character +Q Append Variable to Buffer R Append Constant +V Append Sign on Message X Append from Source Y Append On-Blank Memory Location Category: Buffer Operations Buffer Status: | Source Buffer Destination Buffer No change Buffer updated Terminals Supported: Terminal Special Conditions
PNC 330/340 None
XL None
TRANZ 330/340/380 None
Command Format: Parameters: Default Parameter Value Description m 000 Optional; three-digit memory location, the data from this location is appended to the destination buffer; default value 000 appends the download phone number.
Note: When specifying memory locations, you may eliminate leading zeros to conserve memory. For example, use "14" to specify memory location 014.
s 0 Optional; the number of commands to skip when the memory location is empty.
Page 72
A - Append Data from Memory Location
Examples: Command Operation
; This routine is called to make sure the printer flag is set for a roll printer. ; Memory location 950 should have a value of "2".
166$ B5.5 ; Select work buffer G ; Clear buffer 5 A950.1 ; Append the printer flag from
; memory location 950, ; if empty skip 1 command 11.1.50 ; If printer flag is set to a "2", ; skip 1 because the printer ; selection has been set to a ; roll printer L180 ; Go to routine to handle printer ; not selected *M ; Return
Page 73
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
Parameters:
*A - Open New Batch
Opens (or creates) a new batch and uses the data in the destination buffer as the batch header. If the destination buffer is empty or if the header of the current batch matches the header in the destination buffer, the current batch remains open and no change is made. When the header of the current batch does not match the header in the destination buffer, the current batch will automatically close and a new batch will be opened.
Note: For additional information on error conditions, see command “*F"; for execution details, see Appendix D of the TRANZ 380 Reference Manual.
Command Description *B Select Batch *C Copy Buffer to Batch *D Delete Batch Information *E Copy Batch Detail to Buffer *F Detect Data Capture Errors +G Append Detail Record to Batch
Data Capture and Batch Functions
Source Buffer Destination Buffer
No change Buffer read; no change
Terminal Special Conditions
PNC 330/340 Parameter "s" not available
XL Parameter "s" not available
TRANZ 330/340 Parameter "s" not available
TRANZ 380 Parameter "s" available on versions 1.10 or greater
Default Parameter Value Description s 0 Optional; the number of commands to skip if the operation is successful.
Page 74
*A - Open New Batch
Example: Command Operation
; This routine is used to open a batch, each batch has a header name made ;: of the word "BATCH" appended with the batch number, which is ; incremented with each open.
280$
B.3 ; Select work buffer 3
G ; Clear buffer
A49 ; Append "1" to buffer
T50 ; Add 1 to batch number
G ; Clear buffer
R’BATCH’ ; Append "BATCH" to buffer
A50 ; Append batch number to buffer
*A ; Open batch with header matching ; destination buffer contents
*F2.2 ; If batch opened, skip 2 else
P71 ; Display "BATCH NOT OPENED"
*K1 ; Abort and leave the current display
Page 75
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
+A - Compare Variable
Compares a variable to a constant or to another variable. On PNC 330/340, TRANZ 330/340 versions 1.3 or greater and TRANZ 380, a variable can be any number 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 "#" (pound sign) to indicate a variable, even when the default value is 0. This is a standard mathe-matical comparison.
Warning: Setting a variable to an alphanumeric string will have unpredictable results.
Command Description
For Variable Commands:
*N Set Variable
*O Arithmetic on Variables
+Q Append Variable to Buffer
*Q Set Variable From Buffer For Comparison Commands:
+C Buffer Comparison
| Comparison Operator
Variable Operations
Source Buffer Destination Buffer
No change No change
Terminal Special Conditions
PNC 330/340 None
XL Available on versions 2.5 or greater 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
Page 76
+A - Compare Variable
Command Format:
Default Parameter Value
Parameters:
Description
#v 0
Examples: Command
Optional; the variable to compare; when specifying a variable, precede the number with a pound (#)
sign; for example, to specify variable 2, write
+A#2
Optional; operation code options include:
0 =V (variable) is equal to C/V (constant/variable)
1 =Vis greater than C/V
2 =Vis less than C/V
Optional; this parameter may be a constant or variable (C/V); if the parameter is a variable, precede the number with a pound (#) sign.
Optional; number of commands to skip if comparison is true.
Operation
; This routine prints the common header for all transactions, but calls one ; routine for void transactions to finish printing and another routine for all ; other transactions. The transaction type is stored in variable #1.
130$ F73 G *L180 +A#1..3.1 L181 L182
; Display "PRINTING..."
; Clear destination buffer
; Call routine to printing common header
; If void transaction (=3) skip 1.
; Print body routine for transactions other than a void ; Print body routine for void transaction
Page 77
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
Command Format:
B - Select the Source and Destination Buffer
Selects either or both the source and destination buffers. If a source buffer is specified, resets the extraction pointer.
Command Description A Append Data from Memory Location D Delete Characters from Buffer G Clear Destination H Search for String +J Buffer Modification O Move Extraction Pointer +S Get Buffer Size U Copy Buffer to Memory Location V Display Buffer Zz Pad Destination Buffer Buffer Operations Source Buffer Destination Buffer
Selects buffer to read Buffer selected for write operations operations; pointer at start of buffer only if first parameter is used
Terminal Special Conditions PNC 330/340 None XL None
TRANZ 330/340/380 None
Page 78
Parameters:
Examples:
B - Select the Source and Destination Buffer
Parameter
Description by
Optional; code to select the source buffer; default flag 0 selects the current buffer; options include: Current source buffer, without resetting extraction pointer onhoand =
Buffer #1 - Transmit Buffer
Buffer #2 - Receive Buffer
Buffer #3 - Data Capture Buffer Buffer #4 - Print Line Buffer
Buffer #5 - Temporary Buffer
Reset source buffer extraction pointer
Note: When one of the buffers, 1 through 5, is selected as the source buffer, the extraction pointer is set to the first character within that buffer. If 9 is selected, the terminal resets the extraction pointer to the first character in the current source buffer.
be
Command
Optional; code to select the destination buffer; the default flag 0 selects the current buffer; other options include:
0 akhran, Current destination buffer Buffer #1 - Transmit Buffer Buffer #2 - Receive Buffer Buffer #3 - Data Capture Buffer Buffer #4 - Print Line Buffer Buffer #5 - Temporary Buffer
Operation
; This routine is called after a response message is received from host and ; we want to extract the approval number which follows the third field
; separator for 6 digits.
160$
B.2 U190 B2.3
O H O H
X6 U50
; Select receive buffer which contains host response ; Save the entire host response
; Select the receive buffer as the source buffer and 3 ; as the destination buffer
; Find the first field separator in the host response
; Move the extraction pointer by 1
; Find the second field separator in the host response ; Move the extraction pointer by 1
; Find the third field separator in the host response
; Copy the 6-digit approval number into buffer 3
; Save the approval number
Page 79
Description:
See Also:
Category:
Buffer Status:
Terminals Supported:
*B - Select Batch for Read Operations
Selects an existing batch for data capture operations such as the "*E" (extract) or "*D" (delete) commands, and resets the record pointer. For example, before you can read/delete a record or delete a batch, select it using the "*B" command.
If you attempt to select a batch that does not exist, the terminal will set the data capture error 2, INVALID BATCH.
Note: Refer to Appendix D of the TRANZ 380 Reference Manual for more information on execution details.
Command Description *A Create/Open Batch *C Copy Buffer to Batch *D Delete Batch Information *E Copy Batch Detail to Buffer *F Detect Data Capture Errors +G Append Detail Record to Batch
Data Capture and Batch Functions
Source Buffer Destination Buffer
No change No change; buffer read
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
Page 80
*B - Select Batch for Read Operations
Command Format:
Parameters: Default Parameter Value Description a 0 Optional; code to indicate batch for read operation:
0 selects the current (youngest) batch
1 selects the oldest batch
2 selects the next batch; batch immediately following the one pointed to by batch pointer
3 selects batch with header record matching the contents of the destination buffer s 0 Optional; number of commands to skip if the operation is successful. ,
Example: Command Operation
; This routine is used to select a batch to read or update. If the batch does ; not exist an error will be reported. 72=BATCH NOT FOUND
285$ B.3 ; Select work buffer 3 G ; Clear buffer R’BATCH’ ; Append "BATCH" to buffer A50 ; Append batch number to buffer *B3 ; Select batch w/ header matching dest ; buffer contents *F2.2 ; If batch selected skip 2 else P72 ; Display "BATCH NOT FOUND" *K1 ; Abort and leave the current display