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.

Including an Existing Format Within a Format Definition

When defining a format, you can include an existing format as part of the definition, as shown in the following example.

Program:

proc format; 
  value band low-20000='Under 20K'
  other=[dollar10.2];
run;


proc print data=sashelp.cars noobs;
  var make model invoice;
  format invoice band.;
run;

Output:

Make        Model                                       Invoice

Chrysler    PT Cruiser Limited 4dr                     $20,573.00
Chrysler    Sebring 4dr                                Under 20K
Chrysler    Sebring Touring 4dr                        $20,284.00
Chrysler    300M 4dr                                   $27,797.00
Chrysler    Concorde LX 4dr                            $22,452.00
Chrysler    Concorde LXi 4dr                           $24,909.00
Chrysler    PT Cruiser GT 4dr                          $24,172.00
Chrysler    Sebring convertible 2dr                    $23,451.00
Chrysler    300M Special Edition 4dr                   $30,884.00
Chrysler    Sebring Limited convertible 2dr            $28,613.00
Chrysler    Town and Country LX                        $25,371.00
Chrysler    Town and Country Limited                   $35,063.00
Chrysler    Crossfire 2dr                              $32,033.00
Chrysler    Pacifica                                   $28,725.00
Dodge       Durango SLT                                $29,472.00
Dodge       Neon SE 4dr                                Under 20K
Dodge       Neon SXT 4dr                               Under 20K
Dodge       Intrepid SE 4dr                            $20,502.00