Alteryx Designer Discussions

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

Is the 'translate' tag ignored when reading flat files?

cam_w
11 - Bolide

 

I'm doing my due diligence while working on a custom solution for converting EBCDIC files, and found that Alteryx has a solution for this already. However, I can't seem to get it to work.

 

The functionality is defined in the 'Binary Flat Files' help page here: https://help.alteryx.com/current/BinaryFlatFiles.htm

 

And there was one previous thread I found here: Need-to-parse-mainframe-file-that-contain-packed-decimals

 

The file I'm reading was transferred from Mainframe to Windows platform as binary transfer:

 

3-29-2019 9-13-21 AM.png

 

 

 

 

 

 

 

 

And my .flat file is defined as:

 

<flatfile version="2">
  <file eoltype="none" allowShortLines="f" allowLongLines="f" trimWhiteSpace="f" />
  <fields>
    <field name="PIB" type="Int16" length="2"> <translate type="Integer" ByteOrder="LE" Signed="False"/> </field>
    <field name="Text" type="V_String" length="11"> <translate type="Text" CodePage="37" /> </field>
    <field name="Packed" type="Int32" length="4"> <translate type="BCD"/> </field>
    <field name="Filler" type="V_String" length="63"> <translate type="Text" CodePage="37" /> </field>
  </fields>
</flatfile>

However, when I run these through the 'Input Data' tool it seems to ignore the 'translate' tag and attributes, and the result is the same as running without it, defaulting to using the 'Code Page' translation that is selected by defaut. Is there something I'm missing to set up the tool to read using the XML?

 

Thanks,

 

Cameron

4 REPLIES 4
MarqueeCrew
19 - Altair
19 - Altair

@cam_w,

 

It has been years since I worked with mainframe data via Alteryx.  While you're waiting for a suitable response here, please open a ticket support@alteryx.com to see if someone there has a ready solution.  I might have time to work with you later this afternoon (Eastern) to try to work this out.  If you PM me with your address, I'll let you know my availability should you not get an answer.

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Please Subscribe to my youTube channel.
EricWe
Alteryx
Alteryx

In the Input Data Configuration Options window, select number 5 File/Field Layout, and click on the Ellipses button. Choose the option to use Field Setting from the File.

 

If the column types need to be adjusted after import, a Select tool can be used.

cam_w
11 - Bolide

@EricWe thank you! That was my problem (at least one of them) ... I was importing the .flat file into the workflow and embedding the field setting in the Workflow. Changing to the option use the field settings from a file got results!

 

My other issue was I still had a couple attributes that weren't capitalized correctly, but the first one was the major one. Here's my final XML for those that are curious:

 

<flatfile version="2">
  <file eoltype="none" allowShortLines="f" allowLongLines="f" trimWhiteSpace="f" />
  <fields>
    <field name="PIB" type="Int16" length="2"> <translate type="Integer" ByteOrder="BE" Signed="False" /> </field>
    <field name="Text" type="V_String" length="11"> <translate type="Text" CodePage="37" /> </field>
    <field name="Packed" type="Int32" length="4"> <translate type="BCD"/> </field>
    <field name="Filler" type="V_String" length="63"> <translate type="Text" CodePage="37" /> </field>
  </fields>
</flatfile>

 

wdavis2
5 - Atom

Hi @cam_w I'm experiencing the same issue. What attributes weren't capitalized?

My packed field is coming in as nulls

Labels