Multiple choice technology programming languages

Which of the following Utilities is the syntax of the SORT command?

  1. SORT FIELDS = (start-location, end-location, sort sequence, format)

  2. SORT FIELDS = (start-location, length, format, sort sequence)

  3. SORT FIELDS = (start-location, end-location, sort sequence, length)

  4. SORT FIELDS = (start-location, end-location, length, format)

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

The SORT FIELDS syntax requires: starting position (column), length of field, format (CH, BI, FI, etc.), and sort sequence (A for ascending, D for descending). Option B correctly lists all four parameters in the right order. Options A and C incorrectly include 'end-location' instead of 'length', while option D has the wrong order.

AI explanation

To answer this question, we need to understand the syntax of the SORT command. Let's go through each option to determine which one is correct:

Option A) SORT FIELDS = (start-location, end-location, sort sequence, format) - This option is incorrect because the correct syntax for the SORT command does not include a "format" parameter.

Option B) SORT FIELDS = (start-location, length, format, sort sequence) - This option is the correct syntax for the SORT command. The parameters are listed in the correct order: start-location, length, format, and sort sequence.

Option C) SORT FIELDS = (start-location, end-location, sort sequence, length) - This option is incorrect because the "end-location" parameter is not part of the correct syntax for the SORT command.

Option D) SORT FIELDS = (start-location, end-location, length, format) - This option is incorrect because the "end-location" parameter is not part of the correct syntax for the SORT command.

The correct answer is Option B. This option is correct because it follows the correct syntax for the SORT command, including the parameters in the correct order: start-location, length, format, and sort sequence.