Skip to main content

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks
I know that the runtime doesn't do anything special just because of the -d switch (in terms of initializing serial ports), so I'm not sure why you see what you see. Could it be a timing issue? When you run in debug, you step through the COBOL source slowly enough that the tty has time to catch up (somehow).

I know other folks have used tty ports with the runtime in the past, so I am confident that this can work. But I don't have any ideas.

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks
I know that the runtime doesn't do anything special just because of the -d switch (in terms of initializing serial ports), so I'm not sure why you see what you see. Could it be a timing issue? When you run in debug, you step through the COBOL source slowly enough that the tty has time to catch up (somehow).

I know other folks have used tty ports with the runtime in the past, so I am confident that this can work. But I don't have any ideas.

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks
I know that the runtime doesn't do anything special just because of the -d switch (in terms of initializing serial ports), so I'm not sure why you see what you see. Could it be a timing issue? When you run in debug, you step through the COBOL source slowly enough that the tty has time to catch up (somehow).

I know other folks have used tty ports with the runtime in the past, so I am confident that this can work. But I don't have any ideas.

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks
Thats what is weird !

I dont have to step through the program for it to work .. I start it in debug mode, type "g" at the debugger ... and it works and keeps on working. I dont have to step through at any point.
But if I run it without the -d , it does not read from the tty ports and the c code times out ..

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks
Hi vini,
a couple of suggestions that hope help you to workaround:
-if your program doesn't any ACCEPT, try issue an
ACCEPT OMITTED BEFORE TIME 0 END-ACCEPT
-create a new ASCII file and write just a "g" or "e"
and run the program in this way:
runcbl -r the_file_just_created PROG1

Luca

[Migrated content. Thread originally posted on 30 January 2004]

For machine interaction we have several C programs reading/writing to the tty ports on unix. These programs are being called from acu-cobol using sub interface method. These programs work perfectly okay but only in the debug mode.

for e.g.
runcbl -d PROG1
works perfectly ok and is able to read data from the tty ports.
but
runcbl PROG1
fails to read data from the ports but does not return any error.

We are using acu-cobol version 5.2 and the the compiler options that we are using are
ccbl32.exe -cr -w -zz -ds -zd -Za

Any ideas ...


Thanks
Hi vini,
a couple of suggestions that hope help you to workaround:
-if your program doesn't any ACCEPT, try issue an
ACCEPT OMITTED BEFORE TIME 0 END-ACCEPT
-create a new ASCII file and write just a "g" or "e"
and run the program in this way:
runcbl -r the_file_just_created PROG1

Luca