Passing text to RCS prompts in KORN script,

Hopefully someone can help here. I have a script written in korn by a former employee and I am trying modify it. Most of the script works except when we run it and pass the tesxt 'unlock' as a parameter when we want to unlock a file in RCS (revision control system). When we run this script and use 'unlock it executes the code shown at the bottom. It runs rcs -u'version' which is correct but then RCS asks if you want to unlock this file, then prompts us to enter text as to why we want to unlock it, then finally enter a period on a blank line to indicate no more text to enter and finish.

All we need to pass is:
1) y
2) "prod install of" $ACR
3) . (period)

Its seems to pass a carriage return (or terminates the program) after getting the prompt asking if we want to unlock the file since I can see it say the file isn't unlocked which would occur is you hit enter instead of 'y' for yes. The 3 things I am trying to pass to RCS are instead trying to be run as commands so all I get is bad command errors from linux. Anyone have ideas how to run RCS and simply pass the answers to the questions it asks?

Thanks

if [[ $unlock = "unlock" ]]; then
  print $PS1 "rcs -u${Reqvers} $Reqfile"
  rcs -u${Reqvers} $Reqfile                       # This executes
  y                                               # DO you want to unlock
  "PROD install of" $acr                          # Why are you unlocking file?
  .                                               # enter period to finish
eof
 fi

It depends on how that rcs program works. A "here document" might work and it's the easiest thing to try...

rcs -u${Reqvers} $Reqfile <<END
y
prod install of $ACR
.
END

Thanks I'll try that