PUTSTREAM stream STREAM-HANDLE handleUNFORMATTEDexpressionFORMAT stringAT TO expressionSKIP ( expression )SPACE ( expression )
PUT STREAM stream STREAM-HANDLE handle CONTROL expressionSTREAM nameSpecifies the name of a stream. If you do not name a stream, the AVM uses the unnamed stream. See the DEFINE STREAM statement reference entry and chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams.STREAM-HANDLE handleSpecifies the handle to a stream. If handle it is not a valid handle to a stream, the AVM generates a run-time error. Note that stream handles are not valid for the unnamed streams. See the chapter on alternate I/O sources in OpenEdge Development: Programming Interfaces for more information on streams and stream handles.FORMAT stringThe format in which you want to display the expression. If you do not use the FORMAT option, the AVM uses the defaults shown in Table 57.
Table 57: Table 58 shows the default formats for other expressions.
Table 58: CLASS1 HANDLE2
You cannot display a MEMPTR, RAW, or ROWID value directly. However, you can convert it to a character string representation using the STRING function and display the result. A ROWID value converts to a hexadecimal string, "0xhexdigits", where hexdigits is any number of characters "0" through "9" and "A" through "F". A MEMPTR or RAW value converts to decimal integer string.
AT expressionSpecifies the column position where you want to place the output value. If that position has already been used on the current line, PUT skips to the next line and puts the expression in the specified column.TO expressionSpecifies the column position where you want to end the output value being output. If that position has already been used on the current line, PUT skips to the next line and puts the expression in the specified column.SKIP ( expression )Specifies the number of new lines you want to output. If you do not use the SKIP option, PUT will not start a new line to the output stream. If you use the SKIP parameter, but do not specify expression (or if expression is 0), the AVM starts a new line only if output is not already positioned at the beginning of a new line.SPACE ( expression )CONTROL expressionThe expression specifies a control sequence that you want to send without affecting the current line, page counters, and positions maintained within ABL. Following CONTROL, expression can be a character-string expression or a RAW variable. It can include null character constants of the form NULL or NULL( expression ), where expression specifies the number of NULLs to send. See the Notes section in this reference entry for details.
DEFINE STREAM s1.OUTPUT STREAM s1 TO cus.dat.FOR EACH Customer NO-LOCK:PUT STREAM s1 name "/".END.OUTPUT STREAM s1 CLOSE.
In the AT, TO, SKIP, and SPACE options, if expression is less than or equal to 0, the AVM disregards the option.
abc123
You can use the NULL keyword to output null characters (\0) in a control sequence. For example, the following statements write the control sequence ESC A \0 and 20 NULLs to output stream A:
PUT STREAM A CONTROL "~033A" NULL.PUT STREAM A CONTROL NULL(20).
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |