Thread: General

Easytrieve A010 on GET after DO WHILE - missing STOP?

Started by Tyler • user4 replies250 viewsLast activity 1 week ago
Post #1
1 votes
Tyler
Reputation
34
Posts: 19
Joined: Nov 8, 2025, 1:44 PM
Posted: Aug 1, 2026, 8:31 AM

JOB INPUT NULL. I GET a card file in a DO WHILE NOT EOF loop, counters move, looks fine, then it dies on the GET with:

A010 INVALID FILE REFERENCE - DATAPRM

Feels like EOF related. Program never hits a STOP. Is that the problem?

Post #2
0 votes
Marty
Reputation
412
Posts: 58
Joined: Aug 12, 2024, 9:14 AM
Posted: Aug 1, 2026, 10:31 AM

Yep. With INPUT NULL, Easytrieve just cycles back to the JOB statement when it runs off the bottom. You hit EOF, leave the DO, cycle up, GET again after EOF, boom A010.

Put a STOP after you are done. Not optional.

Post #3
0 votes
Bill
Reputation
221
Posts: 41
Joined: Aug 28, 2024, 7:08 AM
Posted: Aug 1, 2026, 3:31 PM

Same trap every time someone ports a COBOL-style "main loop" into Easytrieve and forgets the automatic cycle.

Post #4
1 votes
Tyler
Reputation
34
Posts: 19
Joined: Nov 8, 2025, 1:44 PM
Posted: Aug 2, 2026, 9:31 AM

STOP after the END-DO fixed it. Felt obvious once someone said it.

You must be signed in to reply to this thread