Clinical SAS LOCF & BOCF( Last observation carry forward)

LOCF is one of the important function used frequently for longitudinal data Anaysis specially in Clinical Trials.

In simple term, Baseline value is a value that you compare with the result. 
For example, 
Patient with high blood pressure goes to doctor. First thing that doctor will do is measure his blood pressure and record it in patients file (e.g BP =150). 
Next step: Doctor will prescribe a medication to Patient and ask him to visit again after one week. 
After one week of Medication, patient visits the doctor and doctor again checks his Blood Pressure (e.g 125). 
Next: doctor will compare this result (after one week of medication) with the result taken before medication was given (i.e. 150) and will come to the conclusion that “after one week of treatment there is a reduction in the Blood Pressure”. 
So, what he did: compare the result with the baseline value and find out the change from baseline 
Baseline Value: Last observation taken before giving the medication. 
Now, what is BOCF ? 
Now, consider this scenario: We have result of one subject. Where visit 2 is baseline value and you need to see the change from baseline after visit 9. How will you do it? 

ID Visit Value 
101 1 150 
101 2 145 
101 3 145 
101 4 140 
101 5 135 
101 6 135 
101 7 133 
101 8 125 
101 9 125 


So, here you carried forward baseline value (BOCF) till visit 9, and you can measure the change from baseline by subtraction. (Change = value – BOCF) 



ID Visit Value BOCF Change 
101 1 150 150 0 
101 2 145 145 0 
101 3 145 145 0 
101 4 140 145 5 
101 5 135 145 10 
101 6 135 145 10 
101 7 133 145 12 
101 8 125 145 20 
101 9 125 145 20


This might give you a better idea 


data test; 
input ID Visit bp ; 
/*here data contains records for two subjects*/ 
/*kept few missing values so that you can get better idea*/ 
datalines; 
101 1 150 
101 2 . 
101 3 145 
101 4 140 
101 5 135 
101 6 135 
101 7 133 
101 8 125 
101 9 125 
102 1 . 
102 2 170 
102 3 . 
102 4 165 
102 5 155 
102 6 145 
102 7 140 
102 8 135 
102 9 135 

Run; 
proc print; 
Run; 
proc sort data = test; 
by id; 
Run; 

/*Performing LOCF*/ 
data locf; 
set test; 

/*Need to create new variable for locf*/ 

retain new_bp; 
by id; 

if first.id then new_bp = bp; 

/*as visit 2 is baseline value*/ 
if visit < 3 and bp ne . then new_bp = bp; 
else if visit >=3 then new_bp = bp; 
drop bp; 
Run; 

proc print; 
Run; 

data bocf; 
set locf; 
retain bocf; 
by id; 
if first.id then bocf=new_bp; 

if visit ❤ and new_bp ne . then bocf=new_bp; 

change = bocf – new_bp; 


/*if visit = 9;*/ 
Run; 

proc print; 
Run;

Find information in more detail
http://www2.sas.com/proceedings/sugi28/099-28.pdf

Basic SAS Interview Questions

1. Steps from raw data to output ….
2. Have you used macros n how are you with them?
3. Can you give me some system option for debugging macro error?
4. Why do you use Macros?
5. How do u create a macro variable?
6. Difference between Local and Global macros
7. Just list various Procs you have used….
8. What is the use of Proc corr?
9. Can you explain Proc Compare?
10. Can you explain Proc Report?
11. Use of Put statement?
12. Say u have x=a+b; and x = sum (a,b); what result is expected?
13. Where do you use proc Formats and label?
14. What do you mean by calculated / derived variable?
15. Getting data from databases such as oracle
16. Which functions are used to convert Numeric to character variables and vice-versa?
17. Proc Univariate advantages.
18. How do you use your statistical skills in your last projects?
19. What’s the difference between proc means and function means?
20. How do you use ODS?
21. How do you use MACRO?
22. What’s the difference between SQL and MERGE?
23. What would you do with data validation? What’s your process?
24. How would you transport data?
25. How would you rank your expertise in SAS Base in a scale of 1 to 10?
26. How would you rank your expertise in using MACRO in a scale of 1 to 10?

SAS Launches Next-Generation Ad Delivery Solution for Publishers

With digital advertising expanding and evolving rapidly, ad publishers are finding that current methods for managing and selling ad inventory aren’t keeping pace. Publishers have been juggling multiple tools to manage targeting, market research, inventory analysis, workflow, sales performance and more. SAS(R) Intelligent Advertising for Publishers is the antidote to this piecemeal approach. SAS, a leader in business intelligence and integrated marketing management, now provides a unified solution for managing workflow, from RFP, proposal and targeting, to flight. A consistent interface for both sales and ad operations streamlines communication between the two, so each can perform more efficiently.
Janet Ryan, Head of Sales at Live365.com, the world’s largest internet radio network, undertook a rigorous selection process before choosing SAS Intelligent Advertising for Publishers to replace legacy ad servers. “Standard ad servers no longer supply what’s required to profit from selling advertising,” said Ryan. “SAS goes beyond the industry standard, enabling us to optimize revenue from advertisers.”
SAS Intelligent Advertising for Publishers includes the Exchange Manager module that helps publishers understand which inventory is the most valuable to exchanges, and how to allocate it intelligently so no revenue is sacrificed. With Exchange Manager publishers can set floor prices on categories of inventory and accept bids for premium inventory only when certain floors are met. The ability to set floors and cascade different overall price-points for inventory allows publishers to control pricing and yield. SAS Intelligent Advertising for Publishers provides an in-depth understanding of which products and audiences generate the most revenue through different sales channels, and an overall picture of directly negotiated sales yield and partner channel sales yield. This data provides rich insights into how best to package future inventory.
Other modules in SAS Intelligent Advertising for Publishers include:
Data Management — Integrating third-party providers and common ad-delivery engines often creates data leakage and technical problems. SAS Intelligent Advertising for Publishers avoids issues by storing sales and delivery data in one place, accessed through a single interface. Ad servers log ad request data on every impression, store user behavior sessions across all properties, and log data correlation to create accurate forecasts. SAS Intelligent Advertising for Publishers also incorporates historical data for better insight into businesses and audiences.
Simulation-Based Forecasting — SAS Intelligent Advertising for Publishers links forecasting and fulfillment, providing decision and delivery systems an accurate availability picture that includes all product packaging and delivery rules. Publishers know both what they have to sell and that they can actually fulfill it.
Ad Server with Optimization — Only insights that can be acted upon translate into revenue. SAS’ flexible and scalable decision engine prioritizes and optimizes competing business models to assign delivery rules that best match customers’ needs. Advanced delivery options empower companies to act immediately on decisions.
Reporting — Dashboards help publishers monitor sales performance and rate-card adherence. Detailed views identify revenue trends by product, salesperson and advertiser.
Data Visualization — SAS Intelligent Advertising for Publishers delivers intelligence on campaign delivery, inventory availability or placement, historical performance or products with simple and elegant imagery. SAS data visualization tools help individuals see and comprehend data in an illustrative, easy-to-understand way.
“The digital advertising industry is at a crossroads,” said Wilson Raj, Global Customer Intelligence Director at SAS. “Brands, ad buyers and publishers are demanding more accountability, effectiveness and flexibility in their placements. Today’s publishers have massive amounts of data. SAS Intelligent Advertising for Publishers makes the data accessible, turns the data into insight and gives users a simple way to take action on what they learn. With advanced analytics ad publishers can now manage inventory in real-time, serve up ads in an automated fashion and provide unparalleled audience targeting.”
Source :sas.com/news

SAS Documentation Example Code and Data

This is a place where you can find the SAS Publishing Data and Code for Books Published by SAS Institute.
Learn easy …Learn effectively…
Table of Contents
  • A Handbook of Statistical Analyses Using SAS, Second Edition
  • A Step-by-Step Approach to Using SAS for Factor Analysis and Structural Equation Modeling
  • A Step-by-Step Approach to Using SAS for Univariate and Multivariate Statistics, Second Edition
  • A Step-by-Step Approach to Using the SAS System for Univariate and Multivariate Statistics
  • Advanced Log-Linear Models Using SAS
  • Analysis of Clinical Trials Using SAS: A Practical Guide
  • Analyzing Receiver Operating Characteristic Curves with SAS
  • Annotate: Simply the Basics
  • Applied Multivariate Statistics with SAS Software, Second Edition
  • Applied Statistics and the SAS Programming Language, Fourth Edition
  • Basic Statistics Using SAS Enterprise Guide: A Primer
  • CRM Segmentation and Clustering Using SAS Enterprise Miner
  • Carpenter’s Complete Guide to the SAS Macro Language
  • Carpenter’s Complete Guide to the SAS Macro Language, Second Edition
  • Carpenter’s Complete Guide to the SAS REPORT Procedure
  • Categorical Data Analysis Using the SAS System
  • Categorical Data Analysis Using the SAS System, Second Edition
  • Cody’s Data Cleaning Techniques Using SAS Software
  • Cody’s Data Cleaning Techniques Using SAS, Second Edition
  • Combining and Modifying SAS Data Sets: Examples, Version 6, First Edition
  • Common Statistical Methods for Clinical Research with SAS Examples
  • Common Statistical Methods for Clinical Research with SAS Examples, Second Edition
  • Data Management and Reporting Made Easy with SAS Learning Edition 2.0
  • Data Preparation for Analytics Using SAS
  • Debugging SAS Programs: A Handbook of Tools and Techniques
  • Efficiency: Improving the Performance of Your SAS Applications
  • Elementary Statistics Using JMP
  • Extending SAS Survival Analysis Techniques for Medical Research
  • Extending SAS/EIS Software Capabilities, Version 6, First Edition
  • Fixed Effects Regression Methods for Longitudinal Data Using SAS
  • Forecasting Examples for Business and Economics Using SAS
  • Genetic Analysis of Complex Traits Using SAS
  • Getting Started with the Market Research Application
  • Getting Started with the SQL Procedure, Version 6, First Edition
  • In the Know…SAS Tips & Techniques From Around the Globe
  • In the Know…SAS Tips and Techniques From Around the Globe, Second Edition
  • Integrating Results through Meta-Analytic Review Using SAS Software
  • Introduction to Data Mining Using SAS Enterprise Miner
  • Introduction to Design of Experiments with JMP Examples, Third Edition
  • Introduction to Market Research Using SAS
  • JMP Start Statistics: A Guide to Statistics and Data Analysis Using JMP, Fourth Edition
  • JMP for Basic Univariate and Multivariate Statistics: A Step-by-Step Guide
  • Learning SAS by Example: A Programmer’s Guide
  • Logistic Regression Examples Using the SAS System, Version 6, First Edition
  • Logistic Regression Using SAS: Theory and Application
  • Longitudinal Data and SAS: A Programmer’s Guide
  • Maps Made Easy Using SAS
  • Measurement, Analysis, and Control Using JMP: Quality Techniques for Manufacturing
  • Multiple Comparisons and Multiple Tests Using SAS
  • Multiple Comparisons and Multiple Tests Using SAS: Workbook
  • Multiple-Plot Displays: Simplified with Macros
  • Multivariate Data Reduction and Discrimination with SAS Software
  • Output Delivery System: The Basics
  • PROC SQL: Beyond the Basics Using SAS
  • PROC TABULATE by Example
  • Painless Windows: A Handbook for SAS Users, Third Edition
  • Pharmaceutical Statistics Using SAS: A Practical Guide
  • Predictive Modeling with SAS Enterprise Miner: Practical Solutions for Business Applications
  • Programming Techniques for Object-Based Statistical Analysis with SAS Software
  • Project Management Using the SAS System, Version 6, First Edition
  • Quick Results with SAS/GRAPH Software
  • Quick Results with the Output Delivery System
  • Reading External Data Files Using SAS: Examples Handbook
  • Regression Using JMP
  • Regression and ANOVA: An Integrated Approach Using SAS Software
  • SAS Certification Prep Guide: Advanced Programming for SAS 9
  • SAS For Dummies
  • SAS Functions by Example
  • SAS Graphics for Java: Examples Using SAS AppDev Studio and the Output Delivery System
  • SAS Guide to Report Writing: Examples, Second Edition
  • SAS Guide to Report Writing: Examples, Version 6, First Edition
  • SAS Guide to the REPORT Procedure: Reference, Release 6.11
  • SAS Macro Programming Made Easy
  • SAS Macro Programming Made Easy, Second Edition
  • SAS Programming Tips: A Guide to Efficient SAS Processing
  • SAS Programming by Example
  • SAS Programming for Enterprise Guide Users
  • SAS Programming in the Pharmaceutical Industry
  • SAS SQL Procedure User’s Guide, Version 8
  • SAS Software Solutions
  • SAS Survival Analysis Techniques for Medical Research, Second Edition
  • SAS System for Elementary Statistical Analysis, Second Edition
  • SAS System for Linear Models, Third Edition
  • SAS System for Mixed Models
  • SAS System for Regression, Second Edition
  • SAS System for Regression, Third Edition
  • SAS System for Statistical Graphics, First Edition
  • SAS Technical Report P-258, Using the REPORT Procedure in a Nonwindowing Environment, Release 6.07
  • SAS for Forecasting Time Series, Second Edition
  • SAS for Linear Models, Fourth Edition
  • SAS for Mixed Models, Second Edition
  • SAS for Monte Carlo Studies: A Guide for Quantitative Researchers
  • SAS/AF Software: FRAME Application Development Concepts, Version 6, First Edition
  • SAS/CONNECT Software: Usage and Reference, Version 6, Second Edition
  • SAS/ETS Software: Applications Guide 1, Version 6, First Edition
  • SAS/ETS Software: Applications Guide 2, Version 6, First Edition
  • SAS/ETS User’s Guide, Version 6, Second Edition
  • SAS/GRAPH Software: Examples, Version 6, First Edition
  • SAS/GRAPH Software: Reference, Version 6, First Edition, Volumes 1 and 2
  • SAS/STAT Technical Report: Spatial Prediction Using the SAS System
  • Solutions for Your GUI Applications Development Using SAS/AF FRAME Technology
  • Statistical Analysis of Medical Data Using SAS
  • Statistical Quality Control Using the SAS System
  • Statistics Using SAS Enterprise Guide
  • Step-by-Step Basic Statistics Using SAS: Exercises
  • Step-by-Step Basic Statistics Using SAS: Student Guide
  • Step-by-Step Programming with Base SAS Software
  • Stock Market Analysis Using the SAS System: Portfolio Selection and Evaluation
  • Stock Market Analysis Using the SAS System: Technical Analysis
  • Survival Analysis Using SAS: A Practical Guide
  • Table-Driven Strategies for Rapid SAS Applications Development
  • The Analyst Application, First Edition
  • The Complete Guide to SAS Indexes
  • The Essential PROC SQL Handbook for SAS Users
  • The How-To Book for SAS/GRAPH Software
  • The Little SAS Book for Enterprise Guide 3.0
  • The Little SAS Book for Enterprise Guide 4.1
  • The Little SAS Book: A Primer
  • The Little SAS Book: A Primer, Fourth Edition
  • The Little SAS Book: A Primer, Revised Second Edition
  • The Little SAS Book: A Primer, Second Edition
  • The Little SAS Book: A Primer, Third Edition
  • The Next Step: Integrating the Software Life Cycle with SAS Programming
  • The Power of PROC FORMAT
  • The SAS Workbook
  • Tuning SAS Applications in the MVS Environment
  • Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition
  • Univariate and Multivariate General Linear Models: Theory and Applications Using SAS Software
  • Using SAS in Financial Research
  • Validating Clinical Trial Data Reporting with SAS
  • Visualizing Categorical Data
  • Web Development with SAS by Example
  • Web Development with SAS by Example, Second Edition
  • Working with the SAS System
  • Your Guide to Survey Research Using the SAS System


  • FDA Regulatory requirement for submitting the SAS Datasets

    FDA and SAS Technology

    The FDA is defining standards for various types of electronic submissions to the agency. A transport format developed by SAS Institute has been adopted as an FDA standard for accepting and archiving data sets.

    The Electronic Records; Electronic Signature Rule (21 CFR Part 11), or “the Esig rule,” is the US law that provides FDA the authority to identify types of submissions that the agency will accept in electronic form. The Esig rule also states that persons should consult the agency for details on how to proceed with electronic submissions. Such details include method of transmission, media, file formats, and technical protocols. The FDA issues guidance documents to reduce the need to consult for details.

    In January 1999, the FDA’s Center for Drug Evaluation and Research (CDER) and Center for Biologics Evaluation and Research (CBER) issued a joint guidance on general considerations for electronic submissions, entitled Providing Regulatory Submissions in Electronic Format – General Considerations . The guidance describes the use of the SAS System XPORT format for electronic data sets.

    The FDA plans to issue a series of guidance documents that will focus on specific submission types. The first of this series was issued in January 1999, when CDER issued a guidance on NDAs, entitled Providing Regulatory Submissions in Electronic Format – NDAs .

    Format of Electronic Data submission


    You should provide data subsets in certain formats. Currently, we are able to accept and archive datasets in SAS System XPORT transport format (Version 5 SAS transport file). In circumstances when data are moved directly to a database or special review tool, tagged ASCII file, specifically, standard generalized markup language (SGML) and extensible markup language (XML), may be the appropriate file format. At times, delimited ASCII files are also acceptable. See the individual guidance for the specific submission type for the appropriate dataset format.

    1. SAS System XPORT Transport Format (Version 5 SAS Transport Format)

    SAS XPORT transport format, also called Version 5 SAS transport format, is an open format published by the SAS Institute. The description of this SAS transport file format is in the public domain. Data can be translated to and from this SAS transport format to other commonly used formats without the use of programs from SAS Institute or any specific vendor.
    You should follow the recommendations in this section to create SAS transport files that we can review and archive.
    Version

    In SAS, SAS XPORT transport files are created by PROC XCOPY in Version 5 of SAS software and by the XPORT engine in Version 6 and higher of SAS Software. We are unable to archive SAS Transport files processed by the CPORT engine.

    You can find the record layout for SAS XPORT transport files in SAS technical support TS-140. This document and additional information about the SAS Transport file layout can be found on the SAS World Wide Web page athttp://www.sas.com/fda-esub.

    Transformation of Datasets

    We use a variety of software tools to analyze the datasets. Stat/Transfer from Circle Systems and DBMS/copy from Conceptual Software Inc. , are two programs used to convert data to various formats used for analysis. SAS Viewer version 7 or higher is used to open SAS transport files directly.


    Naming SAS Transport Files

    1. All SAS transport files should use .xpt as the file extension.
    2. Compression of SAS Transport Files
    SAS transport files should not be compressed. There should be one transport file per dataset.

    3. Content of Datasets and Organization

    You should provide a single transport file for each dataset.
    Many of the software tools used by the reviewers require datasets to be loaded into random access memory (RAM) prior to opening the file. Therefore, dataset files should be organized so that their size is generally less than 50 MB per file

    Datasets divided to meet the maximum size restrictions should contain the same variable presentation so they can be easily merged, joined, and concatenated. 

    The datasets should be accompanied by data definition tables that include metadata such as the variable name, a description of the variable, the type of variable (e.g. , number, character, date), and codes used in the dataset. 

    Variable names should be limited to 8 characters.
    You should include a descriptive label up to 40 characters in the label header. 

    Further recommendations for content of SAS Transport files are provided in guidance for each specific submission type.

    SAS Macro: Top 10 Interview Questions

    1. Can I use SAS functions within the macro facility?
    Answer:
    Yes, by using the %SYSFUNC macro
    function.

    Example: %put %sysfunc(date(),worddate20.);

    2. What quoting function should I use to mask special characters?

    Depends. Use compile-time or execution-time quoting functions for your situation.

    Compile-time quoting functions:

     %STR–masks commas, mnemonics, and unmatched quotation marks and parentheses.
     %NRSTR–masks percent signs and ampersands in addition to the other special characters.

    Execution-time quoting functions:


     %BQUOTE–masks special characters and mnemonics in resolved values during macro execution.
     %SUPERQ–masks special characters and mnemonics during macro execution. However, it also prevents further resolution of any macros or macro variables.

    Example: Unmatched Quotation Mark (‘)
    %let singleq=O’neill;
    %put &singleq;

    Solution: %STR Function
    %let singleq=%str(O%’neill)
    %put &singleq;

    Example: Percent Sign (%)
    %let ex=This macro is called %showme;
    %put ex=&ex;

    log message

    20 %let ex= This macro is called %showme;
    WARNING: Apparent invocation of macro SHOWME not resolved.
    21 %put ex=&ex;
    WARNING: Apparent invocation of macro SHOWME not resolved.

    Solution: %NRSTR Function
    %let ex=%nrstr(This macro is called %showme);
    %put ex=&ex;


    3. How do I resolve a macro variable within single quotation marks?

    Use the %STR and %UNQUOTE
    functions.


    4. How do I resolve error messages when output that was generated with the MPRINT system option looks fine?


    Use the %UNQUOTE function


    5. What are the differences between the autocall facility and the stored compiled macro facility?

    Autocall Facility


    Macro source code is implicitly included and compiled to the WORK.SASMACR catalog.
    To use autocall macros, you have to set the MAUTOSOURCE and the SASAUTOS= system options.
    The MAUTOSOURCE option activates the autocall facility.
    The SASAUTOS= option specifies the autocall library or libraries

    Stored Compiled Macro Facility

    The stored compiled macro facility provides access to permanent SAS catalogs from which you can invoke compiled macros directly.
    To use these stored compiled macros, you have to set the MSTORED and the SASMSTORE= system options.
    The MSTORED option searches for the compiled macros in a SAS catalog that you reference with the SASMSTORE= option.
    The SASMSTORE= option specifies the libref for the SAS library that contains the stored compiled macros.

    6. How do I conditionally execute a macro from within a DATA step?

    Use the CALL EXECUTE routine

    Example: CALL EXECUTE routine

    /* Compile the macro BREAK. The BYVAL */
    /* parameter is generated in the CALL */
    /* EXECUTE routine. */
    %macro break(byval);
    data age_&byval;
    set sorted(where=(age=&byval));
    run;
    %mend;
    proc sort data=sashelp.class out=sorted;
    by age;
    run;
    options mprint;
    data _null_;
    set sorted;
    by age;
    if first.age then call execute(‘%break(‘||age||’)’);
    run;


    7. Why does my macro variable not resolve?

    The macro variable might not resolve for a few reasons:
     macro variable scope: Local macro variables versus global macro variables.
     no step boundary:The DATA step does not have an ending RUN statement before a CALL SYMPUT or a CALL SYMPUTX routine.

    Example: No RUN statement before %PUT statement:
    data test;
    x=”MYVALUE”;
    call symputx(‘macvar’,x);
    %put WILL I RESOLVE &macvar?;


     timing issues: a result of using the CALL EXECUTE and CALL SYMPUT routines together.



    8. How can I use macros to loop through all files in a directory?

    Use the %DO statement


    9. Can I use DATA step variables in a %IF-%THEN statement?

    No, DATA step variables cannot be used
    in %IF-%THEN statements.


    10. Why am I getting an error that states that a character operand was found in the %EVAL function?


    Use the %SYSEVALF function

    SAS Technical Interview Questions

    1. What is the one statement to set the criteria of data that can be coded in any step? 


    2. What is the effect of the OPTIONS statement ERRORS=1?


    3. What’s the difference between VAR A1 – A4 and VAR A1 — A4? 

    4. What do the SAS log messages “numeric values have been converted to character” mean? What are the implications?

    5. Why is a STOP statement needed for the POINT= option on a SET statement? 

    6. How do you control the number of observations and/or variables read or written? 

    7. Approximately what date is represented by the SAS date value of 730? 

    8. Does SAS ‘Translate’ (compile) or does it ‘Interpret’? Explain. 

    9. What does the RUN statement do? 

    10. Why is SAS considered self-documenting? 

    11. What are some good SAS programming practices for processing very large data sets? 

    12. What is the different between functions and PROCs that calculate thesame simple descriptive statistics?

    13. If you were told to create many records from one record, show how you would do this using arrays and with PROC TRANSPOSE? 

    14. What is a method for assigning first.VAR and last.VAR to the BY groupvariable on unsorted data? 

    15. How do you debug and test your SAS programs? 

    16. What other SAS features do you use for error trapping and datavalidation? 

    17. How would you combine 3 or more tables with different structures? 

    18. What areas of SAS are you most interested in? 

    19. Describe 5 ways to do a “table lookup” in SAS. 

    20. What versions of SAS have you used (on which platforms)? 

    21. What are some good SAS programming practices for processing very large data sets? 

    22. What are some problems you might encounter in processing missing values? In Data steps? Arithmetic? Comparisons? Functions? Classifying data? 

    23. How would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? 

    24. What is the different between functions and PROCs that calculate the same simple descriptive statistics? 

    25. If you were told to create many records from one record, show how you would do this using array and with PROC TRANSPOSE? 

    26. Declare array for number of variables in the record and then used Do loop Proc Transpose with VAR statement 

    27. What are _numeric_ and _character_ and what do they do? 

    28. How would you create multiple observations from a single observation? 

    29. For what purpose would you use the RETAIN statement? 

    30. How could you generate test data with no input data? 

    31. What can you learn from the SAS log when debugging? 

    32. What is the purpose of _error_? 

    33. How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs? 

    34. How do you test for missing values? 

    35. How are numeric and character missing values represented internally? 

    36. Which date functions advances a date time or date/time value by a given interval? 

    37. In the flow of DATA step processing, what is the first action in a typical DATA Step? 

    38. What are SAS/ACCESS and SAS/CONNECT? 

    39. What is the one statement to set the criteria of data that can be coded in any step? 

    40. What is the purpose of using the N=PS option? 

    41. What are the scrubbing procedures in SAS? 

    42. What are the new features included in the new version of SAS?

    43. What has been your most common programming mistake? 

    44. Name several ways to achieve efficiency in your program.

    45. What is the significance of the ‘OF’ in X=SUM (OF a1-a4, a6, a9); 

    46. What do the PUT and INPUT functions do? 

    47. Which date function advances a date, time or datetime value by a given interval?

    48. What do the MOD and INT function do? What do the PAD and DIM functions do?

    49. In ARRAY processing, what does the DIM function do?

    50. How would you determine the number of missing or nonmissing values in computations?

    51. What is the difference between calculating the ‘mean’ using the mean function and PROC MEANS?

    52. What are some differences between PROC SUMMARY and PROC MEANS?

    53. What is a problem with merging two data sets that have variables with the same name but different data?

    54. Which data set is the controlling data set in the MERGE statement?

    55. How do the IN= variables improve the capability of a MERGE?

    56. What techniques and/or PROCs do you use for tables?

    57. Do you prefer PROC REPORT or PROC TABULATE? Why?

    58. What is the difference between nodup and nodupkey options?

    59. What is the difference between compiler and interpreter?

    60. Code the table’s statement for a single level frequency?

    61. What is Enterprise Guide? What is the use of it? 

    62. How would you code a merge that will keep only the observations that have matches from both data sets?

    63. What are input dataset and output dataset options?

    64. How can u create zero observation dataset?

    65. What is the use of Proc SQl?

    66. What is SAS GRAPH?

    Building and Using SAS Macro Libraries

    While many users take advantage of the SAS® Macro Language, few take full advantage of its capabilities to build and maintain libraries of macros. Management of large numbers of macros can be problematic. 

    Names and locations must be remembered, changes must be managed, duplication and variations of individual macros must be monitored, and efficiency issues must be taken into consideration. These problems come even more to the forefront when macros are shared among programmers – especially in a networked environment. 

    Macro libraries allow you to control and manage the proliferation of your macros. Libraries can consist of a formal use of the %INCLUDE statement, a group of programs defining macros that can be automatically called, or even collections of macros that were previously compiled and then stored. 

    Macro libraries are extremely useful, and not really all that complicated. If you are not currently using them as part of your macro programming efforts, 

    Read entire paper on!


    http://www2.sas.com/proceedings/sugi27/p017-27.pdf