32,000
32,000 is the maximum number of lines a single program may contain.
And the maximum combined sort key length is 32,000 bytes.
32,000 bytes is also the maximum record length (this also depends on the size of your program, space required for data storage, version of Business Rules and available memory).
See also System Limits