Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

COBOL Screen Section

Tags:

cobol

We have RM COBOL utility which has a screen section, which takes input from the user. This input can be a Function key as well. (like F1, F2, etc)

I am trying to automate it using shell scripting, is it possible to pass these function key parameters to screen-section input?

like image 789
Pradeep Shanbhag Avatar asked Feb 13 '26 07:02

Pradeep Shanbhag


1 Answers

Assuming that RM COBOL works similarly to AcuCobol, yes.

But ... how is a function key represented? Well, for a particular terminal, it will produce a character or a stream of characters to represent that function key. Different terminals (and I'm including terminal emulators here) send different values for function keys, so you'll need to identify what kind of terminal is being used. Another complicating thing is that some terminals send different values for function keys depending on what mode the terminal is in.

My suggestions:

  1. Record what $TERM is set to and be sure to set that environment variable to the same value in the script.
  2. Use the script utility to record the input and output of the program to determine what the terminal sends when you press the function key. Then you can use that value in your script.
like image 59
Scott Nelson Avatar answered Feb 15 '26 17:02

Scott Nelson