Previous Topic: SORT Statement

Next Topic: TITLE Statement


SORT Statement Layout

Statement Position

Field Length

Field Name

Notes

1

1

Set Code

Required

2

8

Statement Type

SORT

10-17

18-25

26-33

34-41

42-49

8

8

8

8

8

1st Sort Level

2nd Sort Level

3rd Sort Level

4th Sort Level

5th Sort Level

pppllosd must be blank or numeric where
pppllosd:

ppp: Position of sort field from

Basic Accounting Table

ll: Length of sort field (max 8)

o: Order of sort field

A = ascending (default)

D = descending

s: Summary Line Print Option:

see table below

d: Description Header Flag:

= suppress printing

1= print Description Headers for

this level

50
51

1
1

Transaction Flag
Program Flag

= suppress printing
1= print records

52-53

2

Reserved

 

54

1

Required Records Indicator

J: Transaction records only
S: Program records only

55-62

8

History File DDName

= No history file
xxxxxxxx = History file ddname

63

1

History Level Flag

1-5 = Summary level history file
6 = Transaction level hist file
7 = Transaction/Program hist file

64

1

Print DDName Suffix

If nonblank, append to ddname of 'PRINT' and use that ddname for the report output

65-80

16

Reserved

Not used

Summary Line Print Option Table
N or - No summary print for this level
1, 2, or 3 - Single, double, or triple space before printing summary
E* - Eject to new page after printing summary
P* - Eject to new page and reset pg. no. after printing summary

* If either E or P is specified for the first level summary line, then grand totals print on a page by themselves.