Previous Topic: SWITCHNext Topic: Built-In Functions and Syntax


UNSORT

UNSORT returns a report file to its original retrieval sequence, following one or more SORT commands.

Note: UNSORT does not return any rows removed by UNIQUE processing.

Syntax:

►►─── UNSort ─────────────────────────────────────────────────────────────────►

 ►─┬───────────────────────────────────────────────────────────────┬──────────►◄
   └─ REPort ─┬─────┬─ report-name ─┬────────────────────────────┬─┘
              └─ = ─┘               └─ USEr ─┬─────┬─ user-name ─┘
                                             └─ = ─┘

Parameters:

REPORT= report-name

Identifies the saved report to be unsorted. If report-name is not specified, the current report file is returned to its original sequence.

USER= user-name

Specifies the user ID of the report owner. If user-name is not specified, the report is retrieved from the current user's directory.

Example:

In the example presented below, the report file that was resequenced in several ways in the SORT command examples is now returned to its original sequence:

unsort ! display DEPARTMENT/EMPLOYEE REPORT 09/22/99 EMP-ID-0415 DEPT-NAME-0410 30 EXECUTIVE ADMINISTRATION 471 EXECUTIVE ADMINISTRATION 1 EXECUTIVE ADMINISTRATION 472 EXECUTIVE ADMINISTRATION 69 ACCOUNTING AND PAYROLL 100 ACCOUNTING AND PAYROLL 11 ACCOUNTING AND PAYROLL 67 ACCOUNTING AND PAYROLL 106 ACCOUNTING AND PAYROLL 101 ACCOUNTING AND PAYROLL 81 PERSONNEL 8683 PERSONNEL 51 PERSONNEL 91 PERSONNEL - 1 - Note that the rows removed by UNIQUE processing are not restored.