I would like to invoke a cobol program thru shell script by assigning command line prompt values in the "EOD" as below.

```
#!/bin/bash
run pub/coblprog<<:EOD:
1
2
3
:EOD:

```

Consider if COBOL program "coblprog" has 4 command line prompts and expects 4 input command line arguments at runtime. I have specified 3 prompt values in the EOD. Since COBOL has four prompts but at EOD does passing 3 values , COBOL program is going into infinity loop to expecting the fourth prompt value.

My requirement is, I would like to set an shell's control break statement (like below) after all prompt values before second :EOD:. By seeing that shell's control statement the the shell script should terminate abnormally.

```
#!/bin/bash
run pub/coblprog<<:EOD:
1
2
3
exit 1
:EOD:

```

I have have exit statement in the script and run, but no luck..! Please suggest me good solution.

I am executing the script in LINUX, COBOL program is Micro Focus COBOL.