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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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