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 (January 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sun, 29 Jan 2006 01:01:32 -0800
Reply-To:     Hari <excel_hari@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Hari <excel_hari@YAHOO.COM>
Organization: http://groups.google.com
Subject:      Drop odd rows after reading from a Text file
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset="iso-8859-1"

Hi,

(This problem is opposite of what I had posted some time back.)

I have got an output from a software (Standard errors of parameter estimates in HB-Reg) which is a text file in the following format.

1 13 87.65 98.76 90.23 87.00 2 83 15.23 90.56 87.12 25.87 3 93 87.65 98.76 90.23 87.00 4 13 87.65 98.76 90.23 87.00 5 83 15.23 90.56 87.12 25.87

Which can go on to up to a MAXIMUM of 106 rows (53 markets and 2 rows for each) .

I want to read this file to SAS and be able to remove every odd row above. Basically the number in the odd rows are the actual row numbers of the standard errors (of the market parameters) given just below it.

One way to do this would be to probably apply something similar to modulus function and drop all rows for which mod(_n_,2) = 1. Are there more elegant ways to achieve the same in SAS? (Any data step magic).

Regards, Hari India


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