Appendix 4: Programs to create spread ASCII datasetsPart one: The SAS Macro Part two: Read in column binary data, convert to ASCII; create
data map showing new column locations @i row3 punch.3 @i row4 punch.4 @i row5 punch.5 @i row6 punch.6 @i row7 punch.7 @i row8 punch.8 @i row9 punch.9 @i row10 punch.0 @i row11 punch.11 @i row12 punch.12 @; PUT @(1+(12*(i-1))) (row1-row12) (1.) @; END; put; options ls=80; data _null_; file print; title DATA MAP FOR COLUMN-BINARY SPREAD DATA; title3 NOTE: Rows 1-9,0,X,Y correspond to columns 1-12.; put; put; put; do i = 1 to 40; col2 = 12 + (12*(i-1)); col3 = 1 + (12*(40+i-1)); col4 = 12 + (12*(40+i-1)); cola = i; colb = 40 + i; put @1 "Column " cola 2. " maps to " col1 4. " through " col2 4. @; put @41 "Column " colb 2. " maps to " col3 4. " through " col4 4. @; put; end; run; %MEND;
|