Easytrieve A010 invalid file reference

6.5k views Asked by At

I am getting the error in this line of my easytrieve prog..

JOB INPUT NULL MASTER-FILE

GET DATAPRM      <~~~~~~~ LINE 59

DO WHILE NO EOF DATAPRM
    ...

    GET DATAPRM
END-DO


..
59******A010 INVALID FILE REFERENCE - DATAPRM

..

I have a DLBL like this ..

//DLBL DATAPRM, 'DATAPRM.SAM'

I am trying to populate the masterfile by data using the input file DATAPRM (card) .. the records were being read(i assume since my counter is moving) but unfortunately, before it terminates the program, the error occurs.. maybe EOF?

1

There are 1 answers

0
Bill Woodger On

You have no STOP in your program. Not just in the code that you have shown, but anywhere. Or if you do, it is conditional and the condition was not met.

Easytrieve Plus does an "automatic cycle". Usually with the file named on the JOB statement, but when NULL is specified, it just cycles from the last statement in the JOB through to the JOB again.

After you get to EOF in your DO, you need to STOP when you have finished everything else. What is happening now is you are getting EOF, getting out of the DO, cycling to the top again (the JOB), and then it does a GET, after EOF, so ******A010 INVALID FILE REFERENCE - DATAPRM