Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    10

    Unanswered: RETURN_STATUS and CLP

    Hi,
    how can I get RETURN_STATUS from procedure, when I make call in unix shell script.

    I tried this:
    db2 connect to $db user $user using $pwd
    ret_status=`db2 call rpt.del_car\('q', 'q', 'q'\)`
    db2 terminate
    echo "return_status=$ret_status"

    and output:
    return_status=
    "DEL_CAR" RETURN_STATUS: "1"

  2. #2
    Join Date
    Mar 2004
    Location
    Toronto, ON, Canada
    Posts
    513
    db2 -tvf myscript.sql >> $LOG_FILE
    if [ "$?" = "0" ]
    then
    res="SUCCESS: SCRIPT ON $1 (`hostname`)"
    else
    res="FAILED: SCRIPT ON $1 (`hostname`)"
    fi
    --
    Jonathan Petruk
    DB2 Database Consultant

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •