LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 24 Apr 2007 22:59:14 -0400
Reply-To:     "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Organization: Internet News Service
Subject:      Re: Code conversion C++ to SAS
Comments: To: sas-l@uga.edu

chandaknitin@gmail.com wrote: > Can we write SAS code similar to below C++ code? I want to process > given data using below code logic. At the end output data set should > have 5 observations. Let me know if you need more information. > > Quote ts_min ipl volume price are required columns. > > C++ code is doing memory manipulation, I am trying to achieve this > using Hash and array. > > Thanks, > Nitin > > > Quote ts ts_min seqnum ipl dpl volume price > MQFDD 30:01.1 9:30:00 1 1 1 100 9 > MQFDD 30:01.1 9:30:00 2 2 2 0 0 > MQFDD 30:01.1 9:30:00 3 3 3 0 0 > MQFDD 30:01.1 9:30:00 4 4 4 0 0 > MQFDD 30:01.1 9:30:00 5 5 5 0 0 > MQFDD 30:01.3 9:30:00 12 1 5 46 9.1 > MQFDD 30:01.3 9:30:00 14 3 3 10 7.2 > MQFDD 30:01.8 9:30:00 16 3 2 0 0 > MQFDD 30:01.8 9:30:00 17 2 5 100 8.95 >

Code is well and good, but how about plain english rules for how the data is to be processed ?

What are the 5 observations ?

The rules appear to be a transactional path in nature, for instance: Suppose values of some transaction record T are notated T.ipl and T.dpl. One rule might be, For each transaction T 1. find a past transaction record R having R.ipl = T.dpl 2. replace R with T

In this scenario the 16 3 2 record would not find a match since 3 would have been replaced with 14 3 3.

-- Richard A. DeVenezia http://www.devenezia.com/


Back to: Top of message | Previous page | Main SAS-L page