(Author: Roland Rashleigh-Berry
Date: 09 Jul 2006)
These macros call other macros. To see a list of dependencies for these two macros then click here.
You should not use these macros if you are not using Spectre
or working on a non-Linux/Unix platform, although you can still use the
Spectre reporting macros. How to do this is explained on the following
pages.
Ad-hoc Reporting and PDFs
%unistats and %npcttab for MS Windows users
%openrep
proc report ......
proc report....
%closerep |
The file created by the two macros will have the extension ".lis" followed by the label defined to the %titles macro. This is covered on the page that describes the %titles macro which you can link to here. This label is nearly always blank so the file extension will be just ".lis". If the label were "a" then the file extension would be ".lisa".
/ missing=' ' By default, set
missing option to a space. If you set this
/ to null then no action will be taken. / formchar='|_---|+|---+=|-/\<>*' By default, set formchar option so that / across spanning characters are underscores. If you set this / to null then no action will be taken. |
It sets the missing character to a space, so that numeric missing values are shown as spaces in a report rather than periods, and it resets the formchar so that spanning lines in "proc report" and other report procedures use an underscore rather than a minus sign. The underscore you can see as the second character in the formchar list shown above. You have to be aware of this since sometimes you will not want these options to take effect. To stop them taking effect you have to set the parameters to null, as it says above. Suppose you use "proc tabulate" then by default it draws boxes around your values. If you are not aware of what %openrep is doing then the spanning character of your boxes will be changed to an underscore and this will look strange. And you will wonder why it is happening unless you remember this hidden feature of %openrep.
If you are using SAS® software interactively, %openrep will create a window and prompt you for the program name. Developing code in batch is the recommended method, but it still caters for interactive development. Once you tell it the program name it will remember it during your interactive session. The reason it must do this is because it is possible to work on more than one program during an interactive session and it has to be sure of the one you are intending to work on.
You can view the %openrep macro below.
%openrep
If you are using SAS software interactively, %closerep will open the final output file in your SAS software session "Notepad" window. It will still be written to the output file, though. It just displays it for you in yout Notepad window for your own convenience.
You can view the %closerep macro below.
%closerep
NOTE move=(98,88) pct font=HWPSL001 height=0.17 in c=white 'Z'; |
Do not reduce the height of the character in the note statement or SAS software will replace it with a drawn character that the PDF browser can not see. The colour of the character is white so you will not see it in the final PDF. You can set it to black when testing to see where it is putting this character and you should do this to be sure it is not overwriting any existing text or part of the figure. If you use "gv" to view the postscript file then "gv" will be confused by this character and may not be able to display the figure but you will always be able to print it using "lpr -h -P printer-name myfigure.ps".
%let _figbkmark_=Whatever pdf bookmark text you want; |
This bookmark macro variable has no effect on tables and listings. Their bookmarks are created by the getitles script at a later stage. The reason it is done for figures is because a PostScript file is created directly and all the text in it, including all the titles, gets turned into drawing instructions (except for the hardware character as described in the previous section) so it is impossible to extract the titles at a later stage.
Use the "Back" button of your browser to return to the previous page.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.