Thread: General

Same Easytrieve works on test, A010 on prod at last record

Started by Nina • user4 replies215 viewsLast activity 3 weeks ago
Post #1
0 votes
Nina
Reputation
67
Posts: 6
Joined: Dec 3, 2025, 4:18 PM
Posted: Jul 23, 2026, 12:08 PM

JOB INPUT NULL, pair-wise GET logic on a parameter file. Test data ends with a lone JOBNAME line and runs fine. Prod data ends with a JOBNAME + parm pair and we A010 on ENTRADA while writing the last good row.

People keep saying "add IF EOF". Feels like I should restructure instead?

Post #2
1 votes
Marty
Reputation
412
Posts: 58
Joined: Aug 12, 2024, 9:14 AM
Posted: Jul 23, 2026, 2:08 PM

Do not slap IF EOF on and call it fixed. When the second GET of a pair is the last record, your code still does another GET, hits EOF, then touches the record area. That is the A010.

Restructure so you never reference the file buffer after a GET that set EOF. PERFORM a read routine, check EOF before using the fields.

Post #3
0 votes
Rick
Reputation
302
Posts: 22
Joined: Jun 14, 2024, 9:41 AM
Posted: Jul 23, 2026, 8:08 PM

Also Easytrieve MOVE is not COBOL MOVE. Prefer assignments. And DEFINE is only required outside the library section.

Post #4
0 votes
Nina
Reputation
67
Posts: 6
Joined: Dec 3, 2025, 4:18 PM
Posted: Jul 25, 2026, 3:08 PM

Rewrote with a read PROC. Both datasets behave the same now.

You must be signed in to reply to this thread