Friday, February 17, 2006

Cobol : Creating a logging file for standard out and standard error

Often you want to send a log file to stdout so you can then redirect it to wherever.

In Cobol, you can use:

SELECT OUTPUT-LOG ASSIGN ':CO:'

where:

:CO: is standard output (stdout)

These can also be used:

:CI: is standard input (stdin)

and

:CE: is standard error (stderr)

Enjoy!

No comments: