• No products in the cart.

SAS Programming proc format?

Play Video

In SAS, global options are used to control various aspects of the SAS system and its behavior. Some of the commonly used global options are:

1. MSGLEVEL: specifies the level of detail of SAS messages that are printed to the SAS log.
2. MPRINT: specifies whether SAS should print the code generated by macro processing to the SAS log.
3. NOTES: specifies whether SAS should write notes about the processing steps to the SAS log.
4. SOURCE: specifies whether SAS should print source code and include line numbers in the SAS log.
5. DATE: specifies the date format to be used by SAS.
6. LINESIZE: specifies the maximum line length for output.
7. PAGESIZE: specifies the maximum number of lines for each page of output.
8. NOCENTER: specifies that SAS should not center titles and footnotes on output.

These options can be set using the OPTIONS statement in SAS. For example:

options linesize=80 pagesize=60;

This sets the LINESIZE option to 80 and the PAGESIZE option to 60.

By setting these options, users can customize the behavior of SAS to suit their specific needs and preferences.

What are the different proc format options?

In SAS, the PROC FORMAT procedure is used to create custom formats that can be applied to variables in SAS datasets. Some of the commonly used options in PROC FORMAT are:

1. FMTLIB: specifies the name of the format catalog to be created or used.
2. FMTSEARCH: specifies the order in which SAS searches for user-defined formats.
3. VALUE: specifies the values to be associated with a particular format.
4. INVALUE: specifies the input values to be associated with a particular format.
5. START: specifies the starting point of a range of values.
6. END: specifies the ending point of a range of values.
7. MISSING: specifies the value to be used for missing values.
8. DEFAULT: specifies the default format to be used for variables that do not have a specific format assigned.
9. LABEL: specifies a label for the format.

These options can be used to customize the format and appearance of data in SAS output. For example, the following code creates a custom format named HEIGHT that formats values for height in inches:

proc format;

   value height

   060 = ‘Short’

   6172 = ‘Average’

   73-high = ‘Tall’




This format can then be applied to a variable containing height data, like so:

data heights;

   set people;

   height_format = put(height, height.);


This will create a new variable called height_format that has values like ‘Short’, ‘Average’, or ‘Tall’, depending on the height value in the original dataset.

Template Design © Bodhan soft technologies PVT.LTD. All rights reserved. <meta name="facebook-domain-verification" content="cg6nsg7wc0h385jtk0v0gswpb924ti" />

Connect with :

Chat with Us
We are Online
Hello ,
How we can help you ?