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 (March 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 9 Mar 2009 14:23:16 -0500
Reply-To:     Mary <mlhoward@avalon.net>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Mary <mlhoward@AVALON.NET>
Subject:      Re: Program Error
Comments: To: Jake Bee <johbee@GMAIL.COM>
Content-Type: text/plain; charset="iso-8859-1"

Yes, Jake, my solution stopped before changing the dosage to numeric, but YOU solved it brilliantly!!

-Mary ----- Original Message ----- From: Jake Bee To: SAS-L@LISTSERV.UGA.EDU Sent: Monday, March 09, 2009 1:35 PM Subject: Re: Program Error

Didn't we solved this? One example:

dm 'log' clear; dm 'out' clear;

data ndc; length ndc_code $20; infile datalines dlm=','; input age ndc_code $; dosage=input(compress(scan(ndc_code, 2, "-"),'*'),3.); if ((age <= 10) and (dosage > 5)) then dosage_error=1; else dosage_error=0; datalines; 10, 12345-015-12 10, 12345-005-12 10, 12345-001-12 10, 12345-*15-12 10, 12345-*5-12 10, 12345-*45-12 10, 12345-*1-12 20, 12345-*25-12 20, 12345-*5-12 20, 12345-*1-12 20, 12345-*25-12 ; run;

proc print; run;


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