Multiple choice technology mainframe

Where do we need to declare the sorting key ACCOUNT-NO for the following syntax SORT WORK-FILE ON ASCENDING KEY ACCOUNT-NO USING FILE-NAME-1 GIVING FILE-NAME-2

  1. WORK-FILE

  2. FILE-NAME-1

  3. FILE-NAME-2

  4. No need to declare

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

The correct answer is A (WORK-FILE). In the SORT syntax, the sorting key (ACCOUNT-NO) must be declared in the WORK-FILE, which is the temporary work file used during the sort operation. The WORK-FILE is defined in the SD (Sort Description) entry and contains the record description with the sort keys. FILE-NAME-1 and FILE-NAME-2 are the input and output files, but the key declaration belongs in the work file specification.