DATA Step, Macro, Functions and more

S370FZD

Reply
N/A
Posts: 0

S370FZD

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
Super Contributor
Super Contributor
Posts: 3,174

Re: S370FZD

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
N/A
Posts: 0

Re: S370FZD

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.
Ask a Question
Discussion stats
  • 2 replies
  • 147 views
  • 0 likes
  • 2 in conversation