Sponsored Content
Full Discussion: Exit Code in HP-UX KSH.
Top Forums Programming Exit Code in HP-UX KSH. Post 17129 by Perderabo on Monday 11th of March 2002 01:22:12 PM
Old 03-11-2002
Like the man page says, you need to use the macros which are shown on the man page for wait() to decode the return value of system() if it is not -1.

Add, no, -1 is not 256 Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Where can I find a list of exit codes? (Exit code 64)

I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies

2. Shell Programming and Scripting

Need Clean Exit from KSH Status Loop

I have a ksh loop that monitors front panel key postitions. I need a keystroke or something to break out of the loop without exiting the script. Code is: #!/bin/ksh while true do POST=$(./keystat2 | nawk '{print $1}') if ]; then ... (2 Replies)
Discussion started by: ScottKe
2 Replies

3. UNIX for Advanced & Expert Users

How to exit the KSH functions

Hi I am having the script which contains more functions. I want to exit the function if any failure. I tried with exit - the session itself is getting logged out. How can i fix this issue? (11 Replies)
Discussion started by: sharif
11 Replies

4. Shell Programming and Scripting

HELP WITH .ksh script converting the exit status

Hi Can someone help me please? In a standard UNIX .ksh script, if you have the exit status..say 5...what line do you have to enter into the script for this number to be automatically converted to its actual exit reason by looking up the exit status file...wherever that is? thanks angus (1 Reply)
Discussion started by: angusyoung
1 Replies

5. Shell Programming and Scripting

Exit statement ignored inside KSH function

Hi All, I have multiple functions in my script and I'm trying to capture stdout from some of them, but I also do some error checking in them (in the functions that output something to their stdout that needs capturing) and I need to be able to end the entire script with an error message. ... (2 Replies)
Discussion started by: gkubok
2 Replies

6. Shell Programming and Scripting

KSH: Test telnet and exit

Hi, I need to do a test Telnet in KSH and if the connection is good then disconnect the telnet session with out logging in and without exiting the shell script. Example output of a good connection: $telnet xxx.xx.xx.xxx xxxx Trying xxx.xx.xx.xxx... Connected to xxx.xx.xx.xxx. Escape... (1 Reply)
Discussion started by: calex
1 Replies

7. Shell Programming and Scripting

Making a KSH exit if path is not correct

I am very green to shell programming and have no training and this is my first real attempt. I am fairly versed in Unix and running the cmds I need. I tried using the search feature but most of what I found was close but not quite what I am looking for, plus most looked more advanced than I... (7 Replies)
Discussion started by: htown71
7 Replies

8. Shell Programming and Scripting

Terminal is closing on exit in ksh

hi while executing the following script, my terminal window is getting closed if I enter a invalid option. I want the script should go back the the command prompt. how to do achive it. i execute the script as . ./test #! /usr/bin/ksh Printf " Type of Installer : \n\t\t 1. Whole Build... (3 Replies)
Discussion started by: vij_krr
3 Replies

9. Shell Programming and Scripting

KSH: Confused with behaviour of exit

Hi Everyone, I am confused on why the below snippet of code is not working as I intend it to do. I have googled and confirmed that "exit" is supposed to abort the execution of the script regardless if the exit was called from inside a function, or the main body of the script. log_and_die() { ... (3 Replies)
Discussion started by: maddmaster
3 Replies

10. Shell Programming and Scripting

Exit status of the ksh Script

Hi Im trying to write a script that will archive some file using java program.Below is the part of the script that I use and my problem is that the script always return with status 0.Below is part of my script(end part) purge.ksh echo "No of files before tar :... (4 Replies)
Discussion started by: saachinsiva
4 Replies
OCI_NEW_CURSOR(3)														 OCI_NEW_CURSOR(3)

oci_new_cursor - Allocates and returns a new cursor (statement handle)

SYNOPSIS
resource oci_new_cursor (resource $connection) DESCRIPTION
Allocates a new statement handle on the specified connection. PARAMETERS
o $connection - An Oracle connection identifier, returned by oci_connect(3) or oci_pconnect(3). RETURN VALUES
Returns a new statement handle, or FALSE on error. EXAMPLES
Example #1 Binding a REF CURSOR in an Oracle stored procedure call <?php // Precreate: // create or replace procedure myproc(myrc out sys_refcursor) as // begin // open myrc for select first_name from employees; // end; $conn = oci_connect("hr", "hrpwd", "localhost/XE"); if (!$conn) { $m = oci_error(); trigger_error(htmlentities($m['message']), E_USER_ERROR); } $curs = oci_new_cursor($conn); $stid = oci_parse($conn, "begin myproc(:cursbv); end;"); oci_bind_by_name($stid, ":cursbv", $curs, -1, OCI_B_CURSOR); oci_execute($stid); oci_execute($curs); // Execute the REF CURSOR like a normal statement id while (($row = oci_fetch_array($curs, OCI_ASSOC+OCI_RETURN_NULLS)) != false) { echo $row['FIRST_NAME'] . "<br /> "; } oci_free_statement($stid); oci_free_statement($curs); oci_close($conn); ?> NOTES
Note In PHP versions before 5.0.0 you must use ocinewcursor(3) instead. This name still can be used, it was left as alias of oci_new_cursor(3) for downwards compatability. This, however, is deprecated and not recommended. PHP Documentation Group OCI_NEW_CURSOR(3)
All times are GMT -4. The time now is 03:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy