# PDw.d Format: Windows

Writes values in packed decimal data.
 Category: numeric Alignment: left Windows specifics: How the values are interpreted as negative or positive See: PDw.d Format in SAS Formats and Informats: Reference

## Syntax

PDw.d

### Required Arguments

w
specifies the width of the output field in bytes (not digits).
Default:1
Range:1–16
d
specifies a scaling factor. When you specify a d value, the PDw.d format multiplies the number by 10d, and then applies the packed decimal format to that value.
Range:1–31

## Details

The PDw.d format writes double-precision numbers in packed decimal format. In packed decimal data, each byte contains two digits. The w value represents the number of bytes, not the number of digits. The value's sign is in the uppermost bit of the first byte (although the entire first byte is used for the sign).

## Examples

### Example 1: Processing a Positive Number

If you format 1143.0 using the PD2. format, you receive the following value:
`00 99`
If you specify PD4., you receive the following value:
`00 00 11 43`

### Example 2: Processing a Negative Number

If you format −1143.0 using the PD2. format, you receive the following value:
`80 43`
If you specify the PD4. format, you receive the following value:
`80 00 11 43`

### Example 3: Processing a Number That Is Too Large To Format

When a numeric value is too large to format, as in this example
```data a;
x = 1e308;
y = put(x, PD16.2);
put y = hex16.;
run;```
the result is
`y=0099999999999999`

Informats:
{"ft_lang_label":"__label__en","ft_lang_prob":0.6490981,"math_prob":0.90047175,"size":1161,"snap":"2019-35-2019-39","text_gpt3_token_len":320,"char_repetition_ratio":0.14001729,"word_repetition_ratio":0.08374384,"special_character_ratio":0.2764858,"punctuation_ratio":0.1627907,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9829506,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-08-24T13:22:09Z\",\"WARC-Record-ID\":\"<urn:uuid:73def288-2726-4124-ac30-453e7653a0c0>\",\"Content-Length\":\"15390\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:90371172-5f6a-4c82-94ed-5860f560e5d8>\",\"WARC-Concurrent-To\":\"<urn:uuid:baaca13a-d20d-48e1-be3c-795b515a1f62>\",\"WARC-IP-Address\":\"149.173.160.38\",\"WARC-Target-URI\":\"http://support.sas.com/documentation/cdl/en/hostwin/63047/HTML/default/p0wpvq33gtw3ofn1957nv86us4rb.htm\",\"WARC-Payload-Digest\":\"sha1:6FQSPG5WE5F7JB2HYZJDJBXO2UOUADUV\",\"WARC-Block-Digest\":\"sha1:RRIHKPENK2CHQMYDO6FK6TPXFP6GXMII\",\"WARC-Identified-Payload-Type\":\"application/xhtml+xml\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-35/CC-MAIN-2019-35_segments_1566027321140.82_warc_CC-MAIN-20190824130424-20190824152424-00119.warc.gz\"}"}