ontape -t STDIO and stderr
Posted in 2011
Topics: Backup & Restore
Hello,
I am having trouble scripting ontape.
It appears that 'stderr' messages are printed on the 'stdout' stream and not
the 'stderr' stream as normal.
When using 'ontape -s -L 0 -t /backup/backup.bak' I can get around this by
analysing the 'stdout' stream in my script when the exit code '$?' is non-zero.
HOWEVER when using 'ontape -s -L 0 -t STDIO' the data is passed out on the
'stdout' stream, and all error messages are muted so there are no error
messages when using STDIO!
Is this right?
Also I am surprised that it only has 0 or 1 as exit codes.
Thanks in advance for your help.
If you are using at least v11.50 , check for the parameters "-d" and "-v"
--- Em sex, 4/2/11, ANDREW LEMIN <a_lemin@hotmail.com> escreveu:
De: ANDREW LEMIN <a_lemin@hotmail.com>
Assunto: ontape -t STDIO and stderr [22701]
Para: ids@iiug.org
Data: Sexta-feira, 4 de Fevereiro de 2011, 15:25
Hello,
I am having trouble scripting ontape.
It appears that 'stderr' messages are printed on the 'stdout' stream and not
the 'stderr' stream as normal.
When using 'ontape -s -L 0 -t /backup/backup.bak' I can get around this by
analysing the 'stdout' stream in my script when the exit code '$?' is
non-zero.
HOWEVER when using 'ontape -s -L 0 -t STDIO' the data is passed out on the
'stdout' stream, and all error messages are muted so there are no error
messages when using STDIO!
Is this right?
Also I am surprised that it only has 0 or 1 as exit codes.
Thanks in advance for your help.
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
In order to display messages to stderr, when using the STDIO option you
must
supply the "-v" option. Below is the line from ontape's usage message
ontape --
..... top truncated for brevity........
-v Write informational message to standard error during a backup to
standard
output or restore from standard input
John F. Miller III
STSM, Embedability Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 02/04/2011 09:25:41 AM:
> From:
>
> "ANDREW LEMIN" <a_lemin@hotmail.com>
>
> To:
>
> ids@iiug.org
>
> Date:
>
> 02/04/2011 09:28 AM
>
> Subject:
>
> ontape -t STDIO and stderr [22701]>
> Sent by:
>
> ids-bounces@iiug.org
>
> Hello,
>
> I am having trouble scripting ontape.
>
> It appears that 'stderr' messages are printed on the 'stdout' stream and
not
> the 'stderr' stream as normal.
>
> When using 'ontape -s -L 0 -t /backup/backup.bak' I can get around this
by
> analysing the 'stdout' stream in my script when the exit code '$?' is
> non-zero.
>
> HOWEVER when using 'ontape -s -L 0 -t STDIO' the data is passed out on
the
> 'stdout' stream, and all error messages are muted so there are no error
> messages when using STDIO!
>
> Is this right?
> Also I am surprised that it only has 0 or 1 as exit codes.
>
> Thanks in advance for your help.
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Thanks you! Can't believe I didn't spot that! that's what working late on Fridays does to you.. :) Thanks chaps. Andy.