- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
We previously used SAS to query oracle tables, in one of these views we used the DBMAX_TEXT option as there is a table where the number of characters exceed the SAS standard. The oracle tables have been migrated over to Postgres and we are connecting and can query the data however the DBMAX_Text option is not working and is truncating the text. Would anyone know how to fix this issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
What actually access engine are you using to connect to Postgres?
What actually variable types are the values you are retrieving.
The documentation is unclear whether the option even applies to normal VARCHAR() varaibles.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n1aqglg4ftdj04n1eyvh2l3367ql.htm
Look at the DBSASTYPE option instead, but you will need to know which variables you want set the SAS type for.
https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/n0v4ma1zb9lu99n1728j279rjcqi.htm
Are you sure the variable LENGTH has been truncated? Or are you perhaps just seeing impacts of transcoding making the content require more bytes in the encoding used in the SAS session than the source encoding and so the new value is too long for the SAS variable? That might lead to truncation. There is a separate option to add a fudge factor to then length of character variables to attempt to account for transcoding issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, this helped me.
I was able to use DBSASTYPE in PROC SQL, however had to use CAST() when using an explicit pass through.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content