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.
Please make more videos ... easy to understand the concepts 👍
Best explanation ever
Nice explaination
Hi, if you have any queries then pls write in comment
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;
Bhai ,not able to understand the difference between missover and truncover....
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.
@@anupamdagar5961 thnx bro.and why don't you upload more videos on SAS ??
BRO CAN YOU EXPLAIN HOW SAS READS DATA WHEN MULTIPLE INPUT STATEMENTS WRITTEN CONDITIONALLY IN DATA STEP
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;