The TRANS macro changes all occurrences of a set of characters in a text string into another set of characters.
Parameters: TRANS Macro
Specifies the list of characters you want to translate (replace). You must specify at least one character in this list.
Specifies the list of corresponding replacement characters.
Specifies the string that contains the characters you want translated.
The field is mandatory, and the entry may contain one or more variables. Translation occurs after the variables are substituted by their values.
Specifies the name of the variable to hold the translated string.
This is a mandatory field.
Example: TRANS Macro
In the following example, the TRANS macro examines the Input string:
AAA BBB CCC DDD EEE FFF GGG HHH
All occurrences of the specified characters are translated so that the result is:
111 222 333 444 555 FFF GGG HHH
This string is held in the variable &FRED1.
PROD------ Automation Services : TRANS Macro Parameter Definition ------------- Command ===> Function=BROWSE .- What to Translate ---------------------------------------------------------. | | | From ..... A To ....... 1 (All occurrences of the From character(s) | | ..... B ....... 2 in the Input string will be translated to | | ..... C ....... 3 the corresponding To character(s), and the | | ..... D ....... 4 result will be stored in the Output string) | | ..... E ....... 5 | ’-----------------------------------------------------------------------------’ .- String to be Translated ---------------------------------------------------. | | | Input .... AAA BBB CCC DDD EEE FFF GGG HHH | | (Text String or Variable(s)) | ’-----------------------------------------------------------------------------’ .- Variable to hold Translated String ----------------------------------------. | | | Output ... FRED1 (Variable Name) | ’-----------------------------------------------------------------------------’ F1=Help F2=Split F3=Exit F9=Swap
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |