BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I have a file I FTP'd in binary to do the conversion in SAS.

I am having concerns over a field that looks like S9(12)V99. It should be in a packed decimal format w/ 14 bytes and has an implied decimal.

From everything I've been told I figued using S370FPD14. should work. It did not.
I ended up using S370FZD15.3 Why did this work?

Thank you
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Have a look at these two SAS support site http://support.sas.com/ DOC references, regarding the two INFORMATs you mentioned; packed-decimal and zone-decimal are quite different, maybe your info source is incorrect? You didn't mention the exact SAS behavior or symptom when attempting to read the data file -- it would be useful to provide some hex-value strings in your post for feedback.

Also, I found the first link reference by doing a Google advanced search against the SAS.COM site, using the search argument below:

+packed +decimal +zoned site:sas.com

Scott Barry
SBBWorks, Inc.

Working with Packed Decimal and Zoned Decimal Data
http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a001239773.htm

http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000204461.htm

http://support.sas.com/documentation/cdl/en/lrdict/59540/HTML/default/a000204453.htm
deleted_user
Not applicable
Thanks for the reply,

"maybe your info source is incorrect?"

Seems it may be.


Here's some things I've seen

The field appears like this;

0000000000092{

Using S370FPD14.
returns;
SAS error - Invalid data for COST in line 3 91-104.

Using S370FZD14.
Rturns;
920

Using S370FZD14.3
Returns;
0.92

Using S370FZD15.
Returns;
9200

Using S370FZD15.3
Returns;
9.2

I really found this just by trial and error. I'm no mainframe pro.

Catch up on SAS Innovate 2026

Dive into keynotes, announcements and breakthroughs on demand.

Explore Now →
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1408 views
  • 0 likes
  • 2 in conversation