22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DC Instruction—Decimal Constants<br />

Figure 43. Decimal Constants<br />

Subfield Value Example Result<br />

1. Duplication factor Allowed<br />

2. Type P and Z<br />

3. Type Extension Not allowed<br />

| 4. Program type Allowed<br />

5. Modifiers<br />

Implicit length:<br />

(length modifier<br />

not present)<br />

Alignment:<br />

As needed<br />

Byte<br />

Range for length: 1 to 16<br />

(byte length)<br />

Packed:<br />

P DC P'+593'<br />

Zoned:<br />

Z DC Z'−593'<br />

L'P = 2<br />

L'Z= 3<br />

.1 to .128<br />

(bit length)<br />

Range for scale:<br />

Not allowed<br />

Range for exponent:<br />

Not allowed<br />

6. Nominal value<br />

Represented by:<br />

Decimal<br />

digits<br />

(0 to 9)<br />

Packed:<br />

DC P'5.5' ▌1▐<br />

DC P'55' ▌1▐<br />

DC P'+555' ▌2▐<br />

DC P'-777'<br />

Object code<br />

X'055C'<br />

X'055C'<br />

X'555C' ▌3▐<br />

X'777D' ▌3▐<br />

Zoned:<br />

DC Z'−555' ▌4▐<br />

Object code<br />

X'F5F5D5' ▌5▐<br />

Enclosed by:<br />

Single quotation<br />

marks<br />

Exponent allowed:<br />

No<br />

Number of values<br />

per operand:<br />

Multiple<br />

Padding:<br />

Packed:<br />

with binary<br />

zeros at left<br />

Zoned:<br />

with EBCDIC<br />

zeros (X'F0')<br />

at left<br />

Truncation of<br />

assembled value:<br />

At left<br />

In the following example, the DC statement specifies both packed and zoned<br />

decimal constants. The length modifier applies to each constant in the first<br />

operand (that is, to each packed decimal constant). A literal could not specify both<br />

operands.<br />

152 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!