Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scientific format conversion

Status
Not open for further replies.

Ulaso

Technical User
Oct 31, 2009
6
0
0
CA
Hello,
I am importing a csv file to sas. I have order numbers as identifiers,they are 15-16 digits.they appear in the scientific format in the original final.
The order numbers are unique for each transaction.However, after importing
and formating I am not able to get unique numbers.Below small sample of the data and the code is posted.Could anyone tell me where the mistake is?
Thank you.



data work.aksaislem1;
set work.aksaislem;
Buyer_order=put(buyer_order_no,16.);
drop buyer_order_no;
rename Buyer_order=buyer_order_no;
run;

Here is a small sample of the data
Session Numerator Security Pkod Market Order_Type Time Price Quantity Buyer_Mpf Buyer_Order_No Seller_Order_No
1 672 AKSA E N B 9:30:38 3.64 287 M 4.01E+14 4.01E+14
1 1516 AKSA E N B 9:31:39 3.64 13 M 4.01E+14 4.01E+14
1 1517 AKSA E N B 9:31:39 3.64 185 M 4.01E+14 4.01E+14
1 1725 AKSA E N B 9:31:57 3.66 1998 M 4.01E+14 4.01E+14
1 1726 AKSA E N B 9:31:57 3.66 460 M 4.01E+14 4.01E+14
 
My suggestion is since it is a text field try using substr function to manipulate
For example

Buyer_order=(put(substr(buyer_order_no,1,4),8.)*100000000000000);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top