I have an AE dataset and need to create 3 variables, lasteventfl, aegroup and firstdt, per the following specs: Step 1: Sort Data BY subject aesoccalc aeptcalc temporary_suppae_qval_ctcae temporary_ae_aeterm aestdat visno recordid Step 2: Fill Missing End Dates Within each subject/AESOCCALC/AEPTCALC/temporary_suppae_qval_ctcae/temporary_ae_aeterm combination: Rule: If a record has the same AESTDAT as another record in that group, it should have the same AEENDAT. Implementation: For reco...