Hello,
In a SAS Project i have 80 tables which i have made from both PROC TABULATE and summary reports, so the manager gave me some corrections on formatting the table, i know how to fix them but the problem is that i don't want to get in the codes of all 80 tables and change the same codes.
So my question is, is there an easy way to make the same corrections on these 80 tables at one time. One example is shown below, thanks for your help :).
Initial state:
PROC TABULATE
DATA=WORK.datax ;
VAR BIRIMNO;
CLASS GENDER/ ORDER=UNFORMATTED MISSING;
CLASS AGE / ORDER=UNFORMATTED MISSING;
Final state:
PROC TABULATE
DATA=WORK.datax ;
options nodate number ; *THE CHANGE I WANT TO MAKE;
VAR BIRIMNO;
CLASS GENDER/ ORDER=UNFORMATTED MISSING;
CLASS AGE / ORDER=UNFORMATTED MISSING;
Absolutely!
Here's an example of a table set up the way you don't want, with the date and no page number:
To fix it as I suggested, in Enterprise Guide select File -> New -> Program. That will display the EG program editor. In the editor, type the following code:
options nodate number;
From here you have several options. You can just press the "Run" button, which will run the code. From this point on, as long as you're in the same SAS session, these options will apply.
If I do that, and then run the table process again, the results look like this (the edit icon is right over the page number, sigh!):
Or you can click on the Close icon, and you'll see your program on your process flow. You can right-click it, and select Run, and again it will set the options.
Or you can link it to one or more of your table-creation steps, like this:
Then if you right click on the program and select "Run Branch from Program", it will set the options and create your table.
If you want to reverse the options, just create a new program as described above, and enter:
options date nonumber;
When you run it your output will revert to displaying the date and no page number.
Tom
I was running some very esoteric ideas through my head until I found what change you want. Fortunately, this one is easy. Those options can be set anywhere in a SAS session, so just create a small program with your options statement, run it before you run any of the tables, and then if desired run another small program to reverse it. As long as you're in the same SAS session, the options will apply to your PROC TABULATE.
Tom
Hi Tom,
Thanks for the reply, can you give me an example about it or a link that gives such examples.
Gökhan
@chinaski wrote:
Hi Tom,
Thanks for the reply, can you give me an example about it or a link that gives such examples.
Gökhan
Options set with the OPTIONS statement are for the entire SAS session until changed So:
options nodate nonumber;
<first proc tabulate>
<second proc tabulate>
<other procedures>
...
<last output procedure>
options date number;
would generate all of the output between the first options statement and the last without page numbers or dates in the output. The last option resets output to include those items.
Ok, now i realised it, thank you so much, but i also wrote the code after table statement "/nocontinued" to supress "continued" word shown at the bottom of the page when there is more than one page, is it also possible to write it with options statement so that i can see it in all the tables i created when there is more than one page.
Absolutely!
Here's an example of a table set up the way you don't want, with the date and no page number:
To fix it as I suggested, in Enterprise Guide select File -> New -> Program. That will display the EG program editor. In the editor, type the following code:
options nodate number;
From here you have several options. You can just press the "Run" button, which will run the code. From this point on, as long as you're in the same SAS session, these options will apply.
If I do that, and then run the table process again, the results look like this (the edit icon is right over the page number, sigh!):
Or you can click on the Close icon, and you'll see your program on your process flow. You can right-click it, and select Run, and again it will set the options.
Or you can link it to one or more of your table-creation steps, like this:
Then if you right click on the program and select "Run Branch from Program", it will set the options and create your table.
If you want to reverse the options, just create a new program as described above, and enter:
options date nonumber;
When you run it your output will revert to displaying the date and no page number.
Tom
Thats awesome, very useful information for me. Thank you very much Tom for your time, very much appreciated.
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 16. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: