We help IT Professionals succeed at work.
Get Started

parameters in the shell? order

enrique_aeo
enrique_aeo asked
on
290 Views
Last Modified: 2012-05-12
i have this store procedure
PROCEDURE SP_EXTRAE_DEV(  
          PI_USUARIO IN VARCHAR2,
          PI_FECHA_DEVOLUCION_INI IN VARCHAR2,
          PI_FECHA_DEVOLUCION_FIN IN VARCHAR2,
          PI_MSISDN IN VARCHAR2,          
         codError OUT NUMBER,
          desError OUT VARCHAR2 ) IS

There are several scenarios when called from the Shell
 1. If I send a parameter from Shell brings information from the previous day, this is controlled by the sp and works well
2. If you want to send a date range I run this way and works well
sh nameSHELL 20111011 20111011
3.
My question is how do I make the call to Shell if I just want to send the pi_msisdn, try to do so:
sh nameshell null null 511997274580 but it is not work

this is the code in the shell
if [[ -z $1 ]]
then
           #do something
           USER_SERV=`whoami`
else
            PI_FECHA_DEVOLUCION_INI=$1
            PI_FECHA_DEVOLUCION_FIN=$2
fi
#MSISDN
if [[ -z $3 ]]
then
           #do something
            USER_SERV=`whoami`
else
            PI_MSISDN=$3
fi

Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2012
Distinguished Expert 2020
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE