TRANS Macro

The TRANS macro changes all occurrences of a set of characters in a text string into another set of characters.

Parameters: TRANS Macro

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 © 2010 CA. All rights reserved.