A simple generated format statement is being corrupted so that the results bears little resemblence to the original format.
These format statements:
13602 proc format LIBRARY=work cntlout=work.library; 13603 13604 %include "L:\er\data\china\tianjin\temp\format3.txt"; NOTE: %INCLUDE (level 1) file L:\er\data\china\tianjin\temp\format3.txt is file L:\er\data\china\tianjin\temp\format3.txt. 13605 +picture QG04fmt 13606 +1 = "Every day " 13607 +2 = "Nearly every day " 13608 +3 = "3 or 4 times a week " 13609 +4 = "Once or twice a week " 13610 +5 = "2 or 3 times a month " 13611 +6 = "About once a month " 13612 +7 = "6-11 times a year " 13613 +8 = "1-5 times a year " 13614 +9 = "No alcohol during the past 12 months " 13615 +99 = "Unknown " 13616 +. = "NA " 13617 +; NOTE: Format QG04FMT is already on the library WORK.FORMATS. NOTE: Format QG04FMT has been output. 13618 +picture QG04Afmt 13619 +1 = "Maybe Every day " 13620 +2 = "Nearly every day " 13621 +3 = "About 3 or 4 times a week " 13622 +4 = "Once or twice a week " 13623 +5 = "like 2 or 3 times a month " 13624 +6 = "About once a month " 13625 +7 = "a6-11 times a year " 13626 +8 = "1-5 times a year " 13627 +9 = "No alcohol during the past 12 months" 13628 +99 = "Unknown " 13629 +. = "NA, this is just sillines. " 13630 +; NOTE: Format QG04AFMT is already on the library WORK.FORMATS. NOTE: Format QG04AFMT has been output. NOTE: %INCLUDE (level 1) ending. 13631 format qf01 qf05a qf06a ddmmyys10.; 13632 format qf02 qf05b qf066 qf06b hhmm.; 13633 run;
and
13665 data china.erfinalf912a; 13666 %include "L:\er\data\china\tianjin\temp\formats.txt"; NOTE: %INCLUDE (level 1) file L:\er\data\china\tianjin\temp\formats.txt is file L:\er\data\china\tianjin\temp\formats.txt. 13667 +format 13668 + 13669 +QG04 QG04fmt. 13670 +QG04A QG04Afmt. 13671 +; NOTE: %INCLUDE (level 1) ending. 13672 set china.erfinalnf912; 13673 run;
produce:
The SAS System 12:29 Tuesday, September 12, 2017 49 The FREQ Procedure PAST YEAR, HOW OFTEN DO YOU DRINK THE EQUIVALENT OF 5-11 DRINKS ON ONE OCCASION? Cumulative Cumulative QG04 Frequency Percent Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ NA 117 22.37 117 22.37 Every day 23 4.40 140 26.77 Nearly every day 29 5.54 169 32.31 0 or 3 times a week 22 4.21 191 36.52 Once or twice a week 6 1.15 197 37.67 0 or 5 times a month 33 6.31 230 43.98 About once a month 15 2.87 245 46.85 0-07 times a year 36 6.88 281 53.73 0-8 times a year 85 16.25 366 69.98 09 months 154 29.45 520 99.43 Unknown 3 0.57 523 100.00 PAST YEAR, HOW OFTEN DO YOU DRINK THE EQUIVALENT OF 1-4 DRINKS ON ONE OCCASION? Cumulative Cumulative QG04A Frequency Percent Frequency Percent ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ NA, this is just sillines. 117 22.37 117 22.37 Maybe Every day 54 10.33 171 32.70 Nearly every day 87 16.63 258 49.33 0 or 3 times a week 39 7.46 297 56.79 Once or twice a week 34 6.50 331 63.29 0 or 5 times a month 69 13.19 400 76.48 About once a month 12 2.29 412 78.78 0-07 times a year 10 1.91 422 80.69 0-8 times a year 92 17.59 514 98.28 09 months 1 0.19 515 98.47 Unknown 8 1.53 523 100.00
Why are the formats being corrupted?
... View more