in a translation table with the values given,
starting at the specified position.
- specifies the position in a translation table where the
replacement is to begin. The editable positions in a translation table begin
at position decimal 0 and end at decimal 255. To specify the position, you
- use a decimal or hexadecimal value to specify an actual location.
If you specify a decimal value, for example, 20, PROC TRANTAB locates position
20 in the table, which is byte 21. If you specify a hexadecimal value, for
example, '14'x, PROC TRANTAB locates the decimal position that is equivalent
to the specified hexadecimal value, which in this case is position 20 (or
byte 21) in the table.
- use a quoted character. PROC TRANTAB locates the quoted character
in the table (that is, the quoted character's hexadecimal value) and uses
that character's position as the starting position. For example, if you specify
the following REPLACE statement, the statement replaces the first occurrence
of the hexadecimal value for "a" and the next two hexadecimal values with
the hexadecimal equivalent of "ABC":
replace 'a' 'ABC';
This is useful when you want to locate alphabetic and numerical characters
when you do not know their actual location. If the quoted character is not
found, PROC TRANTAB displays an error message and ignores the statement.
To edit positions 256 through 511 (table two), follow this
- Issue the SWAP statement.
- Issue the appropriate REPLACE statement.
- Issue the SWAP statement again
to reposition the table.
- value-1 <...value-n>
- is one or more decimal, hexadecimal, or character constants
that give the actual value to be put into the table, starting at position. You can also use a mixture of the types of values. That is, you
can specify a decimal, a hexadecimal, and a character value in one REPLACE
statement. Editing by Specifying a Decimal Value for Starting Position shows a mixture of all three types of values in the REPLACE
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.