关于本站
人大经济论坛-经管之家:分享大学、考研、论文、会计、留学、数据、经济学、金融学、管理学、统计学、博弈论、统计年鉴、行业分析包括等相关资源。
经管之家是国内活跃的在线教育咨询平台!
获取电子版《CDA一级教材》
完整电子版已上线CDA网校,累计已有10万+在读~ 教材严格按考试大纲编写,适合CDA考生备考,也适合业务及数据分析岗位的从业者提升自我。
TOP热门关键词
1.ABSTRACTSASprogrammersusuallylosealotoftime(andtemper)whensettingupacorrectenvironmentbeforesubmittingaprogram.Forexample,everytimeyourunaprogram,youneedtocloseallthedatasetsthatarecreatedintheprogr ...
免费学术公开课,扫码加入![]() |
SAS programmers usually lose a lot of time (and temper) when setting up a correct environment before submitting a program. For example, every time you run a program, you need to close all the datasets that are created in the program, clear the log and output windows, save the program etc. Then once the program is run, you need to open a specific dataset to check the results. In a nutshell, you always follow some fixed, time-consuming processes, before and after executing the program.
Before knowing about the DM (Display Manager), I used to say, "if only all this could be done automatically". Then DM statements came to my rescue. A DM statement stands for Display Manager Statements. It submits SAS Program Editor, Log, Procedure Output or text editor commands as SAS statements. This paper will explain the purpose, functionalities and usage of DM statements using several examples.
The intended audience is all levels of SAS users.
2.INTRODUCTION
While coding and executing the code, many redundant tasks are to be done manually. DM statements really prove to be a boon to avoid such redundancies. To date, there is no proper reference paper or document that highlights the power of DM statements. This paper aims to familiarize you with the intricacies of DM. It includes commands for you to play and automatize your chores. Happy Coding!!
3.SYNTAX
DM <window> 'command(s)' <window> <CONTINUE>;
| window: | Specifies the active window. (like wedit, log, output) |
| command: | Can be any windowing command or text editor command and must be enclosed in single quotation marks. If you want to issue several commands, separate them with semicolons. (like wedit, log, output). (like clear, wpaste etc) |
| CONTINUE | Causes SAS to execute any SAS statements that follow the DM statement in the Program Editor window and, if a windowing command in the DM statement called a window, makes that window active. |
The default is the editor window through which you submit the code. This example would clear the concept of the term <window> and <CONTINUE> as used in the syntax. Let’s understand it with the help of the log clear statement. For example:# If you want to clear the log and return back to the editor window after submitting DM statement then:
- Dm log ‘clear;’;
# Else if you want to remain at the log window then
- Dm log ‘clear;’ continue;
# If you want to clear the log and output both, and then return to log window, then
- Dm ‘log; clear; output; clear;’ log;
1) Now, each time you run or debug the code, you have to save the code, clear the log and output, close the open datasets, run them, then search the library for the dataset you are working and open it. Imagine the time and clicks you save using the following code:
- dm 'flsvlast'; *saves the program;dm 'log; clear; output; clear;'; *clears log and output; dm 'next VIEWTABLE:; end;'; *closes the open dataset;
2) If the name of the dataset created is dynamic then you can use the following, which opens the last created dataset.
- dm “vt &syslast";
3) Usually when you are working with a dataset, you want to see the column names and not the column labels. The following statement helps view the column names for a specific dataset, but for other datasets, column labels would be visible.
- dm "VT libname.dataset COLHEADING=NAMES" continue;
4) If you are adding a column to the dataset, or changing the attributes of a dataset, then you are not really interested in the entire data but just the columns and its attributes. The following command will open the column attribute window of the desired table, and not the table.
- dm 'var libname.dataset;' continue;
5) To clear a cluttered results window:
- dm 'odsresults' clear ;
4.CONCLUSION
SAS has unlimited power in many of its unusually used statements. Rather then using the conventional methods, unraveling the mystery behind those statements could unleash newer and more expedient coding standards.
补充内容 (2013-11-3 17:09):
原文出自:http://www.clinovo.com/userfiles ... S-DM-Statements.pdf
「经管之家」APP:经管人学习、答疑、交友,就上经管之家!
免流量费下载资料----在经管之家app可以下载论坛上的所有资源,并且不额外收取下载高峰期的论坛币。
涵盖所有经管领域的优秀内容----覆盖经济、管理、金融投资、计量统计、数据分析、国贸、财会等专业的学习宝库,各类资料应有尽有。
来自五湖四海的经管达人----已经有上千万的经管人来到这里,你可以找到任何学科方向、有共同话题的朋友。
经管之家(原人大经济论坛),跨越高校的围墙,带你走进经管知识的新世界。
扫描下方二维码下载并注册APP
免流量费下载资料----在经管之家app可以下载论坛上的所有资源,并且不额外收取下载高峰期的论坛币。
涵盖所有经管领域的优秀内容----覆盖经济、管理、金融投资、计量统计、数据分析、国贸、财会等专业的学习宝库,各类资料应有尽有。
来自五湖四海的经管达人----已经有上千万的经管人来到这里,你可以找到任何学科方向、有共同话题的朋友。
经管之家(原人大经济论坛),跨越高校的围墙,带你走进经管知识的新世界。
扫描下方二维码下载并注册APP
您可能感兴趣的文章
人气文章
本文标题:[Z]Brief IntroductionSAS DM(display manager)
本文链接网址:https://bbs.pinggu.org/jg/ruanjianpeixun_sasruanjianpeixun_2617425_1.html
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。



