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<<
OK, not answering questions asked of you, so... shot-in-the-dark time.
Your program is not looping.
It looks like this, doesn't it?
PROCEDURE DIVISION.
ACCEPT VAR1.
ACCEPT VAR2.
ACCEPT VAR3.
ACCEPT VAR4.
I've even coded the pointless dots.
You are stacking up three "user inputs" in your script.
The first ACCEPT takes the first, the second the second, and the third the third.
The fourth ACCEPT finds no data waiting for it, so it waits... for you. To type. It is not looping, it is just waiting for input. You Ctrl-C, and dismiss it as a loop.
If you have four ACCEPTs, you need four entries of data. Either supply four in the script, or supply the fourth "manually", or change the program so that it only ACCEPTs three.