IBM InfoSphere DataStage, Version 11.3.1
TPRINT statement
Syntax
TPRINT [ON print.channel] [print.list]
Description
Use the TPRINT statement to send data to the screen, a line printer, or another print file. TPRINT is similar to the PRINT statement, except that TPRINT lets you specify time delay expressions in the print list.
The ON clause specifies the logical print channel to use for output. print.channel is an expression that evaluates to a number from -1 through 255. If you do not use the ON clause, logical print channel 0 is used, which prints to the user's terminal if PRINTER statement OFF is set (see the PRINTER statement). If print.channel evaluates to the null value, the TPRINT statement fails and the program terminates with a run-time error message. Logical print channel -1 prints the data on the screen, regardless of whether a PRINTER ON statement has been executed.
You can specify HEADING statement, FOOTING statement, PAGE statement, and PRINTER statement CLOSE statements for each logical print channel. The contents of the print files are printed in order by logical print channel number.
print.list can contain any BASIC expression. The elements of the list can be numeric or character strings, variables, constants, or literal strings. The list can consist of a single expression or a series of expressions separated by commas ( , ) or colons ( : ) for output formatting. If no print.list is designated, a blank line is printed. The null value cannot be printed.
print.list can also contain time delays of the form $<time>. time is specified in milliseconds to the tenth of a millisecond. As the print list is processed, each time delay is executed as it is encountered.
Expressions separated by commas are printed at preset tab positions. The default tab stop setting is 10 characters. See the TABSTOP statement for information about changing the default setting. Use multiple commas together for multiple tabulations between expressions.
Expressions separated by colons are concatenated. That is, the expression following the colon is printed immediately after the expression preceding the colon. To print a list without a LINEFEED and RETURN, end print.list with a colon ( : ).
If NLS is enabled, the TPRINT statement maps data in the same way as the PRINT statement.
Example
The following example prints the string ALPHA followed by a delay of 1 second, then the letters in the variable X. The printing of each letter is followed by a delay of one tenth of a second.
X="A$<100>B$<100>C$<100>D$<100>E"
TPRINT "ALPHA$<1000.1> ":X
This is the program output:
ALPHA ABCDE
Last updated: 2015-03-09
PDF version of this information: