BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
alepage
Barite | Level 11

Hello,

 

I am using the code bellow to copy a template (zero observation data set) from Work to a server.  This operation works well but when I click on my template located on the server, I have this error message:

 

The opening of the data has failed.
The following error occurred.
BOF or EOF is equal to true.
The current record has been deleted.
The requested operation requires a current record.

 

Data test;

stop;

set sashelp.class;

run;

 

Libname Template '\\...\Documents\My SAS Files\Template';

proc sql;

create table Template.Test_Templ like work.Test;

quit;

 

Any idea how to correct this problem?

regards,

 

1 ACCEPTED SOLUTION

Accepted Solutions
alepage
Barite | Level 11

Hello,

 

I have reported this issue to SAS.

Thanks for your help.

Regards,

 

View solution in original post

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Sorry, bit confused, your creating an empty dataset in SAS, then your create a copy of this somewhere else?  I am not sure why.  You could take a describe of dataset, then run that code on the destination, however if the destination is a database, then surely a better idea to use the table building tools on the database?

The error you get seems to tell you then answer:

"The requested operation requires a current record."

Therefore have one row, and then delete that row:

proc sql;
  create table template.test_templ like sashelp.class;
  delete * from template.test_templ;
quit;

You can execute as many queries as you like.

alepage
Barite | Level 11

hello,

 

 

 

I have try your code and I still have the same error.

Regards,

alepage
Barite | Level 11

Hello,

 

I have reported this issue to SAS.

Thanks for your help.

Regards,

 

ballardw
Super User

@alepage wrote:

Hello,

 

I am using the code bellow to copy a template (zero observation data set) from Work to a server.  This operation works well but when I click on my template located on the server, I have this error message:

 

The opening of the data has failed.
The following error occurred.
BOF or EOF is equal to true.
The current record has been deleted.
The requested operation requires a current record.

 

Data test;

stop;

set sashelp.class;

run;

 

Libname Template '\\...\Documents\My SAS Files\Template';

proc sql;

create table Template.Test_Templ like work.Test;

quit;

 

Any idea how to correct this problem?

regards,

 


It sounds like there is a missing piece somewhere. Nnte of the code shown looks like it creates a data set "on a server".

Do you click on the data set inside a SAS session running on the server? From another program like a data base file list? A simple file manager?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 955 views
  • 0 likes
  • 3 in conversation