18.08.2013 Views

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

SORT (SO)<br />

Syntax<br />

$ TEMPORARY files, which do not exist before the Report begins, and are deleted after<br />

the Report ends.<br />

These files do not exist before the Report begins, and are deleted after the Report<br />

ends. To specify a TEMPORARY file, use one of the following logic command<br />

constructs (and do not include a SET.TITLE; command):<br />

v EXTRACT; (without the RETAIN.AS; command option)<br />

v DETERMINE; ACTUAL (without the RETAINED.AS; command option)<br />

For more details, see ‘‘Categories of Extract file’’ under ‘‘EXTRACT (EX)’’ command, earlier<br />

in this section.<br />

The way a SORT; command handles an Extract file at runtime is influenced by:<br />

$ Category of Extract file (TEMPORARY, PERMANENT, or EXISTING)<br />

$ Whether it is the first or a subsequent access of the Extract file<br />

A first access is defined as the first execution of any DETERMINE; ACTUAL, SORT ,<br />

EXTRACT, or MATCH; commands for a specific Extract file, either in the logic of the<br />

Report, or following a SET.TITLE; or RESTART; command.<br />

The SORT; command attempts to sort the specified Extract file.<br />

$ If this is not the first access of the file, the file is sorted.<br />

$ If this is the first access of the file:<br />

v If it is not an EXISTING file, the file will be created as an empty file if it does not<br />

already exist, or it will be cleared if it does exist.<br />

v If it is an EXISTING file, the file will be sorted if it already exists. If it does not<br />

exist, the Report will abort (on UNIX and OS 2200 based <strong>LINC</strong> Systems) or<br />

become a waiting entry (on MCP based <strong>LINC</strong> Systems).<br />

v The following table shows the actions performed on the Extract file if the SORT;<br />

command is the first access to it.<br />

File Status Temporary Extract<br />

File<br />

Permanent Extract<br />

File<br />

File exists Cleared Cleared Sorted<br />

File does not exist Created Created Wait<br />

ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?<br />

3 3<br />

DD DD DABDD DBD DADD4<br />

3 3<br />

@D DY<br />

Existing Extract File<br />

1-238 v

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

Saved successfully!

Ooh no, something went wrong!