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.
Andrew Lemin found that ontape -s -L 0 -t STDIO sent no error messages to stderr, and that ontape only returned exit codes 0 or 1. Cesar Inacio Martins pointed to the -d and -v options on 11.50+, and John Miller III confirmed that -v is needed to write informational messages to standard error with STDIO. Andrew thanked them. Solved.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
ANDREW LEMIN — — source: IIUG Forums & Mailing Lists
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.
>
↪ replying to John Miller iii
ANDREW LEMIN — — source: IIUG Forums & Mailing Lists
Thanks you!
Can't believe I didn't spot that! that's what working late on Fridays does to
you.. :)
Thanks chaps.
Andy.
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.