Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DATA MYDATA3; INPUT MAJOR $30.; DATALINES; MATHS AND ENGLISH HISTORY AND GEOGRAPHY RELIGION AND BIOLOGY CHEMISTRY AND PHYSICS HEALTH AND FILM ; RUN; DATA MYDATA4;
DATA MYDATA3; INPUT MAJOR $30.; DATALINES; MATHS AND ENGLISH HISTORY AND GEOGRAPHY RELIGION AND BIOLOGY CHEMISTRY AND PHYSICS HEALTH AND FILM ; RUN; DATA MYDATA4; SET MYDATA3; /* Find the position of "AND" */ X = FIND(MAJOR, "AND", "I"); /* Extract the first and second majors */ FIRSTMAJOR = SCAN(MAJOR, 1, 'AND'); SECONDMAJOR = SCAN(MAJOR, 2, 'AND'); RUN
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started