Generating Value Statements Using PROC FORMAT

by Irina 21. May 2007 09:21
 /****************************************************************/
 /*          S A S   S A M P L E   L I B R A R Y                 */
 /*                                                              */
 /*    NAME: FORMAT                                              */
 /*   TITLE: Generating Value Statements Using PROC FORMAT       */
 /****************************************************************/
 
DATA _NULL_;
   FILE PRINT;
   PUT 'PROC FORMAT IS BEING GENERATED BY MACRO PROCESSOR_SEE SASLOG';
RUN;

%MACRO FORMAT(VAL=VAL,LOW=,START=,STOP=,COUNT=);

PROC FORMAT;
   VALUE &VAL
%DO X=&START %TO &STOP %BY &COUNT;
   &LOW-&X="&LOW-&X"
   %LET LOW=%EVAL(&X+1);
   %END;
         ;
%MEND FORMAT;

%FORMAT(LOW=18,START=20,STOP=75,COUNT=5) ;

DATA NEXT;
   INPUT VALUE;
   CARDS;
18
20
56
27
30
36
66
12
75
100
;


PROC PRINT;
   FORMAT VALUE VAL.;
RUN;

Tags: formats

SAS

Related posts

Comments

8/8/2011 12:52:06 AM


I am happy to find so many useful information here in the post, thanks for sharing it here. I hope you will adding

more...THANK YOU!

thomas sabo sale

8/8/2011 12:52:28 AM


This site is very meritorious and detestable,I appreciate!THANK YOU!

Pandora Beads

8/8/2011 12:52:49 AM


Your article is quite uplifting,I wish you continued results in creating.THANK YOU!

Thomas Sabo Charms

8/8/2011 12:53:08 AM


Your article is quite uplifting,I wish you continued results in creating.THANK YOU!

louboutin

8/8/2011 12:53:28 AM


It's okay... love looking at your lovely post.THANK YOU!
Not much words needed, really.THANK YOU!

Pandora Bracelets

10/20/2011 9:03:34 PM

Your web site is incredibly well written and gives the tips all over particulars. Your site pretty form replies the issues. With because of get discussing.

Paris de centre

10/20/2011 9:04:14 PM

Your web site is incredibly well written and gives the tips all over particulars. Your site pretty form replies the issues. With because of get discussing.

Paris de centre

Add comment


(will show your Gravatar icon)  





Live preview

2/5/2012 9:25:51 PM

 

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2012

    Sign in

    eXTReMe Tracker