Date: Mon, 10 Apr 2006 13:12:31 -0400
Reply-To: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject: Re: Two level format name, possible?
On Mon, 10 Apr 2006 13:07:50 -0400, Mike Rhoads <RHOADSM1@WESTAT.COM> wrote:
>Like Toby, I am not aware of any direct / easy way of doing this, even
>in 9.1.3. :-( It would be sort of contrary to the way that they have
>set up their architecture for formats.
>A slight modification on Toby's suggestion would be to create a unified
>format library, but to take advantage of the longer format names that
>are now permitted. In other words, you would have one format named
>study1_visit and another one named study2_visit. You could then use
>these names in your conditional PUTs.
Or, instead of conditional PUTs, use PUTN, which allows the name of the
format to be computed at runtime.
>From: email@example.com [mailto:firstname.lastname@example.org]
>On Behalf Of toby dunn
>Sent: Monday, April 10, 2006 12:17 PM
>To: ya.huang@AMYLIN.COM; SAS-L@LISTSERV.UGA.EDU
>Subject: RE: Two level format name, possible?
>Unless someone knows something that I do not (I would be intersted if
>did know how to do this with a two level name) you are correct you cant
>this. Now I would more than likely create a third format that glues the
>formats together based on an overloaded field of 'Study' and 'Visit'.
>From: Ya Huang <ya.huang@AMYLIN.COM>
>Reply-To: Ya Huang <ya.huang@AMYLIN.COM>
>Subject: Two level format name, possible?
>Date: Mon, 10 Apr 2006 12:09:54 -0400
>Assuming that I have two formats catalog stored in two different place,
>and the format names are same. Is there any way I can use them in one
>data step with some kind two level name reference? I search the SAS-L
>archive, and found one very old thread (10 year ago) which basically
>concluded that no easy way to do this. I wonder if this has been changed
>with all the later version of SAS:
>proc format library=v1;
>proc format library=v2;
>study=1; visit=1; output;
>study=1; visit=2; output;
>study=1; visit=3; output;
>study=2; visit=1; output;
>study=2; visit=2; output;
>study=2; visit=3; output;
>** this doesn't work;
> set visit;
>if study=1 then cvisit=put(visit,v1.visit.);
>else if study=2 then cvisit=put(visit,v2.visit.);