Why am I getting the error "ERROR: Procedure SGPLOT not known" in WPS?

Ilana
Ilana New Altair Community Member
edited January 2023 in Community Q&A

I am trying to run a standard "proc sgplot" from code that works in SAS but its not working in WPS. Am I missing something to get sgplot to work?

Answers

  • Nico Chart_21517
    Nico Chart_21517
    Altair Employee
    edited January 2023

    Hi Ilana,

    Sorry for the late reply.

    You should be able to use PROC SGPLOT so this problem may need further analysis.

    We would be happy to review your code or log output and see if we can see why it's not working for you.

    You can email dasupport@altair.com or post here.

    Best Regards,

    Nico

  • Thomas Betancourt
    Thomas Betancourt
    Altair Employee
    edited January 2023

    Hi Illana,

    Using the SASHELP.CARS dataset, which is not shipped with WPS, you should be able to run PROC SGPLOT using the sample below.  Also notice how WPS has a SAS7DBAT engine on the LIBNAME Statement.   

    %let win_path = c:\users\rbetancourt\desktop\ODS_Examples\data_output;

    %let xl_file = graph_and_table.xlsx;

    %let libref = c:\users\rbetancourt\desktop\ODS_examples\data_input;

    libname cars sas7bdat "&libref";

    ods excel file = "&win_path\&xl_file"

        options(sheet_interval = "proc"

                sheet_name = "cars_means");

    /* tabular output */

    <strong>proc</strong> <strong>means</strong> data = cars.cars;

    var mpg_City mpg_Highway;

    <strong>run</strong>;

    /* add a graph */

    ods graphics on / height = 4in width = 6in noborder;

    ods excel options(sheet_interval = "proc"

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sheet_name = "cars_sgplot");

    title "Histogram for MPG";

    <strong>proc</strong> <strong>sgplot</strong> data = cars.cars;

    &nbsp;&nbsp; histogram mpg_City;

    <strong>run</strong>;

    ods excel close;

     It will produce the following Excel worksheet:
    image
     
    Best regards,
    Randy