Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Gustavo wanted to run a level 0 ontape archive from cron, but a full archive needs two tapes and ontape waits for input at the tape change. Art Kagel said there was no direct way and suggested a proxy program using pipes to relay the prompt to an operator, as in his eventalarm.c. Doug Agnew said a SAP administrator had ontape read a sequential file and echoed Y into it after the tape switch.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
I would like to run archive in cron, using the following script :
echo "Backup Started "`date`>$LOGFILE
echo "\\n0" | ontape -s -L 0 >>$LOGFILE 2>&1
if [ $? -ne 0 ]
then
echo "Backup Failed "`date`>>$LOGFILE
else
echo "Backup Completed "`date`>>$LOGFILE
fi
The point is: my full archive requires two tapes; so how can i tell this
background process to
continue (it asks for an enter to switch tapes) when the operator put the
other tape manually into the Unit? Is there a signal i could send to the
process PID?
TIA,
Gustavo
↪ replying to gmurad@unimedsp.com.br
Art S. Kagel — — source: Informix-list mailing list archive (1991-1998)
No way to do it, Gustavo. Ontape is interactive and is waiting for the
user to enter 'y'. Hmmmm. You could redirect stdout & stdin from/to a
pipe which is an application that opens a window on the operators console
and displays the ontape prompt, read from stdin, and accepts a reply from
the operator on ontape's behalf and writes it to stdout. Not pretty but
it should be doable. To do this the cron would run your terminal proxy
program which would create a bidirectional pipe and start ontape on that
pipe (actually a pair of pipes) for you. If you do not know how to setup
such pipes look at the source for my eventalarm.c in utils3_ak in the IIUG
Software Repository. Eventalarm uses this method to manage an ontape -a
session.
Art S. Kagel
gmurad@unimedsp.com.br wrote:
>
> I would like to run archive in cron, using the following script :
>
> echo "Backup Started "`date`>$LOGFILE
>
> echo "\\n0" | ontape -s -L 0 >>$LOGFILE 2>&1
> if [ $? -ne 0 ]
> then
> echo "Backup Failed "`date`>>$LOGFILE
> else
> echo "Backup Completed "`date`>>$LOGFILE
>
> fi
>
> The point is: my full archive requires two tapes; so how can i tell this
> background process to
> continue (it asks for an enter to switch tapes) when the operator put the
> other tape manually into the Unit? Is there a signal i could send to the
> process PID?
>
> TIA,
>
> Gustavo
↪ replying to gmurad@unimedsp.com.br
Doug Agnew — — source: Informix-list mailing list archive (1991-1998)
Our SAP Basis administrator wrote a script that has ontape read a sequential
file and he echoes 'Y' into the file when the tapes have been switched.
gmurad@unimedsp.com.br wrote in message <7q6br4$3fq$1@news.xmission.com>...
>
> I would like to run archive in cron, using the following script :
>
>
> echo "Backup Started "`date`>$LOGFILE
>
> echo "\\n0" | ontape -s -L 0 >>$LOGFILE 2>&1
> if [ $? -ne 0 ]
> then
> echo "Backup Failed "`date`>>$LOGFILE
> else
> echo "Backup Completed "`date`>>$LOGFILE
>
> fi
>
>
>The point is: my full archive requires two tapes; so how can i tell this
>background process to
>continue (it asks for an enter to switch tapes) when the operator put the
>other tape manually into the Unit? Is there a signal i could send to the
>process PID?
>
>
>TIA,
>
>Gustavo
>
>
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.