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:
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
Solved! Go to Solution.
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
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.
@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>
Hi @cam_w I'm experiencing the same issue. What attributes weren't capitalized?
My packed field is coming in as nulls
Hi
I'm also facing a similar issue now.
Could you please let me know how you resolved your problem?
Thanks in advance
User | Count |
---|---|
19 | |
15 | |
15 | |
9 | |
8 |