Post Your Question Here

You can post your queries/question/feedback here..........!


38 comments:

  1. How to remove directory by SAS prog

    ReplyDelete
    Replies
    1. /* Macro to Remove a PC directory */

      %macro RemoveDir(dir);
      options noxwait; /* Option noxwait specifies that the command processor automatically returns to the SAS session
      after the specified command is executed. You do not have to type EXIT... */

      %local rc fileref ;
      %let rc = %sysfunc(filename(fileref,&dir)) ; /* This sysfunc and the filename statements check for the existence of the directory */
      %if %sysfunc(fexist(&fileref)) %then
      %do;
      %put Removing directory &dir....;
      %sysexec rmdir /Q /S "&dir" ; /* Options /Q for quiet mode with no prompting and /S for removing sub directories */
      %if &sysrc eq 0 %then
      %put The directory &dir and its sub-directories have been Deleted. ;
      %else
      %put There was a problem while Removing the directory &dir;
      %end;
      %else %put The directory &dir does NOT EXIST;
      %mend RemoveDir

      Delete
  2. I will update the ans soon.

    ReplyDelete
  3. Hi I would need some training on SAS Advance. Can you pls contact me in +91 9884944799 or share your details

    ReplyDelete
  4. Sure you can contact me on 9015943944

    ReplyDelete
  5. How to find number of variable in dataset using data step?

    ReplyDelete
    Replies
    1. Try This.

      data nn ;
      set sashelp.class nobs=a;
      new =a;
      keep new;
      run ;
      proc print ; run ;

      Delete
    2. data nn;
      set your.dataset;
      run;

      check log, you will see number of observations and variables.

      Delete
  6. I think this is the best way of counting number of variables

    %let nvar=%sysfunc(attrn(%sysfunc(open(lib.datasetname,i)),nvars));
    %put &nvar;

    ReplyDelete
  7. Hi,
    I have a very basic question regarding user defined formats, I have formats in a file and I want to read that in a SAS DI job and then use it in an expression.
    Can you please give me the steps for it.
    Thanks,
    Ashish

    ReplyDelete
    Replies
    1. Hi Ashish ,

      You can try these steps.

      Specify a Format Library in a Preprocess to a Job
      SAS Data Integration Studio users can specify the location of the format library in a
      preprocess to a job. The preprocess would consist of SAS statements such as the following:
      Options fmtsearch=(myformat library work);
      libname myformat "C:\formats\myformats";
      The SAS Application Server that executes the job must be able to resolve the path that you
      specify in the LIBNAME statement for the format library.
      The following steps describe one way to specify a format library in a preprocess to a job:
      1. From the SAS Data Integration Studio desktop, select the job you want to update, then
      select Edit ð Properties from the menu bar. The property window for the job displays.
      2. Click the Precode and Postcode tab, and then select the Precode check box.
      3. In the code panel, enter a FMTSEARCH option and a LIBNAME statement that are
      similar to the previous example code.
      4. To save the precode in metadata, click OK. To save the precode to a file, click Save
      As, specify a server and filename for the code, and then click OK.
      When you execute the job, the preprocess code runs first and the specified format library
      becomes available when the rest of the job executes.

      Hope I answered your question

      Thanks ,
      Nitin Kumar

      Delete
  8. hi nitin ,i'm preparing for SAS DI STUDIO cetification.Do you have any material to prepare for certification.I have only user guide.
    Please let me know how to prepare...any books,suggestions,blogs....Could you please send material to purnaganti@gmail.com

    ReplyDelete
    Replies
    1. HI Purna ,

      Thanks for visiting my blog.

      I would prefer you to do practice on SAS DI studio because most of the question comes from transformation property.
      Practice in DI studio will help you a lot rather than reading books.

      All the best for your exam.

      Thanks Nitin

      Delete
  9. Hello i am new to SAS could you suggest me where can i get the basic SAS Software for learning SAS

    ReplyDelete
    Replies
    1. Hello Durga ,

      Thanks for visiting my blog.

      You can find the link below for free Educational SAS software.

      Thanks
      Nitin Kumar

      Delete
    2. http://sastrick.blogspot.in/2014/05/free-official-sas-software-for-students.html

      Delete
  10. Hi Nitin,

    I am planning to give SAS BI content developer certification. Could you please let me know how to prepare...any books,suggestions,blogs etc.

    Thanks in advance.

    Thanks & Regards,
    Abhishek

    ReplyDelete
    Replies
    1. Hi Abhi ,

      Sorry , but I don't have enough content for SAS BI certification but BI and DI certification exam pattern is almost same.As I did the SAS DI certification I will suggest you to do more practice on SAS BI tools because in exam you will find the question from SAS all BI tools (Properties , option , wizard)

      Thanks
      Nitin

      Delete
  11. Hi Nitin,

    I want to do SAS certification, but i dont have sas software. So what to do?
    Practice recquired?

    ReplyDelete
  12. Some tricky questions i came across today -


    1) ods csvall body='c:\test\csvall.csv';
    proc print data=test;
    by sex;
    run;
    ods csvall close;

    Q : can the output file be open only in text editor or excel or both ?


    2)
    data test;
    test abc;
    if x < 10 then x=1;
    else if x < 20 then x = 2;
    else x = 3 ;
    run;
    Q : what is the value of x if x initially had a missing value

    3)
    data test ;
    set abc ;
    retain city = 'somebigcityname';
    state = 'somebigstatename';
    run;

    Q : waht is true
    i) both retain and assign statement are different way of assigning value and are as effective
    ii) retain assigns onces and assign statement assings value of state 5 times ...
    ii) retain statement will cause truncation because length is not set, so default of 8 length will be created.

    ReplyDelete
  13. Hi Nithin,

    Hope you are doing good!

    I have completed my Advance SAS certification recently. Since I had few years of SAS platform Admin experience in the past I am now planning to take SAS Platform Admin certification soon.

    But unfortunately I am not able to find too much of the ppl discussing over blogs on this particular certification.

    If you could let me know the best training materials for this and some latest questions if you have, it will be very useful.

    Thank you.

    Regards,
    Ram

    ReplyDelete
    Replies
    1. Hello Ram ,

      Thanks for visiting my blog.Regarding SAS Admin I really do not have any good study material , but If I will find something I will forward to you.

      Regards,
      Nitin

      Delete
  14. Anyone have dumps for A00-211????

    ReplyDelete
  15. ANY QUESTIONS FOR SAS SBA.

    ReplyDelete
    Replies
    1. Sorry Friend don't have any material for SAS SBA, If I will find something I will post on my blog.
      Thanks for visiting the blog.

      Thanks ,
      Nitin Kumar

      Delete
  16. Hi Nitin, I am preparing for Advance SAS certification and m done with preparation guide and dumps available on various sites (including this). is it sufficient? As i have read in some comments here that they have now changed the pattern. any idea on this.

    ReplyDelete
    Replies
    1. Hello ,

      Thanks for positing your question.

      It is true that question has been changed , now there are some question like more than 2 correct ans and in some of the ques you have to type the ans.

      If you are preparing for the advance SAS , give more time to programming efficiency technique.

      Hope I answered your ques

      Thanks ,
      Nitin

      Delete
  17. Hi , my qs is let's say one variable i.e. ID has values like 1,4,6,10,13,45,101,103,132,145 and i want to put a leading zero for the values which are less than 10, how to do it?
    thanks in Advance

    ReplyDelete
    Replies
    1. Hi Prasant ,

      Thanks for visiting my blog.

      If I correctly understood your question below the code you can try.

      data aa ;
      input id $;
      if id <10 then id = cat('0',id);
      datalines ;
      1
      2
      4
      7
      12
      56
      9
      2
      ;

      run ;

      Thanks ,
      Nitin Kumar

      Delete
    2. but here in this data step we need to convert character to numeric and than apply if condition...

      Delete
  18. Above code will do automatic conversion.
    Please run the code and let me know if you have still some doubts.

    Nitin

    ReplyDelete
  19. Usually how scan function separates the character words from character expression??

    ReplyDelete
    Replies
    1. It's depends which parameter are you passing in scan function else it will take a list of special characters as a parameter like ':) /-_# and will give the result according

      Delete
  20. Hi
    I was wondering is it enough to prepared Advanced SAS Certification in your blog

    ReplyDelete
    Replies
    1. Unfortunately I haven't covered all the topic but my post will definitely help you a lot to prepare for Advance certification

      Thanks,
      Nitin Kumar

      Delete
  21. How to replicate DDE functionality using UNIX SAS?

    ReplyDelete
    Replies
    1. Sorry , I haven't tried this.

      Delete