DATA Step, Macro, Functions and more

what is the wrong with this data step? Please help me

Reply
Frequent Contributor
Frequent Contributor
Posts: 81

what is the wrong with this data step? Please help me

Hi

The field and the associated vaule in the flat file is follows

ORIGINALFACEVALUE
=================
52.92
52.92

I am reading it as @366 ORIGINALFACEVALUE 17.2

The field and value in the xls file are as follows
ORIGINALFACEVALUE
52.92
52.92

After I import the xls file into to SAS database then I compare using Proc compare to the sas database which I created from the flat file, I see the following results.

|| ORIGINALFACEVALUE
|| BASE COMPARE
OBS || ORIGINALF ORIGINALF DIFF. % DIFF
|| ACEVALUE ACEVALUE
________ || _________ _________ _________ _________
||
1 || 52.9200 52.9200 3.553E-15 6.713E-15
2 || 52.9200 52.9200 3.553E-15 6.713E-15


This is one example, I have more like this. Can anyone please explain me why this difference?

Thank you so much in advance.


Thanks

Inp
SAS Employee
Posts: 58

Re: what is the wrong with this data step? Please help me

I'm not sure we can tell from what you've posted just what you're trying to do (or how). Can you post your data step and/or your proc compare?
Frequent Contributor
Frequent Contributor
Posts: 81

Re: what is the wrong with this data step? Please help me

Thanks Patrick,
I can explain simply this, because the process is little complicated. All I am importing a very huge excell file in to SAS database and then ftp to mainframe. Also I have same information on the mainfram flat file Now I read flat file and cretated SAS database. Now I am testing by comparing those databases for testing

Here is compring step

PROC COMPARE BASE=NEWDB COMPARE=OLDDB
LISTBASEVAR LISTCOMPVAR;
TITLE1 " MEMBER: - DATA";
RUN;

when I read the flat file from the maifram the data step is as follows

DATA REDEEM1;
INFILE REDINCOM MISSOVER FIRSTOBS=3;
@366 ORIGINALFACEVALUE 17.2 ;

RUN;

DATA REDEMDB.REDEEM;
SET REDEEM1;
RUN;
Super User
Posts: 5,256

Re: what is the wrong with this data step? Please help me

This documentation might shed some light over your problem:

http://support.sas.com/documentation/cdl/en/lrcon/59522/HTML/default/a000695157.htm

/Linus
Data never sleeps
Super Contributor
Posts: 359

Re: what is the wrong with this data step? Please help me

This is due to the difference in storage bits on the 2 platforms. This is a common problem when migrating numeric data. Just round your data to 14 decimals after loading to the mainframe and the problem goes away.

Flip
Ask a Question
Discussion stats
  • 4 replies
  • 146 views
  • 0 likes
  • 4 in conversation