Desktop productivity for business analysts and programmers

Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

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.


Accepted Solutions
Solution
‎10-10-2017 12:19 PM
SAS Super FREQ
Posts: 376

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

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.

View solution in original post


All Replies
Super User
Posts: 9,551

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 4

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

Posted in reply to KurtBremser

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

Attachment
Community Manager
Posts: 3,348

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

[ Edited ]

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.

Super User
Posts: 9,551

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

Posted in reply to ChrisHemedinger

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
SAS Super FREQ
Posts: 376

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

[ Edited ]
Posted in reply to ChrisHemedinger

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.

New Contributor
Posts: 4

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

Posted in reply to CaseySmith

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.

Solution
‎10-10-2017 12:19 PM
SAS Super FREQ
Posts: 376

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

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.

New Contributor
Posts: 4

Re: Data grid in Enterprise guide displays 2A2A2A2A2A2A2A2A2A2A

Posted in reply to CaseySmith
Thank you very much for your time and patience.
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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