cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Sakthivel
Level 2

IA 8 is not replacing the values for variables in script

Hi,

I am writing a script in IA 8->Install->Execute Script.

I set few variables in Pre-Install.I use that variable in the script many times.

case $VARIA$ in

1)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
2)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
3)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
4)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
esac

When I run the IA, it substitues values for $DBUSER$ and $DBPASSWD$ in case 1) and 3).It is not substituting values for alternate cases 2) and 4).

Could you help to resolve this?

Regards,
Sakthivel
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

Honestly I don't see any differences between all 4 cases, but if I were you I would write them like this:

sqlplus -s $DBUSER$$/$$DBPASSWD$


this way insuring that $/$ gets replaced with /
0 Kudos
Sakthivel
Level 2

Hi,
Each case has to do different things.
For example if $DBUSER$ value db1 and $DBPASSWD$ value dbause means

Assume $VARIA$ as 2
I get the following output

case 2 in

1)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
2)
sqlplus -s db1/dbause
;;
3)
sqlplus -s $DBUSER$/$DBPASSWD$
;;
4)
sqlplus -s db1/dbause
;;
esac

it substitutes for alternate cases.

Regards,
Sakthivel
0 Kudos
purcellk24
Level 7

Is this your whole script? I agree with pv7721 that all the cases look the same.
0 Kudos