This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- How to use variables in script
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
05:42 AM
How to use variables in script
Hi,
I am new to install anywhere.I want to use value of USER_INSTALL_DIR in my batch script file.I tried using "Set Install any where variable" by assigning it's value to a variable e.g PARAM1 and then using that variable $PARAM1 in my csh script.
However while running script ,it gives unknown variable PARAM1 .Can anyone help me how to use variable in my script?
Shilpa
I am new to install anywhere.I want to use value of USER_INSTALL_DIR in my batch script file.I tried using "Set Install any where variable" by assigning it's value to a variable e.g PARAM1 and then using that variable $PARAM1 in my csh script.
However while running script ,it gives unknown variable PARAM1 .Can anyone help me how to use variable in my script?
Shilpa
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
06:03 AM
Would it be possible to post your script?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
09:46 AM
I'm having the same problem. How do you use an IA variable in a batch script? Do you just have to use $VAR_NAME$?
In the script I'm trying to pass an IA variable into a java class.
java -cp $CLASSPATH className $VAR_NAME$
Are there any problems doing this?
In the script I'm trying to pass an IA variable into a java class.
java -cp $CLASSPATH className $VAR_NAME$
Are there any problems doing this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 03, 2009
10:47 PM
Hi Vlad,
The script is very simple .I just want to run a procedure from the $USER_INSTALL_DIR.
I have assigned $USER_INSTALL_DIR$ to INSTALL_DIR using Set Install where variable-Single Variable as given:
variable name :INSTALL_DIR
set value to :$USER_INSTALL_DIR$
and the script is
#!/bin/csh
echo $INSTALL_DIR$ >> test.txt
sqlplus -s nx/abc<< EOF
@CUSTOMER_PROCEDURES.sql;
exit
EOF
Regards
Shilpa
The script is very simple .I just want to run a procedure from the $USER_INSTALL_DIR.
I have assigned $USER_INSTALL_DIR$ to INSTALL_DIR using Set Install where variable-Single Variable as given:
variable name :INSTALL_DIR
set value to :$USER_INSTALL_DIR$
and the script is
#!/bin/csh
echo $INSTALL_DIR$ >> test.txt
sqlplus -s nx/abc<< EOF
@CUSTOMER_PROCEDURES.sql;
exit
EOF
Regards
Shilpa
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 04, 2009
04:55 AM
You've got two option. You either use the Execute Script/Batch file and you paste the contents of your script there, and the $USER_INSTALL_DIR$ variable will be automatically replaced, or you can install your script file and before executing it, you use the Modify Text File - Single File, where you check the option Substitute InstallAnywhere variables in file.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)