Running a command within " "
Author: lalitpct@gmail.com (lalitpct)
Original command
activate "uosunix".commandout("isql -U %%id.dummy -P %%pass.dummy -S %%$$server",script_output)
I want to run command inside a command , how i can do that as shown below trying to run $decode("AES", $decode("BASE64",v_enc1[33]), "password Decryption", "CBC", v_iv) inside parenthesis
activate "uosunix".commandout("isql -U %%id.dummy -P "$decode("AES", $decode("BASE64",v_enc1[33]), "password Decryption", "CBC", v_iv)" -S %%$$server"
,script_output)
2 Comments
Local Administrator
... easiest way:
put it in a command file using filedump and start this file.
If you need quotes inside of a string, "%%"" is the way to do it:
It's very hard to find in the helpfile ("Programming in Uniface"=>"Proc Langauge"=>"Handling data in Proc"=>"Substitution ...":
Uli
Substitution in String Values
When creating a string constant, it is often useful to substitute the current value of a field, variable, or function. This is done by using two percent signs (%%) followed immediately by thec name of the field, variable, or function.
For example:
If FIELDA contains AAAA and $1 contains 1111, the following message appears:
Substitution is possible in any constant string parameter, except in the perform and blockdata statements. Substitution is often used in statements that display text (message. askmess, and so on), in assignment statements, and in global messages and help texts.
Rules for String Substitution
The following rules apply:
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
activate "uosunix".commandout("isql -U %%id.dummy -P %%$decode("AES", $decode("BASE64",v_enc1[33]), "password Decryption", "CBC", v_iv)%%% -S %%$$server",script_output)
Should do it straight off the bat.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)