the error says variable X is not given, but the variable x is declared before












0















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:
enter image description here
Can you show me the correct way to do it? Please help










share|improve this question




















  • 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


















0















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:
enter image description here
Can you show me the correct way to do it? Please help










share|improve this question




















  • 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
















0












0








0








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:
enter image description here
Can you show me the correct way to do it? Please help










share|improve this question
















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:
enter image description here
Can you show me the correct way to do it? Please help







sas






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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
















  • 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














1 Answer
1






active

oldest

votes


















2














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;





share|improve this answer

























    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
    });


    }
    });














    draft saved

    draft discarded


















    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









    2














    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;





    share|improve this answer






























      2














      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;





      share|improve this answer




























        2












        2








        2







        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;





        share|improve this answer















        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;






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 30 '18 at 16:52

























        answered Dec 30 '18 at 2:37









        Kiran Kiran

        2,7023919




        2,7023919






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            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





















































            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







            Popular posts from this blog

            Mossoró

            Error while reading .h5 file using the rhdf5 package in R

            Pushsharp Apns notification error: 'InvalidToken'