BookmarkSubscribeRSS Feed
Anton_Rudin
Calcite | Level 5

Hi, can't understand how the sas rtdm function TABLEDECODE working. For example using this function TABLEDECODE (<<VARIABLE>>) and it show mistake. Can you help me please

 

1 REPLY 1
radekbitr
SAS Employee

Hi,

SAS RTDM function TABLEDECODE requires specific encoded string format, which is used for encoded data grid via TABLEENCODE function. 
Below is example of data grid (e.g. retrieved data via Data Process from database) and encoded into string format.
The same format is also expected as input to TABLEDECODE function. 

t5607|2|CNST_MKT_SMS|1|PERS_DATE|5|CHANNEL_FLAG|1|TOT_BAL|3|INFOLIMIT_AMT|3|GENDER_ID|1|LMT_AMT|3|CNST_UNDECIDED|@n|XNA|0.0|34000.0|1|25000|CNST_UNDECIDED|@n|OPEN|0.0|30000.0|XNA|40000|


Documentation regarding TABLEDECODE and TABLEENCODE Functions:
You use the TABLEENCODE and TABLEDECODE functions to store a data grid in a long database column or to send a data grid to a web service activity. The TABLEENCODE function encodes a data grid into a string. The TABLEDECODE function decodes a string into a data grid. You can also use SAS DS2 to decode an encoded data grid

Here is an example of using the TABLEENCODE function to encode a data grid:
TABLEENCODE(<<MyDataGrid>>)
Here is an example of using theTABLEDECODE function to decode an encoded string:
TABLEDECODE(MyString)

 

Radek

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Discussion stats
  • 1 reply
  • 1584 views
  • 0 likes
  • 2 in conversation