We’ve extended Inspire Early Bird Pricing until March 1. Register now and enjoy 20% off conference passes and 10% off training passes. P.S. Don’t forget to bring friends! When you sign up for five or more tickets, you get an extra 20% discount on conference passes. Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to read .bin flies (plus .sas SAS-code file)

Federica_FF
11 - Bolide

Hello everybody,

 

I have a .bin file that contains a binary string and a .sas file that contains the SAS-code to make the .bin readable.

 

How can I use them in Alteryx?

 

Maybe some SAS users in the forum already had the needed to manage such kind of input?

2 REPLIES 2
PaulN
Alteryx Alumni (Retired)

Hi @Federica_FF,

 

Alteryx can't interpret SAS code directly. If you have SAS installed you may run it in non-interactive mode through a Run Command tool.

 

If you are going to use multiple .bin files, it might be better to implement the SAS code in Alteryx directly?

 

Thanks 

Federica_FF
11 - Bolide

Hi @PaulN!

 

Just for the record, (I probably wrote in a very bad way my question!) I found a way to open the bin flat file.

 

The .sas file is actually the file that contains the record formats (Column header, data type and size).

@01 ORDERID   s370fRB4.  @05 MKT       s370fIB2.  @07 SALES       s370fIB

 

The .bin files contains the real data we want to parse to get a columnar table.

 

We could build a XML file parsing the the information from the .sas file (which can be read in by Alteryx as csv with no delimiters)

 

<flatfile version="2">
<file eoltype="none" allowShortLines="t" allowLongLines="t" trimWhiteSpace="f" />
<fields>
 <field name="ORDERID"   type="Int32" length="4"  > <translate type="Integer"/> </field>
 <field name="MKT"  type="Int32" length="2"  > <translate type="Integer"/> </field>
 <field name="SALES"    type="Int32" length="4"  > <translate type="Integer"/> </field>
  </fields>
</flatfile>

 

After that we were able to open the .bin file in Alteryx as ASCII Flat FIle using the XML as Field Layout.

 

That worked, but we are not getting the data we were expecting... negative numbers for the ORDER ID, for example.

 

We can't find a simple resource (a dummy lookup table) to "translate" the data type from sas to the Alteryx format (C or C+ I guess).

 

Just an update to say that we are close to the solution.

Labels