SAS Proc Import “Table”: Is “Table” argument a required argument?
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 |
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 |
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
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 |
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 |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 |
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 |
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
22.6k2718
22.6k2718
add a comment |
add a comment |
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 |
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 |
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 |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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