jackieflash
Vendor
IDNUM Type Plan Desc StMonth EndMonth
9578 1 AA1 Single Jan-00 Jan-00
9578 1 AA2 Double Jan-00 Jan-00
9578 1 AA3 Triple Jun-00 Jul-00
9578 1 AA4 Quarter Jul-00 Jul-00
9578 2 AA5 Fourth Jan-00 Jan-00
9578 2 AA5 Fourth Dec-00 Dec-00
2222 1 AA7 Fifth Feb-00 Feb-00
2222 1 AA7 Fifth Apr-00 May-00
2222 1 AA9 Double Jan-00 Jan-00
2222 1 AA10 Single Feb-00 Feb-00
Dear SAS Experts,
I would like to flatten a file by IDNUM, Type and StMonth. I would need
arrays created for Plan, Desc,
StMonth and EndMonth. A person can have either Type=1or 2 or both.
StMonth and EndMonth are date variables.
For e.g.. For the above data I would like all the data for the same
IDNUM, StMonth and Type on the same line.
All the Jan00 data for IDNUM 9578 and Type 1 would be on one line.
All the Jun00 data for IDNUM 9578 and Type 1 would be on another line
and so on and so forth....
All the Jan00 data for IDNUM 9578 and Type 2 would be on another line.
Maximum # of entries for the same IDNUM Type and StMonth is 11.
Thus maximum # of variables for each array would be 11.
So for Start Month we will have 11 different variables - SM1 to
SM11,
Similarly for EndMonth, Plan, Desc.
Basically I need one entry for each IDNUM Type STMonth
combination.
Hope this is clear. Let me know if you have any questions.
Much obliged for any assistance.
Thanks,
Tyro
9578 1 AA1 Single Jan-00 Jan-00
9578 1 AA2 Double Jan-00 Jan-00
9578 1 AA3 Triple Jun-00 Jul-00
9578 1 AA4 Quarter Jul-00 Jul-00
9578 2 AA5 Fourth Jan-00 Jan-00
9578 2 AA5 Fourth Dec-00 Dec-00
2222 1 AA7 Fifth Feb-00 Feb-00
2222 1 AA7 Fifth Apr-00 May-00
2222 1 AA9 Double Jan-00 Jan-00
2222 1 AA10 Single Feb-00 Feb-00
Dear SAS Experts,
I would like to flatten a file by IDNUM, Type and StMonth. I would need
arrays created for Plan, Desc,
StMonth and EndMonth. A person can have either Type=1or 2 or both.
StMonth and EndMonth are date variables.
For e.g.. For the above data I would like all the data for the same
IDNUM, StMonth and Type on the same line.
All the Jan00 data for IDNUM 9578 and Type 1 would be on one line.
All the Jun00 data for IDNUM 9578 and Type 1 would be on another line
and so on and so forth....
All the Jan00 data for IDNUM 9578 and Type 2 would be on another line.
Maximum # of entries for the same IDNUM Type and StMonth is 11.
Thus maximum # of variables for each array would be 11.
So for Start Month we will have 11 different variables - SM1 to
SM11,
Similarly for EndMonth, Plan, Desc.
Basically I need one entry for each IDNUM Type STMonth
combination.
Hope this is clear. Let me know if you have any questions.
Much obliged for any assistance.
Thanks,
Tyro