Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > sqlplus exit code
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 26th February 01:17
vslabs
External User
 
Posts: 1
Default sqlplus exit code


Usage: { EXIT | QUIT } [ SUCCESS | FAILURE | WARNING | n |
<variable> | :<bindvariable> ] [ COMMIT | ROLLBACK ] Example:
SQL> variable exitcode number;
SQL>
SQL> begin
2 select 23 into :exitcode from dual;
3 end;
4 /

PL/SQL procedure successfully completed.
SQL> exit :exitcode
/home/oracle> echo $?
23

Just remember though that the exit code in Unix is not an int. exit()
in stdlib.h is, but for some reason shells rerturns a max value of 255
(I think that's the low 8 bits only). Is this a kerbel issue btw -
only have exit codes as a byte instead of a 2 byte int?

Would have been pretty nice to have the full ORA error code as the
exit code (instead of having to grep and awk stdout).

--
Billy
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666