SAS Certification Part 25 Infile Statement

Sdílet
Vložit
  • čas přidán 21. 08. 2024
  • SAS Certification Part 25 Infile Statement
    Export data
    • Create a simple raw data file by using the EXPORT procedure as an alternative to the DATA step.
    • Export data to Microsoft Excel using the SAS/ACCESS XLSX engine.
    Infile Statement
    Specifies an external file to read with an INPUT statement.
    INFILE file-specification
    device-type
    options
    operating-environment-options;
    data scores;
    infile datalines delimiter=',' ;
    input test1 test2 test3;
    datalines;
    91,87,95
    97,,92
    ,1,1
    ;
    /*
    Create a simple raw data file by using the EXPORT procedure
    as an alternative to the DATA step.
    */
    Data Scores;
    infile datalines delimiter=',';
    input test1 test2 test3;
    datalines;
    91,87,95
    97,,92
    ,1,1
    ;
    Run;
    Proc Print Data=scores;
    Run;
    title 'Scores in Missover Statement';
    Data Scores;
    infile datalines delimiter=',' Missover;
    input test1 test2 test3;
    datalines;
    91,87,95
    97,,92
    ,1,1
    ;
    Run;
    Proc Print Data=scores;
    Run;
    data ex6;
    informat id 1. name $9. salary1 comma10. salary2 comma10. date ddmmyy10.;
    format salary1 comma10. salary2 comma10.2 date ddmmyy10.;
    infile "/folders/myfolders/sasuser.v94/fileC.txt" missover;
    input id name $ salary1:comma10. salary2:comma10. date ddmmyy10.;
    run;
    Proc Print Data=ex6;
    Run;
    data ex7;
    informat id $5. num1 $2. num2 $2. num3 $2. num4 $2. k$1. ;
    infile "/folders/myfolders/sasuser.v94/fileD.txt" dlm="x" missover;
    input id $ @6 num1 num2 num3 num4 k ;
    run;
    Proc Print Data=ex7
    Run;
    proc export data=sashelp.class
    outfile="/folders/myfolders/sasuser.v94/class.csv"
    dbms=dlm replace;
    delimiter='&';
    run;

Komentáře • 8

  • @freeenglishbuddyonskype1666
    @freeenglishbuddyonskype1666 Před 7 měsíci +1

    Your voice is similar to me

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

    👆Nice video Dost🤗🤗

  • @WorldFactsFast
    @WorldFactsFast Před 4 lety

    MISSOVER is not sufficient for datasets where there are two commas in a row representing a missed value. for this the DSD option is required. would be useful if you included in your video as the current video may insufficiently prepare people

  • @shailendrapatel938
    @shailendrapatel938 Před rokem +1

    Can you please provide me SAS Base certification practice question paper?
    If there are any charges then I will pay you.

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

    hi sharma , how to read this type of data
    data mahesh;
    input name$ sex$ age;
    datalines;
    mahesh m 34
    chintha mahesh m 32
    chinthamaheshchintha m 32
    ;
    run;
    proc print data=mahesh;
    run;

  • @sivarams7648
    @sivarams7648 Před 4 lety

    Pls post in English