Highlighted
Absent Member.
Absent Member.
810 views

[archive] Runcbl Issue

[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
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Runcbl Issue

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.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Runcbl Issue

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 ..
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Runcbl Issue

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
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.