Amazines Free Article Archive
www.amazines.com - Tuesday, May 14, 2024
Read about the most recent changes and happenings at Amazines.com
Log into your account or register as a new author. Start submitting your articles right now!
Search our database for articles.
Subscribe to receive articles emailed straight to your email account. You may choose multiple categories.
View our newest articles submitted by our authors.
View our most top rated articles rated by our visitors.
* Please note that this is NOT the ARTICLE manager
Add a new EZINE, or manage your EZINE submission.
Add fresh, free web content to your site such as newest articles, web tools, and quotes with a single piece of code!
Home What's New? Submit/Manage Articles Latest Posts Top Rated Article Search
Google
Subscriptions Manage Ezines
CATEGORIES
 Article Archive
 Advertising (133573)
 Advice (161671)
 Affiliate Programs (34799)
 Art and Culture (73857)
 Automotive (145712)
 Blogs (75615)
 Boating (9851)
 Books (17223)
 Buddhism (4130)
 Business (1330660)
 Business News (426453)
 Business Opportunities (366518)
 Camping (10973)
 Career (72795)
 Christianity (15848)
 Collecting (11638)
 Communication (115089)
 Computers (241954)
 Construction (38962)
 Consumer (49953)
 Cooking (17080)
 Copywriting (6733)
 Crafts (18203)
 Cuisine (7549)
 Current Affairs (20320)
 Dating (45907)
 EBooks (19703)
 E-Commerce (48258)
 Education (185523)
 Electronics (83524)
 Email (6438)
 Entertainment (159856)
 Environment (28973)
 Ezine (3040)
 Ezine Publishing (5454)
 Ezine Sites (1551)
 Family & Parenting (111009)
 Fashion & Cosmetics (196608)
 Female Entrepreneurs (11853)
 Feng Shui (134)
 Finance & Investment (310616)
 Fitness (106469)
 Food & Beverages (63046)
 Free Web Resources (7941)
 Gambling (30227)
 Gardening (25202)
 Government (10519)
 Health (630139)
 Hinduism (2206)
 Hobbies (44083)
 Home Business (91666)
 Home Improvement (251213)
 Home Repair (46246)
 Humor (4724)
 Import - Export (5459)
 Insurance (45104)
 Interior Design (29616)
 International Property (3488)
 Internet (191031)
 Internet Marketing (146687)
 Investment (22861)
 Islam (1161)
 Judaism (1352)
 Law (80507)
 Link Popularity (4596)
 Manufacturing (20914)
 Marketing (99318)
 MLM (14140)
 Motivation (18233)
 Music (27000)
 New to the Internet (9496)
 Non-Profit Organizations (4048)
 Online Shopping (129734)
 Organizing (7813)
 Party Ideas (11855)
 Pets (38165)
 Poetry (2229)
 Press Release (12689)
 Public Speaking (5643)
 Publishing (7566)
 Quotes (2407)
 Real Estate (126709)
 Recreation & Leisure (95495)
 Relationships (87674)
 Research (16182)
 Sales (80351)
 Science & Technology (110294)
 Search Engines (23514)
 Self Improvement (153300)
 Seniors (6220)
 Sexuality (36010)
 Small Business (49312)
 Software (83034)
 Spiritual (23517)
 Sports (116155)
 Tax (7663)
 Telecommuting (34070)
 Travel & Tourism (308306)
 UK Property Investment (3123)
 Video Games (13382)
 Web Traffic (11790)
 Website Design (56919)
 Website Promotion (36663)
 World News (1000+)
 Writing (35843)
Author Spotlight
ROBERT HOWARD

The Word of God is as, “Sweet as Honey”. God has Taken Me Through a Whole Lot of Things...more
CURTIS ENGLAND

I'm a full-time Writer, dreamer and chief executive manager. I write to release my true stories in t...more
MARTIN ADAM

Working in this organization from last 10 years. I did my graduation from the University of Texas, U...more
DESIGNPLUZ DIGITALAGENCY

Designpluz has steadily matured from a passionate graphics design start-up, into a full service digi...more
ELLIOT CHANG

Financial analyst and author writing on economy and business. ...more


Using Macros in SAS by Clinnovo Research Labs





Article Author Biography
Using Macros in SAS by
Article Posted: 05/20/2013
Article Views: 429
Articles Written: 26
Word Count: 796
Article Votes: 3
AddThis Social Bookmark Button

Using Macros in SAS


 
Education,Health,Science & Technology
SAS programmers use Macros in SAS to save their time since one programming code to make a small change in the program can execute that change throughout all the programs. Macros allow programmers to write a piece of code once and use it over and over again (in the same program or in different programs). Macros that are generated can also be stored in an auto call library. These macros can be shared between programs and also between programmers. Macro programs can do repetitive tasks such as creating or analyzing a series of data sets.

SAS macro code consists of two basic parts: macros and macro variables. The names of macros are prefixed with a percentile sign (%) and the names of macro variables are prefixed with an ampersand sign (&). A macro variable has only a single value and does not belong to a data set. Its value is always character. This value could be a variable name, a numeral, or any text that the programmers want to substitute into the programs. A macro can also be a larger piece of a program that may contain complex logic including complete DATA step and PROC steps and macro statements such as %DO, %THEN and %IF-%THEN/%ELSE.

Macro variables have two kinds of scope---local or global. A macro variable is local if it is defined inside a macro. A macro variable is generally global if it is defined outside a macro. A global macro variable can be used anywhere in the program, but a local macro variable can only be used inside its own macro.

In general these macros developed in SAS software are very flexible for repeated use and can work with varying needs of report presentation. Post processor macros generally take care of different formatting, display and other presentation attributes associated with the report.

When a normal dataset is written in SAS and submitted for execution in the SAS environment it passes through a process in the backend of SAS software, Data steps or proc steps are passed through the a process like.

Input stack – used to hold a SAS program after it is submitted and before it is processed by the word scanner.

Word scanner- Scans the text it takes from the input stack and breaks the text into different tokens (Tokens are the fundamental unit in the SAS language), where it determines the destination of the token: DATA step compiler, proc step compiler, macro processor, etc.

Compiler- Checks the syntax of tokens received from the word scanner. After it completes checking the syntax, the compiler translates the tokens into a form for execution. If the dataset has some Macro triggers, then these triggers will be sent to Macro processing unit.

Macro processor- Processes macro language references and statements used in a data step, where macro triggers like & and %, which signals the word scanner to transfer what follows to the macro symbol table.

Macro symbol table - The area in memory where macro variables and their associated values are stored and referenced to trigger a macro value.

The advantage of Macro Programming is:

The SAS programming productivity can be improved when the programmer knows how and when to use the SAS macro facility. The programs written can become reusable, shorter and easier to follow.

In addition, by incorporating macro facility features in SAS programs one can:

• Accomplish repetitive tasks quickly and efficiently.

• A macro program can be reused many times.

• Parameters passed to the macro program customize the results without having to change the code within the macro program.

• Provide a more modular structure to SAS programs.

• SAS language that is repetitive can be generated by macro language statements using macro programs.

Conclusion: The macro facility is a tool for extending and customizing SAS and for reducing the amount of text that have to be entered to do common tasks. The macro facility enables the programmers to assign a name to character strings or groups of SAS programming statements or conditions. Rather than working with text data or group of programming statements directly, programmers can create a macro variable name in which the text values or programming statements or conditions are saved. These macro variables can be reused in different programming statements for execution.

Clinnovo is a clinical innovation company. It is pioneer CRO industry in India. Clinnovo offers professional clinical research course , clinical data management course , SAS Course and imaging training. Clinnovo has been serving different bio-pharma industries across the world with excellence and high quality. For more information contact at +91 9912868928, 040 64635501

Related Articles - SAS, Macros, datasets, prorams, Analysis, Data, Clinical Data, Clinical Research, Data Management, Statistics, Macro Programs, Reports, Codes, execute,

Email this Article to a Friend!

Receive Articles like this one direct to your email box!
Subscribe for free today!

 Rate This Article  
Completely useless, should be removed from directory.
Minimal useful information.
Decent and informative.
Great article, very informative and helpful.
A 'Must Read'.

 

Do you Agree or Disagree? Have a Comment? POST IT!

 Reader Opinions 
Submit your comments and they will be posted here.
Make this comment or to the Author only:
Name:
Email:
*Your email will NOT be posted. This is for administrative purposes only.
Comments: *Your Comments WILL be posted to the AUTHOR ONLY if you select PRIVATE and to this PUBLIC PAGE if you select PUBLIC, so write accordingly.
 
Please enter the code in the image:



 Author Login 
LOGIN
Register for Author Account

 

Advertiser Login

 

ADVERTISE HERE NOW!
   Limited Time $60 Offer!
   90  Days-1.5 Million Views  

 

Great Paranormal Romance


TIM FAY

After 60-plus years of living, I am just trying to pass down some of the information that I have lea...more
GENE MYERS

Author of four books and two screenplays; frequent magazine contributor. I have four other books "in...more
LAURA JEEVES

At LeadGenerators, we specialise in content-led Online Marketing Strategies for our clients in the t...more
ALEX BELSEY

I am the editor of QUAY Magazine, a B2B publication based in the South West of the UK. I am also the...more
SUSAN FRIESEN

Located in the lower mainland of B.C., Susan Friesen is a visionary brand strategist, entrepreneur, ...more
STEVERT MCKENZIE

Stevert Mckenzie, Travel Enthusiast. ...more
STEPHEN BYE

Steve Bye is currently a fiction writer, who published his first novel, ‘Looking Forward Through the...more
SHALINI MITTAL

A postgraduate in Fashion Technology. Shalini is a writer at heart! Writing for her is an expression...more
ADRIAN JOELE

I have been involved in nutrition and weight management for over 12 years and I like to share my kn...more
JAMES KENNY

James is a Research Enthusiast that focuses on the understanding of how things work and can be impro...more

HomeLinksAbout UsContact UsTerms of UsePrivacy PolicyFAQResources
Copyright © 2024, All rights reserved.
Some pages may contain portions of text relating to certain topics obtained from wikipedia.org under the GNU FDL license