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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 6787 views
  • 2 likes
  • 3 in conversation