BookmarkSubscribeRSS Feed
D-G
Calcite | Level 5 D-G
Calcite | Level 5

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? 

 

3 REPLIES 3
Tom
Super User Tom
Super User

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.

 

 

knightsasuser
Calcite | Level 5

Thanks, this helped me.

I was able to use DBSASTYPE in PROC SQL, however had to use CAST() when using an explicit pass through.

Ksharp
Super User
Did you check the format of that variable ,if the length of format is great than the length of variable ?

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 994 views
  • 1 like
  • 4 in conversation