z/OS Using REXX and z/OS UNIX System Services
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


chars()

z/OS Using REXX and z/OS UNIX System Services
SA23-2283-00

Read syntax diagramSkip visual syntax diagram
>>-chars--(--+------+--)---------------------------------------><
             '-name-'      

Function

Returns the number of characters remaining in the input stream specified by name. For persistent streams, this is the number of characters between the current read location and the end of the stream. If the stream was created by the stream popen command, chars(), while the process is active or bytes remain in the stream, returns either 1 or the number of bytes in the stream. After the process has terminated and the stream is empty, chars() returns a value of 0.

Parameters

name
The name for the stream, which can be a path name or a string that was returned from the stream open or popen commands. If name is omitted, the standard input stream is used.

Example

To get the number of bytes in the stdin stream:
remainder=chars()    

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014