BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
vraj1
Quartz | Level 8

I tried the below program but it does not work

libname SDTM "c:\libr";

proc datasets lib=chk nolist;
format _all_
informat _all_;
run;
quit;

 

Is there anyway where i can remove formats and informats for all datasets?

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

Do something like this

 

data stocks1; set sashelp.stocks; run;
data stocks2; set sashelp.stocks; run;
data stocks3; set sashelp.stocks; run;

/* Before */
proc contents data=stocks1;run;

data _null_;
   set sashelp.vtable(where=(libname='WORK') keep=libname memname) end=lr;
   if _N_=1 then call execute("proc datasets nolist lib=work;");
   call execute(cat("modify ", memname, ";attrib _all_ format= informat=;"));
   if lr then call execute("run;quit;");
run;

/* After */
proc contents data=stocks1;run;

View solution in original post

2 REPLIES 2
PeterClemmensen
Tourmaline | Level 20

Do something like this

 

data stocks1; set sashelp.stocks; run;
data stocks2; set sashelp.stocks; run;
data stocks3; set sashelp.stocks; run;

/* Before */
proc contents data=stocks1;run;

data _null_;
   set sashelp.vtable(where=(libname='WORK') keep=libname memname) end=lr;
   if _N_=1 then call execute("proc datasets nolist lib=work;");
   call execute(cat("modify ", memname, ";attrib _all_ format= informat=;"));
   if lr then call execute("run;quit;");
run;

/* After */
proc contents data=stocks1;run;
mssh2712
Calcite | Level 5

Hello All, 

 

Thank you all for the solutions to this question. I'm in regulatory and when we submit SDTM datasets we found the error in submission number 1734(please google them). After, looking into the datasets, we found formats and informats were not removed from all the .xpt. So after removing, the error 1734 got resolved. I know form the fact that informats instruct SAS to read the data into SAS variables because does not read them directly and then you can view formats as instructions for outputting the data.  My questions is what happens if the formats and informats are present in the SAS dataset, does it occupies more space? Is there any document from the FDA why we need to remove it to ease the submission process?  or Any source document available please reply? Many thanks in advance.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 8131 views
  • 2 likes
  • 3 in conversation