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 2006, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 28 Mar 2006 11:05:24 -0500
Reply-To:   Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Gerhard Hellriegel <ghellrieg@T-ONLINE.DE>
Subject:   Re: How to write an Utlity Macro
Content-Type:   text/plain; charset=ISO-8859-1

It is not clear, what you really want to do. You talk about datasets, libraries, domains, variables, ... They should be in or not and have certain lengths, ... but what should that all DO? Whats the reason of it?

You read a "domain/dataset and check labels, names, ...". What does that mean? What is a domain? You want it for a whole library - what? Some variables have or have not to be in... - where? In the domain (whatever that is) in the library? In each dataset of the library? Only in one? Which one? Many variables like --nnnn should be (or not?) in the datasets (?). Variables starting with - are not possible in SAS! Also if they where - what sould be with that variables? They should have a certain length - all variables have a certain length! Should they be redefined? Are they in the datasets? What's to do, if they are not?

Normally you have a problem which you want to resolve. Whats that problem? It is certainly the wrong way to say, you want to write a utility macro and then find a problem which can be resolved by it. Nobody will do that.

So please tell something about your problem and your environment (data, libraries, platforms and all the things which makes your environment special), so somebody may support you.

On Tue, 28 Mar 2006 07:06:37 -0800, proccontents@gmail.com <proccontents@GMAIL.COM> wrote:

>Hello guys I am writing a Utlity macro, though I started writing a >sample code which checks for single dataset I do not know how to make >it work for whole library, any body any help . Here is what I am >planning to do . > >(Any body can explain me how to plan to write such macros please ) >· Need to read the Domain/dataset >· Check the variable Name, label, length and type. >· Unless specified in the domain, all character variables shall have >a length definition of 200 >· All numeric variables shall have a length definition of 8. >· Variables shall not require any user-defined SAS formats. >· >Exception cases >· DSENDTC shall not be variable in that dataset. >· Check the veriabel that should not be there in that dataset >· STDY shall not have value of 0 when not blank >· -ENDY shall not have value of 0 when not blank >· --STAT is not blank, all result and unit variables in the dataset >shall be blank >· LBSTDTC shall not be a variable in the dataset-LB >· VISITNUM shall not be a variable in the dataset- SC >· VISIT shall not be a variable in the dataset --SC >· VISITDY shall not be a variable in the dataset -SC > >These variables need to be specified certain length.. > >COVAL1, COVAL2, COVAL3, ..., COVAL, OCTA_SEQ. >RDOMAIN, IDVAR, AGEU, SEX, ETHNIC, ARMCD, COUNTRY, --OCCUR, --STAT, >--SER, --SCAN, --SCONG, -SDISAB, --SDTH, --SHOSP, --SLIFE, --SOD, >--SMIE, --CONTRT, --TESTCD, --BLFL, --FAST,, --DRVFL, DOMAIN, --STRF, >--ENRF, IETEST,, IECAT, IEORRES, IESTRESC, --OCCUR, RDOMAIN, IDVAR, >QNAM, QLABEL,


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