Previous Page | Next Page

The TRANTAB Procedure

Example 3: Editing by Specifying a Decimal Value for Starting Position


Procedure features:

LIST statement

REPLACE statement

SAVE statement


This example edits the translation table that was created in Creating a Translation Table. The decimal value specified in the REPLACE statement marks the starting position for the changes to the table.

The vertical arrow in both SAS logs marks the point at which the changes begin.


Program 1: Display the Original Table

 Note about code
options nodate pageno=1 linesize=80 pagesize=60;
proc trantab table=newtable;
 Note about code
   list one;

SAS Log

 Note about figure
NOTE: Table specified is NEWTABLE.
NOTE: NEWTABLE table 2 is uninitialized.
NEWTABLE table 1:
                             [darr]
          0 1 2 3 4 5 6 7 8 9 A B C D E F
     00 '00010203A309E57FF9ECC40B0C0D0E0F'x
     10 '10111213A5E008E71819C6C51C1D1E1F'x
     20 'C7FCE9E2E40A171BEAEBE8EFEE050607'x
     30 'C9E616F4F6F2FB04FFD6DCA2B6A7501A'x
     40 '20E1EDF3FAF1D1AABABFA22E3C282B7C'x
     50 '265FACBDBCA1ABBB5F5F21242A293BAC'x
     60 '2D2F5FA6A6A6A62B2BA6A62C255F3E3F'x
     70 'A62B2B2B2B2B2B2D2D603A2340273D22'x
     80 '2B6162636465666768692D2BA6A62B2B'x
     90 '2D6A6B6C6D6E6F7071722DA62D2B2D2D'x
     A0 '2D7E737475767778787A2D2B2B2B2B2B'x
     B0 '2B2B2B5F5FA65F5F5FDF5FB65F5FB55F'x
     C0 '7B4142434445464748495F5F5F5F5F5F'x
     D0 '7D4A4B4C4D4E4F5051525F5F5FB15F5F'x
     E0 '5C83535455565758595A5F5FF75F5FB0'x
     F0 '30313233343536373839B75F6EB25F5F'x



Program 2: Edit the Table

 Note about code
   replace 10
   20 10 200 'x' 'ux' '092040'x;
 Note about code
   save;
 Note about code
   list one;

SAS Log

 Note about figure
NOTE: Saving table NEWTABLE.
NOTE: NEWTABLE table 2 will not be saved because it is uninitialized.
NEWTABLE table 1:
                             [darr]
          0 1 2 3 4 5 6 7 8 9 A B C D E F
     00 '00010203A309E57FF9EC140AC8787578'x
     10 '09204013A5E008E71819C6C51C1D1E1F'x
     20 'C7FCE9E2E40A171BEAEBE8EFEE050607'x
     30 'C9E616F4F6F2FB04FFD6DCA2B6A7501A'x
     40 '20E1EDF3FAF1D1AABABFA22E3C282B7C'x
     50 '265FACBDBCA1ABBB5F5F21242A293BAC'x
     60 '2D2F5FA6A6A6A62B2BA6A62C255F3E3F'x
     70 'A62B2B2B2B2B2B2D2D603A2340273D22'x
     80 '2B6162636465666768692D2BA6A62B2B'x
     90 '2D6A6B6C6D6E6F7071722DA62D2B2D2D'x
     A0 '2D7E737475767778787A2D2B2B2B2B2B'x
     B0 '2B2B2B5F5FA65F5F5FDF5FB65F5FB55F'x
     C0 '7B4142434445464748495F5F5F5F5F5F'x
     D0 '7D4A4B4C4D4E4F5051525F5F5FB15F5F'x
     E0 '5C83535455565758595A5F5FF75F5FB0'x
     F0 '30313233343536373839B75F6EB25F5F'x


At position 10 (which is byte 11), a vertical arrow denotes the starting point for the changes to the translation table.

Previous Page | Next Page | Top of Page