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 (April 2005, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Apr 2005 16:47:30 -0400
Reply-To:     "Fehd, Ronald J" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J" <rjf2@CDC.GOV>
Subject:      tip: messages: notes, warnings, errors, ... etc!
Content-Type: text/plain; charset="us-ascii"

We get by with a little help from our friends!

My thanks to SAS-L Rookie of the Year 2004: Toby Dunn for pointing me to SAShelp.*msg as the input of this program

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov

/* name: RnDmessages.sas -------------: User Requirements: description: provide list of SAS messages purpose: Research -------------: Program Specifications: program group: Research program type: job SAS type: code generator input: Dictionary.Tables of LibName = SAShelp process: generate macro calls to each data=*msg to append all messages output: work.SAShelpMessages notes: SAS-L coding challenge thanx to Toby Dunn who pointed out SAShelp.*msg usage: batch or submit author: Ronald J. Fehd change notes: RJF2 05Apr19 RnDmessages.lst is ~15,000 lines due to double-spacing from by+id

NOTE: The data set WORK.SASHELPMESSAGES has 8822 observations and 4 variables.

PROC SQL;describe table Dictionary.Tables;quit; Proc Print data = SAShelp.SASmsg; run; *** .................................... */ options linesize = max;

%Let KeepList = MsgId Mnemonic LineNo Level Text Pbuttons; %Let KeepList = MsgId LineNo Level Text ;

DATA SAShelpMessages; if 0 then %*copy structure with LineNo as 8 byte numeric; set SAShelp.BVGmsg(keep = &KeepList.); stop;

%Macro DescribeTable(data=); /************** PROC SQL; describe table SAShelp.&Data.;quit; /**************/ PROC Append base = SAShelpMessages data = SAShelp.&Data. (keep = &KeepList.); run;%Mend;

PROC SQL;select '%DescribeTable(data=' !! trim(MemName) !! ')' into :List separated by ' ' from Dictionary.Tables where LibName eq 'SASHELP' and index(MemName,'MSG') ;quit; &List.;

PROC Sort data = SAShelpMessages; by MsgId LineNo Level Text;

PROC Print data = SAShelpMessages noObs; by MsgId; id MsgId;

PROC Freq data = SAShelpMessages; tables Level;

run;

The FREQ Procedure Cumulative Cumulative LEVEL Frequency Percent Frequency Percent 1 1 0.01 1 0.01 ? 61 0.89 62 0.90 E 2966 43.23 3028 44.13 I 21 0.31 3049 44.44 L 241 3.51 3290 47.95 N 1378 20.08 4668 68.04 O 857 12.49 5525 80.53 Q 298 4.34 5823 84.87 W 1038 15.13 6861 100.00

Frequency Missing = 1961


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