35.DLM,DSD AND MISSOVER

                                   35.DLM,DSD AND MISSOVER


CODE:  LIBNAME RIXAN "C:\Users\Lenovo\Desktop\RIXAN";

LOG:

NOTE: Libref RIXAN was successfully assigned as follows:

             Engine:        V9

             Physical Name: C:\Users\Lenovo\Desktop\RIXAN


1.DATA AND SET METHOD:

 DATA A0;
 SET SASHELP.CLASS4;
 RUN;
PROC PRINT;RUN;


LOG:

NOTE: There were 19 observations read from the data set SASHELP.CLASS4.
NOTE: The data set WORK.A0 has 19 observations and 8 variables.
NOTE: DATA statement used (Total process time):
      real time           0.26 seconds
      cpu time            0.04 seconds
NOTE: Writing HTML Body file: sashtml.htm

NOTE: There were 19 observations read from the data set WORK.A0.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           1.03 seconds
      cpu time            0.29 seconds

RESULT:

Obs Name Sex Age Height Weight DOB CLASS GRADE
1 Alfred M 14 69 112.5 12OCT2009 9 A
2 Alice F 13 56.5 84 12MAR2010 8 B
3 Barbara F 13 65.3 98 14DEC2010 8 C
4 Carol F 14 62.8 102.5 12NOV2009 9 B
5 Henry M 14 63.5 102.5 14NOV2009 9 C
6 James M 12 57.3 83 15MAR2011 7 A
7 Jane F 12 59.8 84.5 17APR2011 7 A
8 Janet F 15 62.5 112.5 14NOV2009 10 A
9 Jeffrey M 13 62.5 84 15APR2010 8 B
10 John M 12 59 99.5 15JUN2011 7 A
11 Joyce F 11 51.3 50.5 17DEC2012 6 C
12 Judy F 14 64.3 90 18DEC2010 9 A
13 Louise F 12 56.3 77 14NOV2011 7 A
14 Mary F 15 66.5 112 15DEC2009 10 A
15 Philip M 16 72 150 16APR2008 11 B
16 Robert M 12 64.8 128 14DEC2011 7 C
17 Ronald M 15 67 133 12MAR2009 10 A
18 Thomas M 11 57.5 85 14MAY2012 6 A
19 William M 15 66.5 112 15FEB2009 10 C



2.DATA INPUT AND DATALINES METHOD:

DATA A1;
INPUT NAME$ SEX$ MARKS;
CARDS;
MANISH M 120
FALGUNA F 140
;
RUN;
PROC PRINT;
RUN;


LOG:

NOTE: The data set WORK.A1 has 2 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.07 seconds
      cpu time            0.00 seconds

NOTE: There were 2 observations read from the data set WORK.A1.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.06 seconds
      cpu time            0.00 seconds

RESULT:

Obs NAME SEX MARKS
1 MANISH M 120
2 FALGUNA F 140


3.DATA INFILE AND INPUT METHOD:

DSD & MISSOVER: IF THERE IS ANY MISSING VALUES IN THE DATA THEN APPLY DSD AND MISSOVER..
MISSOVER USED IF THE DATA/OBSERVATIONS  MISSED IN THE LAST THEN APPLY MISSOVER..

DATA A2;
INFILE "C:\Users\Lenovo\Desktop\ SAS - Copy (3).txt" DSD MISSOVER;
INPUT NAME$ AGE SEX$ COMPANY$;
RUN;
PROC PRINT;
RUN;

LOG:

NOTE: The infile "C:\Users\Lenovo\Desktop\ SAS - Copy (3).txt" is:
            Filename=C:\Users\Lenovo\Desktop\SAS - Copy (3).txt,
           RECFM=V,LRECL=32767,File Size (bytes)=131,
           Last Modified=23 July 2023 14:55:17,
            Create Time=07 July 2023 12:14:23

NOTE: 9 records were read from the infile "C:\Users\Lenovo\Desktop\SAS - Copy (3).txt".
            The minimum record length was 8.
           The maximum record length was 15.
NOTE: The data set WORK.A2 has 9 observations and 4 variables.
NOTE: DATA statement used (Total process time):
            real time           0.12 seconds
           cpu time            0.01 seconds


NOTE: There were 9 observations read from the data set WORK.A2.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds


RESULT:

ObsNAMEAGESEXCOMPANY
1DARSHI22MKKL
2RAM25M 
3RAHIM26 KYC
4HIMA21FPOB
5RAJU15  
6RANGA22MLLM
7KALYANI.FDDD
8JAGAN25  
9SARU.F 

DSD:(DELIMITED SENSITIVE DATA)
IF THERE IS ANY MISSING VALUES IN THE MIDDLE OF THE DATA THEN APPLY DSD

DATA A3;
INFILE "C:\Users\Lenovo\Desktop\ SAS - Copy (2).txt" DSD;
INPUT NAME$ AGE SEX$ COMPANY$;
RUN;
PROC PRINT;
RUN;


LOG:

NOTE: The infile "C:\Users\Lenovo\Desktop\SAS - Copy (2).txt" is:
            Filename=C:\Users\Lenovo\Desktop\SAS - Copy (2).txt,
            RECFM=V,LRECL=32767,File Size (bytes)=121,
            Last Modified=23 July 2023 14:48:09,
           Create Time=07 July 2023 12:14:02

NOTE: 8 records were read from the infile "C:\Users\Lenovo\Desktop\SAS - Copy (2).txt".
           The minimum record length was 11.
           The maximum record length was 17.
NOTE: The data set WORK.A3 has 8 observations and 4 variables.
NOTE: DATA statement used (Total process time):
             real time           0.07 seconds
            cpu time            0.00 seconds

NOTE: There were 8 observations read from the data set WORK.A3.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.06 seconds
      cpu time            0.00 seconds

RESULT:

ObsNAMEAGESEXCOMPANY
1ram. ABC
2RAHIM25 KYC
3HIMA21 POB
4RAJU25  
5hema22 ROB
6James. LPU
7JYO22FKKK
8GANI25MLLM

DLM:(DELIMITER)
IF THERE IS ANY SPECIAL CHARACTER LIKE *,\ THEN APPLY DLM ..

DATA A4;
INFILE "C:\Users\Lenovo\Desktop\SAS - Copy.txt" DLM='@$,';
INPUT NAME$ AGE SEX$ COMPANY$;
RUN;
PROC PRINT;
RUN;

NOTE: The infile "C:\Users\Lenovo\Desktop\SAS - Copy.txt" is:
            Filename=C:\Users\Lenovo\Desktop\SAS - Copy.txt,
           RECFM=V,LRECL=32767,File Size (bytes)=65,
           Last Modified=17 July 2023 15:29:56,
          Create Time=07 July 2023 12:13:41

NOTE: 5 records were read from the infile "C:\Users\Lenovo\Desktop\SAS - Copy.txt".
           The minimum record length was 0.
           The maximum record length was 15.
NOTE: SAS went to a new line when INPUT statement reached past the end of a line.
NOTE: The data set WORK.A4 has 4 observations and 4 variables.
NOTE: DATA statement used (Total process time):
           real time           0.07 seconds
          cpu time            0.03 seconds

NOTE: There were 4 observations read from the data set WORK.A4.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.06 seconds
      cpu time            0.00 seconds

RESULT:

Obs NAME AGE SEX COMPANY
1 RAM 25 M ABC
2 RAHIM 12 M KYC
3 HIMA 21 F POB
4 RAJU 15 M JYC


--PLEASE FOLLOW THE BLOG FOR MORE INFO....

--JOIN US IN FACEBOOK AND TELEGRAM CHANNEL FOR MORE UPDATES

   CLICK HERE: https://t.me/SasAll4You

Comments