Super Natural returns selected records in random sequence. To have them returned in SID, Name, ZIPCODE, or other order, use the S/C column to SORT the records. Usually, the sort field is also a display field.
SNCLASS - Worksheet - SN3011
Ref DB Field Name Seq S/C Func Def Info Del
AA 1S RTKEY-TERM-SID ................. ___ ___ __ __ __ __
AB 1S* CLASS-ROSTER ................... ___ ___ __ __ __ __
AC 1S TERM-COLLEGE ................... ___ ___ __ __ __ __
AD 1S TERM-DEGREE .................... ___ ___ __ __ __ __
AE 1S TERM-MAJOR ..................... ___ ___ __ __ __ __
AF 1S TERM-ACAD-ACT .................. ___ ___ __ __ __ __
AH 1 2 RT005-TERM-CODE ................ 2__ ___ __ __ __ __
AI 1 2 RT010-SID ...................... 1__ ___ __ __ __ __
AQ 1 2 RT105-PRI-COLLEGE .............. ___ ___ __ __ __ __
AR 1 2 RT115-PRI-DEGREE ............... 4__ S1_ __ __ __ __
AS 1 2 RT120-PRI-MAJOR1 ............... 3__ ___ __ __ __ __
DE ________________________________ ___ ___ __ __ __ __
DF ________________________________ ___ ___ __ __ __ __
DG ________________________________ ___ ___ __ __ __ __
Fill in required definitions
Command ===>
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Help Next Exit Field Incl Flip - + Sel Run Canc
In the above example, the S1 in the S/C column at field RT115-PRI-DEGREE (Ref: AR) will cause the records selected to be sorted by degree code. The S in the S/C column indicates Sort. The 1 indicates a first level sort. To sort by student ID within degree, type S2 in the S/C column at the RT010-SID fields (Ref: AI), shown below.
SNCL3 - Worksheet - SN3011
Ref DB Field Name Seq S/C Func Def Info Del
AA 1S RTKEY-TERM-SID ................. ___ ___ __ __ __ __
AB 1S* CLASS-ROSTER ................... ___ ___ __ __ __ __
AC 1S TERM-COLLEGE ................... ___ ___ __ __ __ __
AD 1S TERM-DEGREE .................... ___ ___ __ __ __ __
AE 1S TERM-MAJOR ..................... ___ ___ __ __ __ __
AF 1S TERM-ACAD-ACT .................. ___ ___ __ __ __ __
AH 1 2 RT005-TERM-CODE ................ 2__ ___ __ __ __ __
AI 1 2 RT010-SID ...................... 1__ S2_ __ __ __ __
AQ 1 2 RT105-PRI-COLLEGE .............. ___ ___ __ __ __ __
AR 1 2 RT115-PRI-DEGREE ............... 4__ S1_ __ __ __ __
AS 1 2 RT120-PRI-MAJOR1 ............... 3__ ___ __ __ __ __
DE ________________________________ ___ ___ __ __ __ __
DF ________________________________ ___ ___ __ __ __ __
DG ________________________________ ___ ___ __ __ __ __
Fill in required definitions
Command ===>
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Help Next Exit Field Incl Flip - + Sel Run Canc
The results of the first example, first level sort only S1 at
RT115-PRI-DEGREE is:
RT010-SID RT005-TERM-CODE RT120-PRI-MAJOR1 RT115-PRI-DEGREE
----------- --------------- ---------------- ----------------
001-43-1005 96F MATH BAAS
222-45-9089 96F ASU BACH
001-43-1021 96F MATH BSAS
433-04-6624 96F MATH BSAS
001-43-1006 96F MATH BSAS
052-34-7597 96F MATH BSAS
110-00-0001 96F ARH PHD
The results of the second example, first level sort on degree and second level sort on SID is:
RT010-SID RT005-TERM-CODE RT120-PRI-MAJOR1 RT115-PRI-DEGREE
----------- --------------- ---------------- ----------------
999-00-9903 96F ENG BAAS
222-45-9089 96F ASU BACH
001-43-1006 96F MATH BSAS
001-43-1021 96F MATH BSAS
052-34-7597 96F MATH BSAS
433-04-6624 96F MATH BSAS
110-00-0001 96F ARH PHD
By default, the records are sorted in ascending order. To sort in descending order, insert a "D" in the S/C column, after the S. An "A" may also be used to indicate ascending order, but is not necessary since ascending is the default. This example shows how to sort the degree field in descending order, but the SID field ascending:
SNCLASS - Worksheet - SN3011
Ref DB Field Name Seq S/C Func Def Info Del
AA 1S RTKEY-TERM-SID ................. ___ ___ __ __ __ __
AB 1S* CLASS-ROSTER ................... ___ ___ __ __ __ __
AC 1S TERM-COLLEGE ................... ___ ___ __ __ __ __
AD 1S TERM-DEGREE .................... ___ ___ __ __ __ __
AE 1S TERM-MAJOR ..................... ___ ___ __ __ __ __
AF 1S TERM-ACAD-ACT .................. ___ ___ __ __ __ __
AH 1 2 RT005-TERM-CODE ................ 2__ ___ __ __ __ __
AI 1 2 RT010-SID ...................... 1__ SA2 __ __ __ __
AQ 1 2 RT105-PRI-COLLEGE .............. ___ ___ __ __ __ __
AR 1 2 RT115-PRI-DEGREE ............... 4__ SD1 __ __ __ __
AS 1 2 RT120-PRI-MAJOR1 ............... 3__ ___ __ __ __ __
DE ________________________________ ___ ___ __ __ __ __
DF ________________________________ ___ ___ __ __ __ __
DG ________________________________ ___ ___ __ __ __ __
Fill in required definitions
Command ===>
Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---
Help Next Exit Field Incl Flip - + Sel Run Canc
This yeilds the following results:
RT010-SID RT005-TERM-CODE RT120-PRI-MAJOR1 RT115-PRI-DEGREE
----------- --------------- ---------------- ----------------
110-00-0001 96F ARH PHD
001-43-1006 96F MATH BSAS
001-43-1021 96F MATH BSAS
052-34-7597 96F MATH BSAS
433-04-6624 96F MATH BSAS
222-45-9089 96F ASU BACH
001-43-1004 96F MATH BAAS
When testing your Super Natural transactions specify the sort fields toward the end of your testing. To sort the records Super Natural must read all the records that satisfy the selection criteria (Select and Logic). When testing, you want to quickly review your results to be sure you are getting the data desired. Running without a sort specification, Super Natural will display the first 20 records it finds that meet the selection criteria. After reviewing the first 20 records you can press PF3 to continue modifying your transaction.
Back to: Super Natural Home Page