Yes, you will need to carry a numeric variable to be used as an indicator, and use this variable by name in the PROC TRANSPOSE for the VAR statement along with the ID statement as well. Also code a PREFIX= to get the transposed columns having a defined prefix.
The key here is that you need to take the _N_ SAS-reserved variable (observation number) and assign it to a SAS numeric variable, say called OBSNUM. And this variable must be called-out in your ID statement so that you get one observation output for each transposed observation -- this approach maintains your vertical perspective.
What you will have generated is a new file, transposed with either a 1 or 0, depending on what was present in the input file.
Then, you will need to have a DATA step to loop through the transposed variables and if you find a missing value, change it to a zero -- that's better than setting MISSING='0' in my experience.
You'll find SAS-hosted product documentation and also supplemental technical and conference papers on various topics, like this one. I have provided a link at the bottom for one example on PROC TRANSPOSE.
Scott Barry
SBBWorks, Inc.
Learn the Basics of Proc Transpose
Douglas Zirbel, Wells Fargo and Co., St. Louis, Missouri
http://support.sas.com/resources/papers/proceedings09/060-2009.pdf