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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.