gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[open-cobol-list] Stdin/stdout, was Open Cobol Tutorials and other thing


From: Roger While
Subject: [open-cobol-list] Stdin/stdout, was Open Cobol Tutorials and other things.
Date: Fri, 13 Apr 2007 14:19:35 +0200

> I think one of the easiest things to do might just use stdin from a pipe

In the current 0.33 prerelease, OC has implemented a couple
of MF extensions -
SELECT ...   ASSIGN TO KEYBOARD
and
SELECT ...   ASSIGN TO DISPLAY

Both of these automatically set the file type to
LINE SEQUENTIAL.

The KEYBOARD file is set to stdin.
The DISPLAY file is set to stdout.
Of course you can only
OPEN INPUT ... -> the KEYBOARD
and
OPEN OUPUT ... -> the DISPLAY

This means that you can use a Cobol prog as a filter eg.
(Prog as executable)
cat something | MYCOBPROG | whatever
or
(Prog as module)
cat something | cobcrun MYCOBPROG | whatever

Note that this also gives CGI possibilities.

Roger



reply via email to

[Prev in Thread] Current Thread [Next in Thread]