Hi all,
I have attached input excel data file & desired output as well.
i have an id 'plan package' for multiple events (Event column )and datetype flag as 'Sch' and 'Act'. if an id has two records as 'Act' & 'Sch' then it should be considered as complete records & no need to have it in output.
outcome which i want is if 'Act' is not available & only 'Sch' is available for a record then on the basis of its 'Plan package' & Event its 'Date' should be replaced accordingly previous 'Act' flag record.
Let me know if any other details are required.
Regard,
Ashish
Can you post a small part example data in the form of a data step instead? Makes it so much easier to help you.
DATA WORK.INPUT0001;
LENGTH
PlanPackage $ 6
Discipline $ 10
Dates 8
Events $ 11
DateType $ 3 ;
FORMAT
PlanPackage $CHAR6.
Discipline $CHAR10.
Dates DATE9.
Events $CHAR11.
DateType $CHAR3. ;
INFORMAT
PlanPackage $CHAR6.
Discipline $CHAR10.
Dates DATE9.
Events $CHAR11.
DateType $CHAR3. ;
INFILE DATALINES4
DLM='7F'x
MISSOVER
DSD ;
INPUT
PlanPackage : $CHAR6.
Discipline : $CHAR10.
Dates : BEST32.
Events : $CHAR11.
DateType : $CHAR3. ;
DATALINES4;
007EUCElectrical20691Stage oneSch
007EUCElectrical20620Stage oneAch
007EUCElectrical20730Stage twoSch
007EUCElectrical20670Stage threeSch
007EUCElectrical20670Stage threeAch
007EUCElectrical20670Stage fourSch
007EUCElectrical20620Stage fiveSch
007EUCElectrical20573Stage fiveAch
007ZAElectrical20606Stage oneSch
007ZAElectrical20657Stage twoSch
007ZAElectrical20529Stage twoAch
;;;;
Output snap has been attached with Data steps.
Please post the data you have and what you want as text, i won't open excel-files. See How to convert datasets to data steps for details.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.