Recently in the SAS Community Library: SAS' @StuartRogers provides a close look at the new Microsoft Entra Gallery application and details how it can be used.
Hello everyone, I am trying to select alternate columns from my dataset, starting from column number 1 and including every nth alternate column after that. For example, I want to select columns 1, 3, 5, 7, and so on up to column n. Is there a way to make this selection without having to manually specify the column names? Here are my column headers: FINAL_STATUS_01MAY24, FINAL_STATUS_02MAY24, and so on...
I would appreciate any help or advice. Thank you!
... View more
Hi,
I have a character birthdate variable and I am trying to convert it to numeric but getting errors in my input function. Thanks
Here is my code:
data want; set have; birthday_num= input(strip(birthdate), anydtdte.); format birthday_num mmddyy10.; run;
... View more
I would like to delete the folder folderToDelete, which contains subfolders and those folders might contain subfolders, and so on. I do not have permission to do the x command. I have the following code (after looking at the following post Delete folder (directory) and all files in it😞 %macro delete_folder(folderToDelete);
data work.FilesToDelete;
length Name $ 100;
keep Name;
rc = filename("folder", "&folderToDelete.");
dirId = dopen("folder");
do i = 1 to dnum(dirID);
Name = dread(dirId, i);
output;
end;
rc = dclose(dirId);
run;
data _null_;
set work.FilesToDelete end=lastDeleted;
put "Deleting " Name;
rc = filename("delfile", cats("&folderToDelete./", Name));
rc = fdelete("delfile");
put "del file " rc=;
rc = filename("delfile");
if lastDeleted then do;
put "Deleting the folder '&folderToDelete.'";
rc = filename("folder", "&folderToDelete.");
rc = fdelete("folder");
put "del folder " rc=;
rc = filename("folder");
end;
run;
%mend; However, since my folder contains subfolders, only the tables are delete and not the subfolders, resulting in the main folder not being deleted. In that sense, what I would like was to apply a function recursively to delete every file inside any subfolder (or any other suggestion you might have). As an example, if my folder has the following structure: > folder > subfolder_1 > T_1_1.sas7bdat > T_1_2.sas7bdat > T_1_3.sas7bdat > subsubfolder_1 > T_1_1_1.sas7bdat > subfolder_2 > T_2_1.sas7bdat > T_1.sas7bdat > T_2.sas7bdat > T_3.sas7bdat > T_4.sas7bdat after running the first data step, which reads the folder, I get Name subfolder_1 subfolder_2 T_1.sas7bdat T_2.sas7bdat T_3.sas7bdat T_4.sas7bdat and then in the second data step, only the tables are deleted. However, I would like to delete the entirety of the folder. Can someone help?
... View more
I'm currently working on testing the overall Proportional Hazards Assumption for my 5 multiple imputation datasets.
My challenge lies in determining the overall p-value of the Supremum Test for Proportional Hazards Assumption. While the test only provides the Maximum Absolute Value and Pr > MaxAbsVal, I'm uncertain about how to derive the overall p-value from proc mianalyze.
Could you kindly provide some guidance or insights on how to approach this issue? Any assistance or pointers you could offer would be greatly appreciated.
Thank you very much for your time and assistance.
... View more
Hello,
I am struggling with controlling page breaks in proc report/ods PDF. I already did a post a few months ago (https://communities.sas.com/t5/ODS-and-Base-Reporting/How-to-suppress-table-splitting-in-ODS-PDF/m-p/907292#M26446), but I have not found a solution yet. First, I thought I will just use ods rtf with the keepn option, but that brings more problems than it solves. Now, I have just found a paper that kind of describes the problem from Stetz et al. "Controlling Page Breaks when using Proc Report" (https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://support.sas.com/resources/papers/proceedings-archive/SUGI95/Sugi-95-70%2520Stetz.pdf&ved=2ahUKEwjHib_10PuFAxUi_rsIHa0GA9oQFnoECBAQAw&usg=AOvVaw0Z1J0znhm8-SeB_Oxq4tBr). Unfortunately, the paper is quite short and I do not understand how the data in the example code is structured. My question is: Does anyone have further knowledge on using "line counting" to control page breaks with proc report? Or does anyone know other papers that talk about this issue?
@Cynthia_sas did you write the paper? And if so, have you got any tips for the page break control?
If anyone needs code examples I can provide code and data, but for now I thought it would be more useful if I try different approaches before just posting my code where I did not achieve much yet. I am grateful for any help.
Kind regards
... View more