[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Return Code
- Subject: RE: [sqr-users] Return Code
- From: "Bencke, Gina" <gbencke@kichler.com>
- Date: Wed, 16 Jan 2008 13:36:05 -0500
- Delivery-date: Wed, 16 Jan 2008 13:40:15 -0500
- In-reply-to: <488CFCAF21BBC94780ADB0F72962675ADACCEC@GP2K0084V3.GEICO.corp.net>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AchYa4B0nfu4DVePQHWrBqCWo8apMgAAk3lg
- Thread-topic: [sqr-users] Return Code
Mike,
SQR, by default always returns a 'success' value to the OS unless you
set #return-status to another value. Even if you call the stop command,
SQR returns success.
A technique I use in my SQR programs is in the beginning of the program
I set #return-status to 'bad' and at the end or the program to 'good'.
Then if the program either ends prematurely to an execution error or a
stop command the 'bad' value will be returned to the OS.
#define GOOD-OS-STATUS 0 ! Well-behaved UNIX commands, programs, and
utilities return a 0 exit code upon successful
#define BAD-OS-STATUS 1
Begin-program
let #return-status = {BAD-OS-STATUS}
...
let #return-status = {GOOD-OS-STATUS}
End-program
Gina Bencke
Work 216-573-1005 X6805 | Mobile 440-479-9961 | Fax 216-573-1070
Home Office 440-519-0060
-----Original Message-----
From: sqr-users-bounces+gbencke=kichler.com@sqrug.org
[mailto:sqr-users-bounces+gbencke=kichler.com@sqrug.org] On Behalf Of
Moss, Mike
Sent: Wednesday, January 16, 2008 1:14 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Return Code
Hello,
I'd like to find out how to force and SQR to error on a certain
condition so that a Unix script which runs the SQR can recognize that
the SQR failed. I read that #return-status is a reserved variable but I
don't know what to set #return-status to in order for it to indicate
that the SQR has failed. I also saw the 'stop' command, but it wasn't
clear to me that if I used the stop command, that the SQR run status
would be set to error.
Thanks.
====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users