──CHARS(─┬──────┬──)───── └─name─┘
CHARS returns the total number of characters remaining in the character input stream name. The count includes any line separator characters, if these are defined for the stream, and in the case of persistent streams, is the count of characters from the current read position to the end of the stream. If name is omitted, OS/2 will use STDIN: as the default.
The total number of characters remaining cannot be determined for some streams (for example, STDIN:). For these streams, the CHARS function returns 1 to indicate that data is present, or 0 if no data is present. For OS/2 devices, CHARS always returns 1.
Here are some examples:
CHARS(myfile) -> 42 /* perhaps */ CHARS(nonfile) -> 0 /* perhaps */ CHARS() -> 1 /* perhaps */