Depending on the characteristics of the data you might be able to make one table with 4 characters in the first column.
Pad the 3 character entries with one space on the right and pad the data for the lookup just like you are doing for the 2 character.
Pad the 2 character data and entries accordingly.
The 4 character entries and data would remain untouched.
So if you had these values for the table: 1234 123 12 the table entries would look like this ( means one space):
1234
123
12
Of course if a space is a valid entry in a 4 character identifier then that won’t work and you will need to use some other pad character.
Then in your Xlate pad the appropriate number of spaces to the data (possibly to a temp variable) and then do the Lookup.
I do not recall what happens if you do not populate the second column (maybe you get a null returned) but I always put a value in the second column. If I am filtering then I put a Y or an N to indicate Yes or No.
If you do not specify anything for the Default then you will get a null for the lookup value if the data value is not found in the Table.
If it is filtering you are attempting to accomplish then a better place to do this would be in a pre-Xlate proc in the Route definition (you can still use a Table).
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.