Multiple choice technology mainframe

ASCENDING/DESCENDING KEY data item cannot be floating point items.

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

ASCENDING and DESCENDING KEY clauses in COBOL specify sort keys, and these cannot be floating-point data items. Floating-point numbers have imprecise comparison behavior due to representation issues, which makes them unreliable for sorting operations where exact ordering is required. COBOL prohibits using COMP-1 or COMP-2 items as sort keys for this reason.