The following explanation presumes that the program you're looking at is a working, Structured Mode object.
Perhaps this exercise will explain things better.
Print the program and cut it into 4 sections. OK, you don't actually need to use scissors. Just draw a big red line or break it logically, in your mind:
1 below the END-DEFINE
2 between the END-ALL and SORT statements
3 below the SORT statement (including the USING clause)
The four sections are
S1 data
S2 input logic
S3 sort
S4 output logic
When you program is invoked, Natural knows that it contains a SORT statement, and allocates intermediate storage (that is, a block of memory) to hold a block of sort records. This storage is 'intermediate' in that it will be discarded at the end of your program.
S1 will contain a loop, and for each iteration, a sort record is created. (Execute an ESCAPE TOP to avoid this.)
If executed on-line, S2 invokes an in-memory sort. If executed in batch, S2 invokes the sort utility specified by the Natural Administrator, usually DFSORT or SYNCSORT.
S3 reads the sort output, just as a READ WORK would.
Now for the tricky bit.
If you DO NOT code the USING clause, how does Natural know what you need placed in the sort record? He doesn't, so the sort record is defined as the entire contents of S1. If you DO code the USING clause, only its field list is used in the sort record.
Not only does the USING clause improve performance, as I explained earlier in this thread, but it avoids logic error, too. For example, what if your S2 contained
READ view BY ACCOUNT
ADD 1 TO #I
Let's say the first ACCOUNT, #11, is associated with surname ZBROG and the 100th ACCOUNT, #9, is associated with RALPH. The variable #I is used as a record count. Without the USING clause, the #I field is returned as part of the sort record. So, SORT BY SURNAME would return
Surname ACCOUNT #I
======= ======= ===
RALPH 9 100
...
ZBROG 11 1
You can't use #I within S4, because its value is changed each time you read a sorted record. To avoid this logic error, you could remove the DEFINE DATA and use a RESET statement to create S1, as is typical in Reporting Mode. Then define another variable, say #J within S4. Yuch! In Structured mode, S1 is available to both S2 and S4, but only the USING list is available to S3.
Logically, S2, S3, and S4 are executed as separate modules, just like in a standard IBM batch sort, where input and output logic modules are defined.
As to your most recent question, Diptisaini, about the USING list containing only 3 of 100 fields in the view, it means your S4 logic doesn't need any more of those fields. And the programmer is wise ...