This article explains how to resolve a 197 screen handling system initialization error.
Problem:
When running a batch job we are receiving the following messages:
sh: line 1: cursor: not found
Execution error : file 'ADIS' error code:
197, pc=0, call=1, seg=0 197 Screen handling system initialization error
Resolution:
ADIS checks for both screen input and output at the same time. For example, there has to be both screen input and output on the command line, even though there may only be DISPLAY statements in the program. While running in batch, System is missing the terminal definitions of stdin and stdout. Therefore, create an empty file with read permissions for everyone, then use:
cobrun progx < empty_file > /dev/null &
This is an example:
$ cat start.sh
nohup sh -x run.sh &
$ cat run.sh
echo $TERM
echo $TERMINFO
echo $COBTERMINFO
cobrun test < empty > /dev/null
$ cat test.cbl
procedure division.
display "this is a test" line 20 position 20.
stop run.
Incident Number: 2194275