SlideShare a Scribd company logo
ADBMS LAB FILE




                AMITY SCHOOL OF ENGINEERING AND TECHNOLOGY



Submitted By:                          Submitted To:

Name: Punit Tripathi                   Faculty Guide: Ms. Parul Kalra Bhatia

Class/Section: 7 IT2 Y

Programme: Btech-IT (2008-2012)

Enrolment Number: A2305308127
Program No:1

WAP to input data in SAS

Data student;

Input Rollno,name$;

Datalines

23 parul

24 payal

25 priya

Proc print data=student;



Output:
Program No:2

WAP to input data into SAS using external text file

Data one;

Infile "C:Documents and SettingsAdministratorDesktoprishabstuff1.txt";

Input x y;

Datalines;

Data two;

input x y;

Datalines;

45

67

;

Data three;

set one two;

Proc print data=three;
Output:
Program No:3

WAP to list a file using delimiter comma

Option Nocentre;

data demo;

Infile "C:Documents and SettingsAdministratorDesktoprishabmydata.txt" dsd;

input gender$ age height weight;

Title"Listing :The file with delimiter comma";

Proc print data=demo;

Output:
Program No:4

WAP to demonstrate the use of columns in SAS

Data financial;

Infile "C:Documents and SettingsAdministratorDesktoprishabBank.txt";

input subj 1-3 dob$ 4-13

gender$ 14 balance 15-18

;

Title"Demonstrating Columns"

Proc print data=financial;

Output:
Program No:5

WAP to demonstrate the use of IN operator in SAS

data quizlange;

length gender$1 quiz$2;

input age gender midterm quiz finalexam;

if quiz in('A+' 'A' 'B+' 'B') then quizrange=1;

else if quiz in('B-' 'C+' 'C') then quizrange=2;

datalines;

21 M 80 B 92

  F 80 B+ 93

22 F 90 B 94

23 M 91 C- 95

25 F 92 C+ 96

run;

Title "Quiz-Range";

proc print data=quizlange;

OUTPUT:
Program No:6

WAP to demonstrate the Square and Square Root in SAS

data table;

do n=1 to 10;

square=n+n;

squareroot=sqrt(n);

output;

end;

run;

proc print data=table;

run;

OUTPUT:
Program No:7

WAP to demonstrate the use of select operator in SAS

data conditional;

length gender$1 quiz$2;

input age gender midterm quiz finalexam;

if age lt 20 and not missing(age) then agegroup=1;

else if age ge 20 and age lt 40 then agegroup=2;

else if age ge 40 and age lt 60 then agegroup=3;

else if age ge 60 then agegroup=4;

select(agegroup);

when(1) limit=110;

when(2) limit=120;

when(3) limit=130;

otherwise;

end;

datalines;

21 M 80 B 92

24 F 80 B+ 93

22 F 90 B 94

23 M 91 C- 95

25 F 92 C+ 96

;

proc print data=conditional;
OUTPUT:
Program No:8

WAP to demonstrate the Use of sum statements & iterative Do loop operator in SAS.

data compound;

interest =0.315;

total=100;

do year=1 to 3;

total= total+interest;

output;

end;

format total dollar10.2;

run;

proc print data=compound;

OUTPUT:
Program No:9

WAP to demonstrate the Use of If operator in SAS

Data females;

length gender$1 quiz$2;

Input age gender midterm quiz finalexam;

if gender eq 'F';

Datalines;

21 M 30 B 82

20 F 90 A 93

22 F 89 B 94

23 M 92 A 95

;

Proc print Data=females;

OUTPUT:
Program No:10

WAP to demonstrate the Use of If and else-if operator in SAS.

Data conditional;

length gender$1 quiz$2;

Input age gender midterm quiz finalexam;

if age lt 20 and not missing(age) then age group=1;

else if age ge 20 and age lt 40 then age group=2;

else if age ge 40 and age lt 60 then age group=3;

else if age ge 60 then age group=4;

Datalines;

21 M 30 B 82

20 F 90 A 93

22 F 89 B 94

23 M 92 A 95

;

Proc print Data=conditional;

OUTPUT:
Program No:11

WAP to demonstrate the Use of Do loop in SAS.

data grades;

length gender$1 quiz$2 agegrp$13;

infile "C:Documents and Settingsstudent1DesktopSASGrades.txt" missover;

input age gender midterm quiz final_exam;

if missing(age) then delete;

if age le 39 then do;

agegrp='younger gr';

grade=0.4*midterm+0.6*final_exam;

end;

else if age gt 39 then do;

agegrp='older grp';

grade=(midterm+final_exam)/2;

end;

run;

title "listing of grades";

proc print data=grades;

run;
Output:
Program No:12

WAP to demonstrate the Use of Do while loop in SAS.

data double;

interest=0.0375;

total=100;

do whiel(total le 200);

year+1;

total=total+interest*total;

output;

end;

format total dollar10.2;

run;

title"use of do while ";

proc print data=double;

run;
OUTPUT:
Program No:13

WAP to demonstrate the Use of Do until loop in SAS.

data double;

interest=0.0375;

total=100;

do until(total ge 200);

year+1;

total=total+interest*total;

output;

end;

format total dollar10.2;

run;

title "use of do until ";

proc print data=double;

run;
OUTPUT:
Program 14:

WAP to demonstrate the Use of leave and continue statement in SAS

Leave Statement:

data leave_it;



interest=0.0375;

total=100;

do year=1 to 100;

total=total+interest*total;

output;

if total ge 200 then leave;

end;

format total dollar10.2;

run;

title"leave statement";

proc print data=leave_it;

run;

OUTPUT:
Continue Statement:

data continue_on;

interest=0.0375;

total=100;

do year=1 to 100;

total=total+interest*total;

if total le 5000 then continue;

end;

title"continue statement";

proc print data=continue_on;

format total dollar10.2;

run;
OUTPUT:

More Related Content

Similar to Adbms lab file

CCE management system
CCE management systemCCE management system
CCE management system
Trish004
 
c programing
c programingc programing
c programing
bibek lamichhane
 
Sas code for examples from a first course in statistics
Sas code for examples from a first course in statisticsSas code for examples from a first course in statistics
Sas code for examples from a first course in statistics
Dr P Deepak
 
Statistical analytical programming for social media analysis .
Statistical analytical programming for social media analysis .Statistical analytical programming for social media analysis .
Statistical analytical programming for social media analysis .
Felicita Florence
 
Technical quiz 5#.pptx
Technical quiz 5#.pptxTechnical quiz 5#.pptx
Technical quiz 5#.pptx
kamalPatelposhala
 
1129 sas實習課
1129 sas實習課1129 sas實習課
1129 sas實習課
WenSheng Chang
 
About decision tree induction which helps in learning
About decision tree induction  which helps in learningAbout decision tree induction  which helps in learning
About decision tree induction which helps in learning
GReshma10
 
Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in c
BUBT
 
Learning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 Solution
Learning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 SolutionLearning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 Solution
Learning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 Solution
Vibeesh CS
 
Here is the grading matrix where the TA will leave feedback. If you .docx
Here is the grading matrix where the TA will leave feedback. If you .docxHere is the grading matrix where the TA will leave feedback. If you .docx
Here is the grading matrix where the TA will leave feedback. If you .docx
trappiteboni
 
Java Basics - Part1
Java Basics - Part1Java Basics - Part1
Java Basics - Part1
Vani Kandhasamy
 
Data Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learnData Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learn
Asim Jalis
 
SAS cheat sheet
SAS cheat sheetSAS cheat sheet
SAS cheat sheet
Ali Ajouz
 
C language concept with code apna college.pdf
C language concept with code apna college.pdfC language concept with code apna college.pdf
C language concept with code apna college.pdf
mhande899
 
White-Box Testing on Methods
White-Box Testing on MethodsWhite-Box Testing on Methods
White-Box Testing on Methods
Minhas Kamal
 
Sw metrics for regression testing
Sw metrics for regression testingSw metrics for regression testing
Sw metrics for regression testing
Jyotsna Sharma
 
Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...
Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...
Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...
Accumulo Summit
 
LAB_MANUAL_cpl_21scheme-2.pdf
LAB_MANUAL_cpl_21scheme-2.pdfLAB_MANUAL_cpl_21scheme-2.pdf
LAB_MANUAL_cpl_21scheme-2.pdf
RavinReddy3
 
M2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
M2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiM2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
M2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
rakshithatan
 
29. Code an application program that keeps track of student informat.pdf
29. Code an application program that keeps track of student informat.pdf29. Code an application program that keeps track of student informat.pdf
29. Code an application program that keeps track of student informat.pdf
arishaenterprises12
 

Similar to Adbms lab file (20)

CCE management system
CCE management systemCCE management system
CCE management system
 
c programing
c programingc programing
c programing
 
Sas code for examples from a first course in statistics
Sas code for examples from a first course in statisticsSas code for examples from a first course in statistics
Sas code for examples from a first course in statistics
 
Statistical analytical programming for social media analysis .
Statistical analytical programming for social media analysis .Statistical analytical programming for social media analysis .
Statistical analytical programming for social media analysis .
 
Technical quiz 5#.pptx
Technical quiz 5#.pptxTechnical quiz 5#.pptx
Technical quiz 5#.pptx
 
1129 sas實習課
1129 sas實習課1129 sas實習課
1129 sas實習課
 
About decision tree induction which helps in learning
About decision tree induction  which helps in learningAbout decision tree induction  which helps in learning
About decision tree induction which helps in learning
 
Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in c
 
Learning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 Solution
Learning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 SolutionLearning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 Solution
Learning SAS With Example by Ron Cody :Chapter 16 to Chapter 20 Solution
 
Here is the grading matrix where the TA will leave feedback. If you .docx
Here is the grading matrix where the TA will leave feedback. If you .docxHere is the grading matrix where the TA will leave feedback. If you .docx
Here is the grading matrix where the TA will leave feedback. If you .docx
 
Java Basics - Part1
Java Basics - Part1Java Basics - Part1
Java Basics - Part1
 
Data Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learnData Science and Machine Learning Using Python and Scikit-learn
Data Science and Machine Learning Using Python and Scikit-learn
 
SAS cheat sheet
SAS cheat sheetSAS cheat sheet
SAS cheat sheet
 
C language concept with code apna college.pdf
C language concept with code apna college.pdfC language concept with code apna college.pdf
C language concept with code apna college.pdf
 
White-Box Testing on Methods
White-Box Testing on MethodsWhite-Box Testing on Methods
White-Box Testing on Methods
 
Sw metrics for regression testing
Sw metrics for regression testingSw metrics for regression testing
Sw metrics for regression testing
 
Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...
Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...
Accumulo Summit 2015: Using D4M for rapid prototyping of analytics for Apache...
 
LAB_MANUAL_cpl_21scheme-2.pdf
LAB_MANUAL_cpl_21scheme-2.pdfLAB_MANUAL_cpl_21scheme-2.pdf
LAB_MANUAL_cpl_21scheme-2.pdf
 
M2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
M2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiM2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
M2 (1).pptxisedepofengiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
 
29. Code an application program that keeps track of student informat.pdf
29. Code an application program that keeps track of student informat.pdf29. Code an application program that keeps track of student informat.pdf
29. Code an application program that keeps track of student informat.pdf
 

Recently uploaded

Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
Edge AI and Vision Alliance
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
Safe Software
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
BibashShahi
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 

Recently uploaded (20)

Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
“How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-eff...
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
Essentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation ParametersEssentials of Automations: Exploring Attributes & Automation Parameters
Essentials of Automations: Exploring Attributes & Automation Parameters
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Principle of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptxPrinciple of conventional tomography-Bibash Shahi ppt..pptx
Principle of conventional tomography-Bibash Shahi ppt..pptx
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 

Adbms lab file

  • 1. ADBMS LAB FILE AMITY SCHOOL OF ENGINEERING AND TECHNOLOGY Submitted By: Submitted To: Name: Punit Tripathi Faculty Guide: Ms. Parul Kalra Bhatia Class/Section: 7 IT2 Y Programme: Btech-IT (2008-2012) Enrolment Number: A2305308127
  • 2. Program No:1 WAP to input data in SAS Data student; Input Rollno,name$; Datalines 23 parul 24 payal 25 priya Proc print data=student; Output:
  • 3. Program No:2 WAP to input data into SAS using external text file Data one; Infile "C:Documents and SettingsAdministratorDesktoprishabstuff1.txt"; Input x y; Datalines; Data two; input x y; Datalines; 45 67 ; Data three; set one two; Proc print data=three;
  • 5. Program No:3 WAP to list a file using delimiter comma Option Nocentre; data demo; Infile "C:Documents and SettingsAdministratorDesktoprishabmydata.txt" dsd; input gender$ age height weight; Title"Listing :The file with delimiter comma"; Proc print data=demo; Output:
  • 6.
  • 7. Program No:4 WAP to demonstrate the use of columns in SAS Data financial; Infile "C:Documents and SettingsAdministratorDesktoprishabBank.txt"; input subj 1-3 dob$ 4-13 gender$ 14 balance 15-18 ; Title"Demonstrating Columns" Proc print data=financial; Output:
  • 8.
  • 9. Program No:5 WAP to demonstrate the use of IN operator in SAS data quizlange; length gender$1 quiz$2; input age gender midterm quiz finalexam; if quiz in('A+' 'A' 'B+' 'B') then quizrange=1; else if quiz in('B-' 'C+' 'C') then quizrange=2; datalines; 21 M 80 B 92 F 80 B+ 93 22 F 90 B 94 23 M 91 C- 95 25 F 92 C+ 96 run; Title "Quiz-Range"; proc print data=quizlange; OUTPUT:
  • 10. Program No:6 WAP to demonstrate the Square and Square Root in SAS data table; do n=1 to 10; square=n+n; squareroot=sqrt(n); output; end; run; proc print data=table; run; OUTPUT:
  • 11. Program No:7 WAP to demonstrate the use of select operator in SAS data conditional; length gender$1 quiz$2; input age gender midterm quiz finalexam; if age lt 20 and not missing(age) then agegroup=1; else if age ge 20 and age lt 40 then agegroup=2; else if age ge 40 and age lt 60 then agegroup=3; else if age ge 60 then agegroup=4; select(agegroup); when(1) limit=110; when(2) limit=120; when(3) limit=130; otherwise; end; datalines; 21 M 80 B 92 24 F 80 B+ 93 22 F 90 B 94 23 M 91 C- 95 25 F 92 C+ 96 ; proc print data=conditional;
  • 13. Program No:8 WAP to demonstrate the Use of sum statements & iterative Do loop operator in SAS. data compound; interest =0.315; total=100; do year=1 to 3; total= total+interest; output; end; format total dollar10.2; run; proc print data=compound; OUTPUT:
  • 14. Program No:9 WAP to demonstrate the Use of If operator in SAS Data females; length gender$1 quiz$2; Input age gender midterm quiz finalexam; if gender eq 'F'; Datalines; 21 M 30 B 82 20 F 90 A 93 22 F 89 B 94 23 M 92 A 95 ; Proc print Data=females; OUTPUT:
  • 15. Program No:10 WAP to demonstrate the Use of If and else-if operator in SAS. Data conditional; length gender$1 quiz$2; Input age gender midterm quiz finalexam; if age lt 20 and not missing(age) then age group=1; else if age ge 20 and age lt 40 then age group=2; else if age ge 40 and age lt 60 then age group=3; else if age ge 60 then age group=4; Datalines; 21 M 30 B 82 20 F 90 A 93 22 F 89 B 94 23 M 92 A 95 ; Proc print Data=conditional; OUTPUT:
  • 16. Program No:11 WAP to demonstrate the Use of Do loop in SAS. data grades; length gender$1 quiz$2 agegrp$13; infile "C:Documents and Settingsstudent1DesktopSASGrades.txt" missover; input age gender midterm quiz final_exam; if missing(age) then delete; if age le 39 then do; agegrp='younger gr'; grade=0.4*midterm+0.6*final_exam; end; else if age gt 39 then do; agegrp='older grp'; grade=(midterm+final_exam)/2; end; run; title "listing of grades"; proc print data=grades; run;
  • 18. Program No:12 WAP to demonstrate the Use of Do while loop in SAS. data double; interest=0.0375; total=100; do whiel(total le 200); year+1; total=total+interest*total; output; end; format total dollar10.2; run; title"use of do while "; proc print data=double; run;
  • 20. Program No:13 WAP to demonstrate the Use of Do until loop in SAS. data double; interest=0.0375; total=100; do until(total ge 200); year+1; total=total+interest*total; output; end; format total dollar10.2; run; title "use of do until "; proc print data=double; run;
  • 22. Program 14: WAP to demonstrate the Use of leave and continue statement in SAS Leave Statement: data leave_it; interest=0.0375; total=100; do year=1 to 100; total=total+interest*total; output; if total ge 200 then leave; end; format total dollar10.2; run; title"leave statement"; proc print data=leave_it; run; OUTPUT:
  • 23. Continue Statement: data continue_on; interest=0.0375; total=100; do year=1 to 100; total=total+interest*total; if total le 5000 then continue; end; title"continue statement"; proc print data=continue_on; format total dollar10.2; run;