BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
GeorgeSAS
Lapis Lazuli | Level 10

Hello everyone,

 

I am going to download a whole library of formats but want to exclude one from those format. what should I do?

 

the name of the format i want to exclude from download is $badformat.

 

proc download incat=Lib1.formats outcat=Lib2.formats
    connectstatus=no;

  /*ToDo:  add some code here to exclude $badformat. */



run;

Thank you very much!

 

1 ACCEPTED SOLUTION

Accepted Solutions
stackoverflow
Calcite | Level 5

 

proc download incat=Lib1.formats outcat=Lib2.formats
    connectstatus=no;

  /*ToDo:  add some code here to exclude $badformat. */

exclude badformat/ENTRYTYPE=etype;

run;

 

proc download incat=Lib1.formats outcat=Lib2.formats
    connectstatus=no;

  /*ToDo:  add some code here to exclude $badformat. */

exclude format_A format_B format_C/ENTRYTYPE=format;
exclude formatc_A formatc_B formatc_C/ENTRYTYPE=formatc;

run;

try this.

 

 

I add some changes, can exclude both format or formatc type ,need to write separately. see the new lines of codes

View solution in original post

4 REPLIES 4
Astounding
PROC Star

The EXCLUDE statement allows you to list those members you do not want to download:

 

http://documentation.sas.com/?docsetId=connref&docsetTarget=n0o0vsabkqk59jn1wseldad5q4ax.htm&docsetV...

 

 

GeorgeSAS
Lapis Lazuli | Level 10
proc download incat=Lib1.formats outcat=Lib2.formats
    connectstatus=no;

  /*ToDo:  add some code here to exclude $badformat. */

exclude badformat;

run;

ERROR: Missing ENTRYTYPE specification for entry badformat.

stackoverflow
Calcite | Level 5

 

proc download incat=Lib1.formats outcat=Lib2.formats
    connectstatus=no;

  /*ToDo:  add some code here to exclude $badformat. */

exclude badformat/ENTRYTYPE=etype;

run;

 

proc download incat=Lib1.formats outcat=Lib2.formats
    connectstatus=no;

  /*ToDo:  add some code here to exclude $badformat. */

exclude format_A format_B format_C/ENTRYTYPE=format;
exclude formatc_A formatc_B formatc_C/ENTRYTYPE=formatc;

run;

try this.

 

 

I add some changes, can exclude both format or formatc type ,need to write separately. see the new lines of codes

Astounding
PROC Star

The way I read the documentation, SAS is asking for this:

 

exclude badformat / entrytype=format;

 

If that format can't be found, it's possible you would have to use:

 

exclude $badformat / entrytype=format;

 

I can't test it, but that looks like what I'm reading.

 

***** Looks like @stackoverflow got there first ... and is correct that you need the slash before entrytype=

I changed my examples to add the slash.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 879 views
  • 6 likes
  • 3 in conversation