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, email@example.com
>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.
>· 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,