SAS Proc Import “Table”: Is “Table” argument a required argument?
up vote
0
down vote
favorite
I have to put together a slide deck on PROC IMPORT for a school project. SAS documentation (http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n18jyszn33umngn14czw2qfw7thc.htm) says that there are three required arguments:
- Datafile=
- Out=
- Table=
It goes on to say that DBMS is optional.
For my slide deck, I'm trying to use an example that involves a TABLE= argument. However, I keep getting an error about not being able to have a FILE= and TABLE= statements together. In fact, in going back to other code to import data to do homework, I've noticed that none of the code uses a TABLE= argument. Instead, there's always a DBMS= statement. For example:
proc import
datafile = "C:Usersccedie1Downloadssurvey1.csv"
out = Survey
DBMS=csv;
run;
proc print data=Survey;
run;
It's my understanding that there are many versions of SAS and that a separate license is required for something called SAS/ACCESS Interface. I suspect that the school's computers have this additional license/functionality because it's not requiring a TABLE= statement. In fact, I can get this code to work even without the DBMS statement.
Please let me know what concept(s) I'm missing here. I obviously want my deck to be accurate. If I can't create an example that uses the TABLE= statement, I need to be able to explain why I can't do it. For example, I would like to say something like, "While the SAS documentation lists TABLE= as a required argument, it's not required when using SAS 9.4 on campus because _____________."
I realize I may not have done the best job explaining the problem/issue so my apologies for that.
Thanks in advance for any help.
import sas
add a comment |
up vote
0
down vote
favorite
I have to put together a slide deck on PROC IMPORT for a school project. SAS documentation (http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n18jyszn33umngn14czw2qfw7thc.htm) says that there are three required arguments:
- Datafile=
- Out=
- Table=
It goes on to say that DBMS is optional.
For my slide deck, I'm trying to use an example that involves a TABLE= argument. However, I keep getting an error about not being able to have a FILE= and TABLE= statements together. In fact, in going back to other code to import data to do homework, I've noticed that none of the code uses a TABLE= argument. Instead, there's always a DBMS= statement. For example:
proc import
datafile = "C:Usersccedie1Downloadssurvey1.csv"
out = Survey
DBMS=csv;
run;
proc print data=Survey;
run;
It's my understanding that there are many versions of SAS and that a separate license is required for something called SAS/ACCESS Interface. I suspect that the school's computers have this additional license/functionality because it's not requiring a TABLE= statement. In fact, I can get this code to work even without the DBMS statement.
Please let me know what concept(s) I'm missing here. I obviously want my deck to be accurate. If I can't create an example that uses the TABLE= statement, I need to be able to explain why I can't do it. For example, I would like to say something like, "While the SAS documentation lists TABLE= as a required argument, it's not required when using SAS 9.4 on campus because _____________."
I realize I may not have done the best job explaining the problem/issue so my apologies for that.
Thanks in advance for any help.
import sas
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have to put together a slide deck on PROC IMPORT for a school project. SAS documentation (http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n18jyszn33umngn14czw2qfw7thc.htm) says that there are three required arguments:
- Datafile=
- Out=
- Table=
It goes on to say that DBMS is optional.
For my slide deck, I'm trying to use an example that involves a TABLE= argument. However, I keep getting an error about not being able to have a FILE= and TABLE= statements together. In fact, in going back to other code to import data to do homework, I've noticed that none of the code uses a TABLE= argument. Instead, there's always a DBMS= statement. For example:
proc import
datafile = "C:Usersccedie1Downloadssurvey1.csv"
out = Survey
DBMS=csv;
run;
proc print data=Survey;
run;
It's my understanding that there are many versions of SAS and that a separate license is required for something called SAS/ACCESS Interface. I suspect that the school's computers have this additional license/functionality because it's not requiring a TABLE= statement. In fact, I can get this code to work even without the DBMS statement.
Please let me know what concept(s) I'm missing here. I obviously want my deck to be accurate. If I can't create an example that uses the TABLE= statement, I need to be able to explain why I can't do it. For example, I would like to say something like, "While the SAS documentation lists TABLE= as a required argument, it's not required when using SAS 9.4 on campus because _____________."
I realize I may not have done the best job explaining the problem/issue so my apologies for that.
Thanks in advance for any help.
import sas
I have to put together a slide deck on PROC IMPORT for a school project. SAS documentation (http://support.sas.com/documentation/cdl/en/proc/65145/HTML/default/viewer.htm#n18jyszn33umngn14czw2qfw7thc.htm) says that there are three required arguments:
- Datafile=
- Out=
- Table=
It goes on to say that DBMS is optional.
For my slide deck, I'm trying to use an example that involves a TABLE= argument. However, I keep getting an error about not being able to have a FILE= and TABLE= statements together. In fact, in going back to other code to import data to do homework, I've noticed that none of the code uses a TABLE= argument. Instead, there's always a DBMS= statement. For example:
proc import
datafile = "C:Usersccedie1Downloadssurvey1.csv"
out = Survey
DBMS=csv;
run;
proc print data=Survey;
run;
It's my understanding that there are many versions of SAS and that a separate license is required for something called SAS/ACCESS Interface. I suspect that the school's computers have this additional license/functionality because it's not requiring a TABLE= statement. In fact, I can get this code to work even without the DBMS statement.
Please let me know what concept(s) I'm missing here. I obviously want my deck to be accurate. If I can't create an example that uses the TABLE= statement, I need to be able to explain why I can't do it. For example, I would like to say something like, "While the SAS documentation lists TABLE= as a required argument, it's not required when using SAS 9.4 on campus because _____________."
I realize I may not have done the best job explaining the problem/issue so my apologies for that.
Thanks in advance for any help.
import sas
import sas
asked Nov 10 at 23:08
immaprogrammingnoob
132
132
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
0
down vote
accepted
The vertical bar in this line of the page you linked
DATAFILE="filename" | TABLE="tablename"
normally means or
. Basically they are using Backus-Naur form.
So that means that one of the options listed is required, but you get to choose which one to use.
So when reading from a format that is stored in a physical file you must use specify datafile=
, but when reading from a remote database you must specify the table=
option.
Note that you linked to the older documentation for SAS version 9.3 instead of the current documentation.
add a comment |
up vote
0
down vote
The documentation is wrong. It should say something to the effect of "Table or Datafile required".
The import wizard in SAS 9.4 generates this code:
PROC IMPORT OUT= WORK.test
DATAFILE= "C:UsersUserDesktopTesting.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
No table statement.
Good luck in your class.
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
The vertical bar in this line of the page you linked
DATAFILE="filename" | TABLE="tablename"
normally means or
. Basically they are using Backus-Naur form.
So that means that one of the options listed is required, but you get to choose which one to use.
So when reading from a format that is stored in a physical file you must use specify datafile=
, but when reading from a remote database you must specify the table=
option.
Note that you linked to the older documentation for SAS version 9.3 instead of the current documentation.
add a comment |
up vote
0
down vote
accepted
The vertical bar in this line of the page you linked
DATAFILE="filename" | TABLE="tablename"
normally means or
. Basically they are using Backus-Naur form.
So that means that one of the options listed is required, but you get to choose which one to use.
So when reading from a format that is stored in a physical file you must use specify datafile=
, but when reading from a remote database you must specify the table=
option.
Note that you linked to the older documentation for SAS version 9.3 instead of the current documentation.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The vertical bar in this line of the page you linked
DATAFILE="filename" | TABLE="tablename"
normally means or
. Basically they are using Backus-Naur form.
So that means that one of the options listed is required, but you get to choose which one to use.
So when reading from a format that is stored in a physical file you must use specify datafile=
, but when reading from a remote database you must specify the table=
option.
Note that you linked to the older documentation for SAS version 9.3 instead of the current documentation.
The vertical bar in this line of the page you linked
DATAFILE="filename" | TABLE="tablename"
normally means or
. Basically they are using Backus-Naur form.
So that means that one of the options listed is required, but you get to choose which one to use.
So when reading from a format that is stored in a physical file you must use specify datafile=
, but when reading from a remote database you must specify the table=
option.
Note that you linked to the older documentation for SAS version 9.3 instead of the current documentation.
edited Nov 11 at 0:10
answered Nov 10 at 23:57
Tom
21.8k2718
21.8k2718
add a comment |
add a comment |
up vote
0
down vote
The documentation is wrong. It should say something to the effect of "Table or Datafile required".
The import wizard in SAS 9.4 generates this code:
PROC IMPORT OUT= WORK.test
DATAFILE= "C:UsersUserDesktopTesting.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
No table statement.
Good luck in your class.
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
add a comment |
up vote
0
down vote
The documentation is wrong. It should say something to the effect of "Table or Datafile required".
The import wizard in SAS 9.4 generates this code:
PROC IMPORT OUT= WORK.test
DATAFILE= "C:UsersUserDesktopTesting.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
No table statement.
Good luck in your class.
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
add a comment |
up vote
0
down vote
up vote
0
down vote
The documentation is wrong. It should say something to the effect of "Table or Datafile required".
The import wizard in SAS 9.4 generates this code:
PROC IMPORT OUT= WORK.test
DATAFILE= "C:UsersUserDesktopTesting.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
No table statement.
Good luck in your class.
The documentation is wrong. It should say something to the effect of "Table or Datafile required".
The import wizard in SAS 9.4 generates this code:
PROC IMPORT OUT= WORK.test
DATAFILE= "C:UsersUserDesktopTesting.csv"
DBMS=CSV REPLACE;
GETNAMES=YES;
DATAROW=2;
RUN;
No table statement.
Good luck in your class.
answered Nov 10 at 23:43
HekTron802
334
334
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
add a comment |
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Thanks for your answer. Out of curiosity, if you know, is there a particular reason the SAS documentation is wrong? It seems like it was probably at least correct at some point in time (like an earlier version).
– immaprogrammingnoob
Nov 10 at 23:50
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
Not wrong, just confusing.
– Tom
Nov 10 at 23:59
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53244309%2fsas-proc-import-table-is-table-argument-a-required-argument%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown