楼主: zhou.wen
2831 1

[学习分享] [Z]Brief IntroductionSAS DM(display manager) [推广有奖]

已卖:4460份资源

教授

9%

还不是VIP/贵宾

-

TA的文库  其他...

SAS Technology

威望
0
论坛币
31987 个
通用积分
6.2141
学术水平
283 点
热心指数
262 点
信用等级
257 点
经验
56148 点
帖子
396
精华
4
在线时间
1328 小时
注册时间
2010-10-12
最后登录
2018-3-9

初级学术勋章 初级热心勋章 中级学术勋章 中级热心勋章

楼主
zhou.wen 发表于 2013-9-6 12:13:55 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
1.ABSTRACT
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:
  1. Dm log ‘clear;’;
复制代码



# Else if you want to remain at the log window then
  1. Dm log ‘clear;’ continue;
复制代码


# If you want to clear the log and output both, and then return to log window, then
  1. 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:
  1. 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.
  1. 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.
  1. 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.
  1. dm 'var libname.dataset;' continue;
复制代码


5) To clear a cluttered results window:
  1. 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
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:introduction troduction Manager Display Manage specific windows display manager correct

已有 3 人评分经验 学术水平 热心指数 信用等级 收起 理由
milos_luna + 1 + 1 + 1 精彩帖子
dxystata + 20 鼓励积极发帖讨论
Eternal0601 + 2 + 2 + 2 精彩帖子

总评分: 经验 + 20  学术水平 + 3  热心指数 + 3  信用等级 + 3   查看全部评分

Practice Is The Best Teacher!

沙发
ReneeD 发表于 2014-7-15 13:17:20
以为是 Data Mining

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-1-17 06:47