Reading packed decimal field from Mainframes flat file in to Unix

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

Reading packed decimal field from Mainframes flat file in to Unix

ed deHi all

I am trying to read a Mainframe flat file in to Unix (AIX) platform. I am using SAS FTP for this purpose. I need to read and later on export this file as excel using proc export. How ever I am facing issue while reading the packed decimal field stored in this file. They are getting read as unreadble characters and come as missing in the printed output.

I use the following filename statement.

FILENAME FTP TEST "'TEST.TESTFILE.MF'" HOST="XXX.XXX.COM" USER="XXX" PASS="XXXX";

DATA TEST;

INFILE TEST TRUNCOVER;

INPUT PDFIELD PD4.2;

RUN;

I tried using S370FPD in the input statements. I also tried giving binary/encoding=ebcdicany options in the FILENAME statement. Nothing seems to work for this packed decimal field alone. Can anyone help me in reading this field in a printable form?

Thanks in advance.


Accepted Solutions
Solution
‎08-16-2013 07:19 PM
Super User
Super User
Posts: 6,498

Re: Reading packed decimal field from Mainframes flat file in to Unix

Make sure to FTP it as BINARY. 

If some of the other fields have text then use $EBCDIC. informat.

View solution in original post


All Replies
Solution
‎08-16-2013 07:19 PM
Super User
Super User
Posts: 6,498

Re: Reading packed decimal field from Mainframes flat file in to Unix

Make sure to FTP it as BINARY. 

If some of the other fields have text then use $EBCDIC. informat.

☑ This topic is SOLVED.

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

Discussion stats
  • 1 reply
  • 955 views
  • 0 likes
  • 2 in conversation