Re: Novice Question About Console I/O

From: Donald Tees (donald_tees_at_nospam.sympatico.ca)
Date: 01/02/04


Date: Fri, 02 Jan 2004 17:50:52 -0500

Rich Chilausky wrote:
> I am using Fujitsu Cobol V3 (the free version) to learn Cobol. I am
> doing simple console I/O. I read from the keyboard and write to the
> screen. The compile/link/execute sequence in the Fujitsu Cobol V3 works
> as advertised. I read from the keyboard and write to the console window
> via ACCEPTs and DISPLAYs. The program behaves as expected. I did a
> static link and generated an executable that runs from my home
> directory. When I invoke the executable in a Windows XP command prompt
> window, it runs just the way it did in the V3 ide. It brings up a
> console window and prompts for my input. I had expected it to use the
> command prompt window for the DISPLAY destination. I want to read from
> the keyboard and write to the command prompt window. I've searched the
> documentation that comes with the compiler environment, but have been
> unable to figure out how to write to the command prompt window. I
> suspect it is my Cobol naiveté concerning i/o that prevents me from
> seeing the solution in the documentation. Thanks in advance for your help.
>
> Cheers,
> Rich Chilausky
>

Go back to the IDE, find the source code of the main program, and right
click on it. Select "Main". Change the option from "display" to
"window", then recompile and link. You will have to force a rebuild, as
the change will not trigger it.

It should work the same in both the IDE and the target machine. Note
that once you go to a window rather than a console, you can use accept
and display with line numbers and attributes, or you can use a screen
section.

Donald



Relevant Pages

  • Novice Question About Console I/O
    ... I am using Fujitsu Cobol V3 to learn Cobol. ... I read from the keyboard and write to the screen. ... read from the keyboard and write to the console window via ACCEPTs and DISPLAYs. ... command prompt window, it runs just the way it did in the V3 ide. ...
    (comp.lang.cobol)
  • Re: Help... I think Ive shot myself in the foot...
    ... > Somewhere - and I think this was in the configuration of a new xdm, ... > keyboard does nothing except toggle the display window through three ... Does Ctrl-Alt-F1 get you to a console, or just toggle the display window ... If it gets you to a console, does the keyboard ...
    (Debian-User)
  • Re: usb mouse
    ... There is uhid driver ... Keyboard works fine. ... on the console? ... In an X window? ...
    (freebsd-stable)
  • Re: Input
    ... I need something like DirectX, ... > X has its own mouse driver, and console has its own. ... > So the kernel driver interfaces to the keyboard. ... is no sure method to get a fullscreen window and get ...
    (comp.os.linux.development.apps)
  • Re: working set and console applications
    ... I created a windows application and then I created a child console process ... that I started from the parent process using CreateProcess. ... I minimize the child console window it also causes the working set of the ...
    (microsoft.public.win32.programmer.kernel)