Running a command within " "

Author: (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"



  1. ... 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 ...":


    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:

    message "FIELDA contains %%FIELDA; variable $1 is %%$1"

    If FIELDA contains AAAA and $1 contains 1111, the following message appears:

    FIELDA contains AAAA; variable $1 is 1111

    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:

    • Two percent signs (%%) followed by the name of a field, variable, or function is replaced by the current value of that field, variable, or function.
    • Only one level of substitution is done; that is, if the current value of the field, variable, or function being inserted contains an indication of further substitution, that indication is ignored.
    • To prevent ambiguity in interpreting a field, variable, or function name in a string, follow the name with three percent signs (%%%). For example:
      message "%%$$GLOBVAR%%%XYZ"
    • In situations where trailing spaces are ordinarily removed, use three percent signs (%%%) following the trailing spaces to ensure that the trailing spaces are not removed when the text is stored or interpreted. This can be useful for defining such things as global messages or list items that contain trailing blanks.
    • A space following two percent signs is automatically removed by the Proc compiler; the two percent signs appear unchanged.
    • Use two percent signs followed by a double quotation mark (%%") to include a double quotation mark in the resulting string.
    • Use two percent signs followed by a left or right angle bracket (%%< or %%>) to include the angle bracket in the resulting string.
    • Use two percent signs followed by a caret (%%^) to include a carriage return in the resulting string.

    Author: ulrich-merkel (
  2. 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 (