Note that this writes only SAS Transport Version 8 and not 9. I haven't
found a good example of long format description support that Transport
Version 9 provides.
I generated a Transport v8 file using Stata. One surprise was that
Stata enumerated variables starting from 0, instead of from 1. I've
followed Stata's example. I didn't notice anything in SAS's
specification that indicated whether 0 or 1 is correct.
text_encode
.struct.pack
.Note that this writes only SAS Transport Version 8 and not 9. I haven't found a good example of long format description support that Transport Version 9 provides.
I generated a Transport v8 file using Stata. One surprise was that Stata enumerated variables starting from 0, instead of from 1. I've followed Stata's example. I didn't notice anything in SAS's specification that indicated whether 0 or 1 is correct.