BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
lugoga
Calcite | Level 5

Hello. A data set in SAS enterprise Guide 6.1 displays the value of 2A2A2A2A2A2A2A2A2A2A for all the elements of a column. SAS base displays the actual values like: 19980109074311592439. To put it in other words the value of 19980109074311592439 takes the form of 2A2A2A2A2A2A2A2A2A2A  in SAS enterprise Guide, using the same data set. Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
CaseySmith
SAS Employee

To set the EG config file option to get formatted values directly from the server:

  • Close EG.
  • Open the SEGuide.exe.config file from the EG installation directory (ex. C:\Program Files\SASHome\SASEnterpriseGuide\7.1\) into a text editor.
  • There will be a commented out appSettings section that looks like this:
      <!-- Example application settings -->
      <!--
      <appSettings>
        <add key="<key>" value="<value>" />
      </appSettings>
      -->
  • Change it to this:
      <!-- Example application settings -->
      <appSettings>
        <add key="FormatValuesAsNeeded" value="false" />
      </appSettings>
  • Re-start EG.

To set transcodeaction=modify on your current server session:

  • In EG, click File->New->Program.
  • Copy/paste this into the program editor:   options transcodeaction=modify;
  • Click the Run button to run the program.

At this point, re-open your data in the data grid and ensure it now appears as expected.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

View solution in original post

8 REPLIES 8
Kurt_Bremser
Super User

Use the macro provided in https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... to create a data step from your dataset, and post the resulting code here, using either the "little running man" or the {i} icon to preserve all characters and formatting as-is.

Since 2a is the hex code for an asterisk, it seems that your variable is exceeding the display width and/or the format capacity.

While Base SAS (Display Manager) displays values as they are, EG first transfers them raw through the IOM bridge and then does the formatting client-side, which may lead to your problems.

lugoga
Calcite | Level 5

Se attached file. The incorrect variable is: ProduktGenId:$10.

ChrisHemedinger
Community Manager

This is a known issue with some data -- I think it has something to do with the format/length/encoding, and how EG must retrieve the values from SAS. @CaseySmith can probably describe the exact circumstance that causes it and a potential workaround.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Kurt_Bremser
Super User

There is an option (I think new with EG 7) that sets formatting on the server side and transfers formatted data, instead of transferring raw data and doing the formatting in EG. I have that set, but I can't remember how I did it. It makes sure that binary strings with a $HEX format attached do not end prematurely when a '00'x is encountered.

CaseySmith
SAS Employee

Update: I just noticed you mentioned you are seeing those values with a column with $10. format (ProduktGenId:$10.).  The issue I describe below is what we've seen for $HEX formatted values, so you might be seeing something else.  Similar enough that I'd still try the workarounds below though.

 

Yes, it is a known issue with binary/hex formatted data.  It is related to the fact that SAS variables are stored as character or numeric -- there is no true binary type.

 

You can workaround the issue by turning on the transcode=modify option on the server (ex. submit "options transcodeaction=modify;") AND instructing EG to get the formatted values from the server (rather than raw values, then explicitly formatting them) via this SEGuide.exe.config file option:

 

  <appSettings>
    <add key="FormatValuesAsNeeded" value="false" />
  </appSettings>

 

Casey

 

ps- If interested in the details:

 

The SAS server is returning the raw binary values to EG as a string of asterisks (ex. "******") -- since no native support for binary data.  To get formatted values, EG explicitly formats the raw values retrieved from the server (for wide-data performance).  So, EG explicitly formats the raw value "******..." using the format "$hex32.", resulting in "2A2A2A..." since "2A" is the hex value for the asterisk character.  This problem can be worked around by submitting "options transcodeaction=modify;" on the server, which will cause the server to attempt to return the actual raw values.

However, even with transcodeaction=modify, there is another potential problem.  If the binary/hex value contains '00', the raw value that comes back from the server will be truncated, since that is normally a null terminator for a string.  The workaround for this related issue is to instruct EG (via the config option above) to get the formatted values directly from the server, instead of formatting the raw values we get from the server.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

lugoga
Calcite | Level 5

Thanks. It seems to be my problem. I just did not get how to solve it.

 

How do I, an analyst, turn on the transcode=modify option on the server

 

Which one is the SEGuide.exe

 

Is it  this:

  <appSettings>
    <add key="FormatValuesAsNeeded" value="false" />
  </appSettings>

 

How do I run it.

 

Thanks for your time.

CaseySmith
SAS Employee

To set the EG config file option to get formatted values directly from the server:

  • Close EG.
  • Open the SEGuide.exe.config file from the EG installation directory (ex. C:\Program Files\SASHome\SASEnterpriseGuide\7.1\) into a text editor.
  • There will be a commented out appSettings section that looks like this:
      <!-- Example application settings -->
      <!--
      <appSettings>
        <add key="<key>" value="<value>" />
      </appSettings>
      -->
  • Change it to this:
      <!-- Example application settings -->
      <appSettings>
        <add key="FormatValuesAsNeeded" value="false" />
      </appSettings>
  • Re-start EG.

To set transcodeaction=modify on your current server session:

  • In EG, click File->New->Program.
  • Copy/paste this into the program editor:   options transcodeaction=modify;
  • Click the Run button to run the program.

At this point, re-open your data in the data grid and ensure it now appears as expected.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

lugoga
Calcite | Level 5
Thank you very much for your time and patience.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 1858 views
  • 8 likes
  • 4 in conversation