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?

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

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 4 replies
  • 1363 views
  • 0 likes
  • 3 in conversation