the error says variable X is not given, but the variable x is declared before
I get an error when trying to plot this in SAS, the error says variable X is not given, but the variable x is declared before.
Here is my code:
data prg7_5;
do a=1 to 3;
input x@@;
output
end;
cards;
7028 1764 600 7228 2036 744
7228 2130 804 8448 2536 844
8567 2436 912 9061 2436 1128
9167 3108 1320 9167 3108 1464
10032 3108 1608 10051 3208 1896
;
run;
goptions hsize=5 vsize=4 ftext='宋体';
footnote 'the time ';
symbol1 interpol=boxt00 width=1.8 bwidth=5 co=red;
axis1 label =('temperature(C)')
value=('190' ' 220 ' '260')
minor=none
offset=(10,10);
axis2 label =(angle=90'the time')
offset=(0,0);
proc gplot data= prg7_5;
plot x*a/haxis=axis1
vaxis=axis2;
run;
here is the run log:

Can you show me the correct way to do it? Please help
sas
add a comment |
I get an error when trying to plot this in SAS, the error says variable X is not given, but the variable x is declared before.
Here is my code:
data prg7_5;
do a=1 to 3;
input x@@;
output
end;
cards;
7028 1764 600 7228 2036 744
7228 2130 804 8448 2536 844
8567 2436 912 9061 2436 1128
9167 3108 1320 9167 3108 1464
10032 3108 1608 10051 3208 1896
;
run;
goptions hsize=5 vsize=4 ftext='宋体';
footnote 'the time ';
symbol1 interpol=boxt00 width=1.8 bwidth=5 co=red;
axis1 label =('temperature(C)')
value=('190' ' 220 ' '260')
minor=none
offset=(10,10);
axis2 label =(angle=90'the time')
offset=(0,0);
proc gplot data= prg7_5;
plot x*a/haxis=axis1
vaxis=axis2;
run;
here is the run log:

Can you show me the correct way to do it? Please help
sas
1
When debugging fix the first error because later errors could be side effects of the earlier failure, as in this case.
– Tom
Dec 30 '18 at 18:44
add a comment |
I get an error when trying to plot this in SAS, the error says variable X is not given, but the variable x is declared before.
Here is my code:
data prg7_5;
do a=1 to 3;
input x@@;
output
end;
cards;
7028 1764 600 7228 2036 744
7228 2130 804 8448 2536 844
8567 2436 912 9061 2436 1128
9167 3108 1320 9167 3108 1464
10032 3108 1608 10051 3208 1896
;
run;
goptions hsize=5 vsize=4 ftext='宋体';
footnote 'the time ';
symbol1 interpol=boxt00 width=1.8 bwidth=5 co=red;
axis1 label =('temperature(C)')
value=('190' ' 220 ' '260')
minor=none
offset=(10,10);
axis2 label =(angle=90'the time')
offset=(0,0);
proc gplot data= prg7_5;
plot x*a/haxis=axis1
vaxis=axis2;
run;
here is the run log:

Can you show me the correct way to do it? Please help
sas
I get an error when trying to plot this in SAS, the error says variable X is not given, but the variable x is declared before.
Here is my code:
data prg7_5;
do a=1 to 3;
input x@@;
output
end;
cards;
7028 1764 600 7228 2036 744
7228 2130 804 8448 2536 844
8567 2436 912 9061 2436 1128
9167 3108 1320 9167 3108 1464
10032 3108 1608 10051 3208 1896
;
run;
goptions hsize=5 vsize=4 ftext='宋体';
footnote 'the time ';
symbol1 interpol=boxt00 width=1.8 bwidth=5 co=red;
axis1 label =('temperature(C)')
value=('190' ' 220 ' '260')
minor=none
offset=(10,10);
axis2 label =(angle=90'the time')
offset=(0,0);
proc gplot data= prg7_5;
plot x*a/haxis=axis1
vaxis=axis2;
run;
here is the run log:

Can you show me the correct way to do it? Please help
sas
sas
edited Dec 30 '18 at 0:44
eyllanesc
76.9k103156
76.9k103156
asked Dec 30 '18 at 0:13
nafhgoodnafhgood
1698
1698
1
When debugging fix the first error because later errors could be side effects of the earlier failure, as in this case.
– Tom
Dec 30 '18 at 18:44
add a comment |
1
When debugging fix the first error because later errors could be side effects of the earlier failure, as in this case.
– Tom
Dec 30 '18 at 18:44
1
1
When debugging fix the first error because later errors could be side effects of the earlier failure, as in this case.
– Tom
Dec 30 '18 at 18:44
When debugging fix the first error because later errors could be side effects of the earlier failure, as in this case.
– Tom
Dec 30 '18 at 18:44
add a comment |
1 Answer
1
active
oldest
votes
you need a semicolon after output. Your dataset will be empty and you have following error.
ERROR 117-185: There was 1 unclosed DO block.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.PRG7_5 may be incomplete. When this step was stopped
there were 0 observations and 2 variables.
WARNING: Data set WORK.PRG7_5 was not replaced because this step was stopped.
change code with semicolon at output as shown below
do a=1 to 3;
input x@@;
output;
end;
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%2f53974328%2fthe-error-says-variable-x-is-not-given-but-the-variable-x-is-declared-before%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
you need a semicolon after output. Your dataset will be empty and you have following error.
ERROR 117-185: There was 1 unclosed DO block.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.PRG7_5 may be incomplete. When this step was stopped
there were 0 observations and 2 variables.
WARNING: Data set WORK.PRG7_5 was not replaced because this step was stopped.
change code with semicolon at output as shown below
do a=1 to 3;
input x@@;
output;
end;
add a comment |
you need a semicolon after output. Your dataset will be empty and you have following error.
ERROR 117-185: There was 1 unclosed DO block.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.PRG7_5 may be incomplete. When this step was stopped
there were 0 observations and 2 variables.
WARNING: Data set WORK.PRG7_5 was not replaced because this step was stopped.
change code with semicolon at output as shown below
do a=1 to 3;
input x@@;
output;
end;
add a comment |
you need a semicolon after output. Your dataset will be empty and you have following error.
ERROR 117-185: There was 1 unclosed DO block.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.PRG7_5 may be incomplete. When this step was stopped
there were 0 observations and 2 variables.
WARNING: Data set WORK.PRG7_5 was not replaced because this step was stopped.
change code with semicolon at output as shown below
do a=1 to 3;
input x@@;
output;
end;
you need a semicolon after output. Your dataset will be empty and you have following error.
ERROR 117-185: There was 1 unclosed DO block.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.PRG7_5 may be incomplete. When this step was stopped
there were 0 observations and 2 variables.
WARNING: Data set WORK.PRG7_5 was not replaced because this step was stopped.
change code with semicolon at output as shown below
do a=1 to 3;
input x@@;
output;
end;
edited Dec 30 '18 at 16:52
answered Dec 30 '18 at 2:37
Kiran Kiran
2,7023919
2,7023919
add a comment |
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.
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%2f53974328%2fthe-error-says-variable-x-is-not-given-but-the-variable-x-is-declared-before%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
1
When debugging fix the first error because later errors could be side effects of the earlier failure, as in this case.
– Tom
Dec 30 '18 at 18:44