Thread: General

SORT BEFORE proc - forgot SELECT and got empty output

Started by Alex • user3 replies190 viewsLast activity 1 week ago
Post #1
0 votes
Alex
Reputation
8
Posts: 35
Joined: Jun 15, 2026, 9:20 AM
Posted: Aug 4, 2026, 8:42 AM

SORT INFILE TO SORTFILE USING (DEPT) BEFORE FILTER-REC

FILTER-REC just has IF GROSS-PAY GE 500 ... END-IF. No SELECT. Output file empty.

Do I have to SELECT every record I want to keep?

Post #2
1 votes
Jen
Reputation
287
Posts: 34
Joined: Sep 3, 2024, 11:02 AM
Posted: Aug 4, 2026, 9:42 AM

Yes. Once you code BEFORE, Easytrieve stops auto-passing records. SELECT is required for each keeper.

IF GROSS-PAY GE 500
SELECT
END-IF

Post #3
0 votes
Alex
Reputation
8
Posts: 35
Joined: Jun 15, 2026, 9:20 AM
Posted: Aug 4, 2026, 12:42 PM

Added SELECT. File has rows again. Manual made more sense on the second read.

You must be signed in to reply to this thread