Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8508189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:05:34+00:00 2026-06-11T03:05:34+00:00

I have several datasets that I would like to delete after my SAS procedure

  • 0

I have several datasets that I would like to delete after my SAS procedure has finished. I am using this statement:

proc datasets lib=temp;
    delete xtemp2&sysparm trades&sysparm tickers&sysparm;
quit;
run;

where

&sysparm evaluates to a number and temp to a libname. However, I receive the following errors in the log file:

142             delete xtemp2&sysparm trades&sysparm tickers&sysparm;
            ______
            180
ERROR 180-322: Statement is not valid or it is used out of proper order.

Anyone know the issue?

EDIT:

Here is some more of the log file to address the answer:
NOTE: "OUT_CSV" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
      real time           0.27 seconds
      cpu time            0.12 seconds


142             delete xtemp2&sysparm trades&sysparm tickers&sysparm;
        ______
        180
ERROR 180-322: Statement is not valid or it is used out of proper order.

Here is the code immediately prior to the proc:

proc export data=temp.xtemp2&sysparm outfile=out_csv dbms=csv replace;
run;

proc datasets lib=temp;
    delete xtemp2&sysparm trades&sysparm tickers&sysparm;
quit;
run;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:05:36+00:00Added an answer on June 11, 2026 at 3:05 am

    There’s nothing explicitly wrong with your code, except that last RUN is not needed (QUIT is sufficient for PROC DATASETS). I created datasets with those parameters and the code as provided worked fine. Often that error comes when you have something just before the proc statement that causes the proc statement not to compile. For example:

    *
    proc datasets lib=temp;
        delete xtemp2&sysparm trades&sysparm tickers&sysparm;
    quit;
    

    would cause the error message you provided, along with almost anything else that was not properly ended (although most other errors of that nature would cause a second error message with the preceding statement).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several different numbers in a group that range in sizes and would
I have several xml files that are formated this way: <ROOT> <OBJECT> <identity> <id>123</id>
I have several UITableViews and what I would like to do is to be
I have a table that contains sets of sequential datasets, like that: ID set_ID
I have several controls in a winform application that I added databindings to using
I have several tables in my ERD which which I would like to combine
I have several datasets i.e. matrices that have a 2 columns, one with a
I have a table with several columns that allow NULLs. How would I go
I have several medium-sized data sets in-memory that I need to be able to
I have several HTML elements (buttons) that fire the same JQuery AJAX request. When

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.