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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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