Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to handle "tcflush"

Status
Not open for further replies.

yy2

MIS
May 3, 2006
10
US
Hi,

I have a 4GL program which expecting 2 input screens.

The 1st screen is expecting:
1. date1
2. date2

The 2nd screen is expecting:
1. input array of a/c no and press F8 to process
or
2. Leave the entry blank and press F8 to process.

I have a unix scripts which calling this 4GL program by passing all the stdin as below using echo command:

ksh -c "echo 31/08/2005 31/08/2005^M^M$(tput kf8)|/proj/prog.exe" <<!
^M
!

However, the problem occured while I execute this command and it stopped at the 2nd screen whereby the 4GL program
was calling the tcflush function before the input array.

I have tried commented the calling function of TCIFLUSH in my 4GL program, and my script is working totally fine. However, my boss has given the instruction not to modify any 4GL program. So, anyone has any clue to resolve
this?

Is there anywhere to include a "pause" in the ksh command before the 2nd parameters being pass to the 4gl program from unix script?

e.g

ksh -c "echo 31/08/2005 31/08/2005^M^M <anywhere to include a Pause in between here > $(tput kf8)|/proj/prog.exe" <<!
^M
!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top