Format/Informat

Reply
N/A
Posts: 0

Format/Informat

Hi,

I usually use proc format to create format/informat for my data values. Since in SAS there are many ways to accomplish a task, I am just wondering if formats/informats can be created by some other methods as well.

I appreciate if someone can point me to those methods.

Thanks

Cathy
SAS Super FREQ
Posts: 8,721

Re: Format/Informat

Hi:
In my opinion, one of the most powerful features of PROC FORMAT is the ability to use a special SAS dataset as the input to the procedure. Building a format for 10 codes is not a big deal and with cut and paste, building format for 50 codes still isn't too bad. But when faced with building a format for 1000 codes, if the data exists in a form that can be read into a SAS dataset, I find the CNTLIN/CNTLOUT features of PROC FORMAT to be valuable tools.

The PROC FORMAT documentation has very good examples of both CNTLIN and CNTLOUT. Basically, CNTLOUT is a way to turn your format or informat information into a SAS dataset and CNTLIN is a way to turn information from a dataset into a format or informat.

Look for the topic
The FORMAT Procedure --> Results: FORMAT Procedure for more information on this subject.

In addition, these Google hits on CNTLIN and user group papers might prove useful:
http://www.ats.ucla.edu/STAT/sas/faq/format_frm_dataset.htm
http://dc-sug.org/patton.pdf
http://www.bassettconsulting.com/lazy_way.pdf
http://www2.sas.com/proceedings/forum2007/068-2007.pdf
http://www2.sas.com/proceedings/sugi27/p086-27.pdf
http://www.ssc.wisc.edu/sscc/pubs/4-4.pdf

cynthia
N/A
Posts: 0

Re: Format/Informat

Hi Cynthia,

Thank you very much for the lucid explanation. I really appreciate your willingness to help people like me!! The links are a valuable source of information.

Cathy
Ask a Question
Discussion stats
  • 2 replies
  • 314 views
  • 0 likes
  • 2 in conversation