Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!

question on parsing Mainframe packed decimal and zoned decimals in Alteryx .

6 - Meteoroid

Help on parsing Mainframe data.

If anybody successfully parsed mainframe packed decimal and zone decimal (Signed).   I am using .bat file to download the mainframe file using ftp into Alteryx.  


Hello @Ananth 

Could you include a copy of your workflow and some sample information if possible to provide some additional context into your query?

The more information you can include, the better the chances of a member of the Community being able to assist you.



Community Moderator
6 - Meteoroid

Thanks Trevor


I have downloaded a mainframe (EBCDIC)  file to PC using .bat (run command).   Now the question is to parse the numeric data (packed decimal/zoned decimals with sign) which downloaded as junk in ASCII from EBCDIC format.  looking for option to parse the file.  . 


Packed decimal


Pic 9(6)v99  Comp-3 in mainframe          PD

pic  S9(6)V99.  (signed zoned decimal)  ZD

6 - Meteoroid


Below is a logical aproach to solve this, that I've applied in my work

Step1 : You can either land the EBCDIC data  in bytes form from source   [ select hex(ebcdic_data)  from source_table] 


apply the code page encoding on the ASCII form of the EBCDIC data and then apply HEX function  to get HEX form of BYTES ( Eg:  Hex(Encode(ebcdic_column,'IBM500')) - where IBM500 is the codepage)


Step2: Once you get the HEX form of the bytes , you can write custom UDF s in python,etc  to convert the data to readable .

This is an approach I followed as PySpark script to solve this issue in my project .


Since Alteryx 2018.3 supports Python script , it may be a possibility to apply these UDFs in Alteryx , I have not explored this option in Alteryx  though.