Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Creating a Format from a Data Set in SAS Enterprise Guide

Within SAS Enterprise Guide a format can simply be created from an existing dataset. In this example a format is made to display the staff number as the employees name.

Creating a Format from a Dataset in SAS Enterprise Guide1

On the tool bar select Tasks -> Data -> Create Format from Data Set…

Creating a Format from a Dataset in SAS Enterprise Guide2

A window will appear, you will need to fill in the following:-

  • Source data set - the dataset you would like to use to create your format;
  • The format name – a name for the format (in this case Staff_Name);
  • Format type – the data type of the variable to be formatted (Staffno is a character variable therefore a character format will need to be created);
  • Value type – this is either discrete or a range. We are creating a discrete format as staffno is unique. If range was selected a start and end column would need to be chosen;
  • Discrete values is the variable that contains the starting value;
  • Labels is label you wish to generate.

Creating a Format from a Dataset in SAS Enterprise Guide3

Once you have specified the format details select Run.

When the properties of variable are selected, the format $STAFF_NAME appears under user defined formats.

Creating a Format from a Dataset in SAS Enterprise Guide4

The results below show that output when this format is applied to the staffno variable.

Creating a Format from a Dataset in SAS Enterprise Guide5