FLOWOVER | MISSOVER | TRUNCOVER | STOPOVER | SCANOVER | DLM | DSD

Sdílet
Vložit
  • čas přidán 21. 08. 2024
  • SAS - FLOWOVER | MISSOVER | TRUNCOVER | STOPOVER | SCANOVER | DLM | DSD

Komentáře • 10

  • @josephjesudas9907
    @josephjesudas9907 Před 4 lety

    Please make more videos ... easy to understand the concepts 👍

  • @ajaykushwaha4233
    @ajaykushwaha4233 Před rokem

    Best explanation ever

  • @babitaattri5000
    @babitaattri5000 Před 4 lety

    Nice explaination

  • @anupamdagar5961
    @anupamdagar5961  Před 4 lety

    Hi, if you have any queries then pls write in comment

    • @anupamdagar5961
      @anupamdagar5961  Před 4 lety

      data test;
      infile "/home/sehda730/Mydata.txt" truncover;
      input Name $9. State $20.;
      run;
      proc print data=test;
      run;
      Ram Delhi
      Kamal
      Rajkumar Tamilnadu
      Rahul Punjab
      data test;
      infile cards missover;
      input Name $9. State $12.;
      cards;
      Ram Delhi
      Kamal
      Rajkumar Tamilnadu
      Rahul Punjab
      ;run;
      proc print data=test;
      run;
      /*******Stopover*******************/
      data test;
      infile cards stopover;
      input name$ score;
      cards;
      Ram 100
      Kamal
      Rahul 1200
      ;run;
      proc print data=test;
      run;
      /*
      DLM: Delimiter
      DSD: Delimiter Sensitive Data
      */
      /**************** DLM & DSD*****************/
      data labs;
      infile cards dlm=",";
      input sl centre$ trial$ sub;
      cards;
      1 appolo phase1 78
      2 nim phase1 89
      3 care phase3 56
      4 appolo phase2 34
      5 nims care 79
      6 care phase2 59
      7 appolo phase1 76
      ;run;
      proc print data=labs;
      run;
      /**************** DLM & DSD*****************/
      data labs;
      infile cards dlm="$," dsd;
      input sl centre$ trial$ sub;
      cards;
      1,appolo,phase1,78
      2,$'phase1',89
      3,applolo,phase3,56
      4,appolo,phase2,34
      5,nims,"phase2",79
      6,care,phase2,59
      7,appolo,phase1,76
      ;run;
      proc print data=labs;
      run;
      /**************** DLM & DSD*****************/
      data labs;
      infile cards dlm='-@,#%$"" ';
      input sl centre$ trial$ sub;
      cards;
      1-appolo-phase1-78
      2-$nim-phase1-89
      3-care phase3-56
      4-appolo-%phase2-34
      5-nims"phase4"-79
      6-@care-phase2#-59
      7-appolo-phase1,76
      ;run;
      proc print data=labs;
      run;
      proc print data=labs;
      run;
      /**************** DLM & DSD*****************/
      data labs;
      infile cards dlm='&,' ;
      input sl centre$ trial$ sub;
      cards;
      1&appolo&phase1&78
      2&nim&phase1&89
      3&care&phase3&56
      4&appolo&phase2&34
      5&nims&phase2&79
      6&care&phase2&59
      7&appolo&phase1&76
      ;run;
      proc print data=labs;
      run;
      /**************** DLM & DSD*****************/
      data labs;
      infile cards dlm=',&%@' dsd;
      input sl centre$ trial$ sub;
      cards;
      1,appolo,'phase1',78
      2,,phase1,89
      3,@phase3,56
      4,appolo,phase2,34
      5,nims,phase2,79
      6,care,phase2%59
      7,appolo,phase1,76
      ;run;
      proc print data=labs;
      run;
      Differance of DSD & DLM
      1. DSD is used for comma & quotations
      2. DSD can handle consecutive delimiters as missing value
      /**************** Flowover & Missover*****************/
      data trials;
      infile cards missover;
      input slno centre$ trial$ sub;
      cards;
      1 appolo phase1 78
      2 nims 89
      3 care phase3 56
      4 appolo phase2 .
      5 nims phase2 79
      6 care phase3 .
      7 appolo phase1 76
      ;run;
      proc print data=trials;
      run;

  • @namanverma6509
    @namanverma6509 Před 4 lety +1

    Bhai ,not able to understand the difference between missover and truncover....

    • @anupamdagar5961
      @anupamdagar5961  Před 4 lety +2

      Hi, you can understand it like if variable value length is less than what you have assigned then missover will get fail but truncover will work in that case. Request to re watch the video if still not able to get it then send me your code on which you are not getting expected output.

    • @namanverma6509
      @namanverma6509 Před 4 lety +1

      @@anupamdagar5961 thnx bro.and why don't you upload more videos on SAS ??

  • @manikantach545
    @manikantach545 Před 3 lety

    BRO CAN YOU EXPLAIN HOW SAS READS DATA WHEN MULTIPLE INPUT STATEMENTS WRITTEN CONDITIONALLY IN DATA STEP

  • @anupamdagar5961
    @anupamdagar5961  Před 4 lety +1

    data test;
    infile "/home/sehda730/Mydata.txt" truncover;
    input Name $9. State $20.;
    run;
    proc print data=test;
    run;
    Ram Delhi
    Kamal
    Rajkumar Tamilnadu
    Rahul Punjab
    data test;
    infile cards missover;
    input Name $9. State $12.;
    cards;
    Ram Delhi
    Kamal
    Rajkumar Tamilnadu
    Rahul Punjab
    ;run;
    proc print data=test;
    run;
    /*******Stopover*******************/
    data test;
    infile cards stopover;
    input name$ score;
    cards;
    Ram 100
    Kamal
    Rahul 1200
    ;run;
    proc print data=test;
    run;
    /*
    DLM: Delimiter
    DSD: Delimiter Sensitive Data
    */
    /************** DLM & DSD*****************/
    data labs;
    infile cards dlm=",";
    input sl centre$ trial$ sub;
    cards;
    1 appolo phase1 78
    2 nim phase1 89
    3 care phase3 56
    4 appolo phase2 34
    5 nims care 79
    6 care phase2 59
    7 appolo phase1 76
    ;run;
    proc print data=labs;
    run;
    /************** DLM & DSD*****************/
    data labs;
    infile cards dlm="$," dsd;
    input sl centre$ trial$ sub;
    cards;
    1,appolo,phase1,78
    2,$'phase1',89
    3,applolo,phase3,56
    4,appolo,phase2,34
    5,nims,"phase2",79
    6,care,phase2,59
    7,appolo,phase1,76
    ;run;
    proc print data=labs;
    run;
    /************** DLM & DSD*****************/
    data labs;
    infile cards dlm='-@,#%$"" ';
    input sl centre$ trial$ sub;
    cards;
    1-appolo-phase1-78
    2-$nim-phase1-89
    3-care phase3-56
    4-appolo-%phase2-34
    5-nims"phase4"-79
    6-@care-phase2#-59
    7-appolo-phase1,76
    ;run;
    proc print data=labs;
    run;
    proc print data=labs;
    run;
    /************** DLM & DSD*****************/
    data labs;
    infile cards dlm='&,' ;
    input sl centre$ trial$ sub;
    cards;
    1&appolo&phase1&78
    2&nim&phase1&89
    3&care&phase3&56
    4&appolo&phase2&34
    5&nims&phase2&79
    6&care&phase2&59
    7&appolo&phase1&76
    ;run;
    proc print data=labs;
    run;
    /************** DLM & DSD*****************/
    data labs;
    infile cards dlm=',&%@' dsd;
    input sl centre$ trial$ sub;
    cards;
    1,appolo,'phase1',78
    2,,phase1,89
    3,@phase3,56
    4,appolo,phase2,34
    5,nims,phase2,79
    6,care,phase2%59
    7,appolo,phase1,76
    ;run;
    proc print data=labs;
    run;
    Differance of DSD & DLM
    1. DSD is used for comma & quotations
    2. DSD can handle consecutive delimiters as missing value
    /************** Flowover & Missover*****************/
    data trials;
    infile cards missover;
    input slno centre$ trial$ sub;
    cards;
    1 appolo phase1 78
    2 nims 89
    3 care phase3 56
    4 appolo phase2 .
    5 nims phase2 79
    6 care phase3 .
    7 appolo phase1 76
    ;run;
    proc print data=trials;
    run;