BookmarkSubscribeRSS Feed
Phaneendra
Fluorite | Level 6

I am getting the "attempt to reference a page past end-of-file" error when trying to read in a dataset using data step. Can anyone explain me as to what it is and how to overcome it?

7 REPLIES 7
ballardw
Super User

Post your code.

Basically you have an instruction that is trying to read from a file after encountering the end. There are a number of causes but your code will make it easier to address the specific cause(s).

Phaneendra
Fluorite | Level 6

: Thanks for the quick reply.

it is a simple data step and is in the following format:

data xyz1;

set xyz;

where abc = ABC and XXX in ('a','b','c');

lmn = INPUT(prq,YYMMDD10.);     /*Defining a new variable*/

run;

There are two different data sets for two different years; and in the program there are two data steps of same kind(as above), reading information from the two different sets. The program is working fine till the initial year dataset but is giving the above error when reading dataset of later year.

art297
Opal | Level 21

Have you simply run out of disk space?

Phaneendra
Fluorite | Level 6

: No, there is no dearth of disk space.

UrvishShah
Fluorite | Level 6

Can anyone please guide me what to do for the following error:

 

ERROR: Attempt to reference a page past end-of-file 

 

I am facing this error whenever I am referencing the dataset...Because of this all my analysis gets affected...Please help me to resolve as early as possible...

 

Thanks in advance...

SergeR
Calcite | Level 5

I had the same situation and it was linked with the fact that data file modified time was different than index modified time...

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 15218 views
  • 0 likes
  • 5 in conversation