我寫了一個非常強大的程序,允許用戶與SAS中的%窗口函數進行交互。不同屏幕分辨率的頁面大小和行大小標準%window
現在,它工作得很好,我很滿意我達到的結果。但是當我將這個程序發送給一些應該運行它的用戶時,他們發現並不是所有的文本都在output-Window中被提交。 經過一番嘗試後,我發現我的程序打算在我的PC分辨率1280x1024(不太好)以及我的linesize和pagesize標準選項下運行。
這些其他用戶正在使用具有不同分辨率的系統,例如,其中一個用戶使用的筆記本電腦的尺寸爲1366x768,他明顯地看到一部分窗口與內容分離。 即使她試圖設置我的行和頁面大小(我使用%put%sysfunc(getoption(linesize));)她仍然看不到整個窗口。
我該如何處理這類問題?如何爲每種不同的分辨率找到不同輸出尺寸的文檔?
我知道我應該發佈一些代碼嘗試,但這不是代碼請求,但我不認爲這個問題是完全與代碼相關的。也許你們中有人曾經有過這方面的經驗。
謝謝。
編輯:我想使用SAS-AF,但我沒有它的許可證。
SAMPLE WINDOW CODE:
%macro windows();
%window thiswindow
#2 @5 "/-----------------------------------------------------------------------------\"
#3 @5 "|------------------xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-------------------|"
#4 @5 "|------------------------------------------------------------xxxxxxxxxxxxxx---|"
#5 @5 "| xxxxxxxxxxx"
#5 @83 "|"
#6 @5 "| xxxxxxxxxxxxx"
#6 @83 "|"
#7 @5 "| xxxxxx"
#7 @45 " xxxxxxxxxxxx"
#7 @83 "|"
#8 @5 "\-----------------------------------------------------------------------------/"
#10 @2 "001"
#10 @7 "¯ovar1"
#10 @45 "041"
#10 @50 "¯ovar41"
#10 @88 "081"
#10 @93 "¯ovar81"
#11 @2 "002"
#11 @7 "¯ovar2"
#11 @45 "042"
#11 @50 "¯ovar42"
#11 @88 "082"
#11 @93 "¯ovar82"
#12 @2 "003"
#12 @7 "¯ovar3"
#12 @45 "043"
#12 @50 "¯ovar43"
#12 @88 "083"
#12 @93 "¯ovar83"
#13 @2 "004"
#13 @7 "¯ovar4"
#13 @45 "044"
#13 @50 "¯ovar44"
#13 @88 "084"
#13 @93 "¯ovar84"
#14 @2 "005"
#14 @7 "¯ovar5"
#14 @45 "045"
#14 @50 "¯ovar45"
#14 @88 "085"
#14 @93 "¯ovar85"
#15 @2 "006"
#15 @7 "¯ovar6"
#15 @45 "046"
#15 @50 "¯ovar46"
#15 @88 "086"
#15 @93 "¯ovar86"
#16 @2 "007"
#16 @7 "¯ovar7"
#16 @45 "047"
#16 @50 "¯ovar47"
#16 @88 "087"
#16 @93 "¯ovar87"
#17 @2 "008"
#17 @7 "¯ovar8"
#17 @45 "048"
#17 @50 "¯ovar48"
#17 @88 "088"
#17 @93 "¯ovar88"
#18 @2 "009"
#18 @7 "¯ovar9"
#18 @45 "049"
#18 @50 "¯ovar49"
#18 @88 "089"
#18 @93 "¯ovar89"
#19 @2 "010"
#19 @7 "¯ovar10"
#19 @45 "050"
#19 @50 "¯ovar50"
#19 @88 "090"
#19 @93 "¯ovar90"
#20 @2 "011"
#20 @7 "¯ovar11"
#20 @45 "051"
#20 @50 "¯ovar51"
#20 @88 "091"
#20 @93 "¯ovar91"
#21 @2 "012"
#21 @7 "¯ovar12"
#21 @45 "052"
#21 @50 "¯ovar52"
#21 @88 "092"
#21 @93 "¯ovar92"
#22 @2 "013"
#22 @7 "¯ovar13"
#22 @45 "053"
#22 @50 "¯ovar53"
#22 @88 "093"
#22 @93 "¯ovar93"
#23 @2 "014"
#23 @7 "¯ovar14"
#23 @45 "054"
#23 @50 "¯ovar54"
#23 @88 "094"
#23 @93 "¯ovar94"
#24 @2 "015"
#24 @7 "¯ovar15"
#24 @45 "055"
#24 @50 "¯ovar55"
#24 @88 "095"
#24 @93 "¯ovar95"
#25 @2 "016"
#25 @7 "¯ovar16"
#25 @45 "056"
#25 @50 "¯ovar56"
#25 @88 "096"
#25 @93 "¯ovar96"
#26 @2 "017"
#26 @7 "¯ovar17"
#26 @45 "057"
#26 @50 "¯ovar57"
#26 @88 "097"
#26 @93 "¯ovar97"
#27 @2 "018"
#27 @7 "¯ovar18"
#27 @45 "058"
#27 @50 "¯ovar58"
#27 @88 "098"
#27 @93 "¯ovar98"
#28 @2 "019"
#28 @7 "¯ovar19"
#28 @45 "059"
#28 @50 "¯ovar59"
#28 @88 "099"
#28 @93 "¯ovar99"
#29 @2 "020"
#29 @7 "¯ovar20"
#29 @45 "060"
#29 @50 "¯ovar60"
#29 @88 "100"
#29 @93 "¯ovar100"
#30 @2 "021"
#30 @7 "¯ovar21"
#30 @45 "061"
#30 @50 "¯ovar61"
#30 @88 "101"
#30 @93 "¯ovar101"
#31 @2 "022"
#31 @7 "¯ovar22"
#31 @45 "062"
#31 @50 "¯ovar62"
#31 @88 "102"
#31 @93 "¯ovar102"
#32 @2 "023"
#32 @7 "¯ovar23"
#32 @45 "063"
#32 @50 "¯ovar63"
#32 @88 "103"
#32 @93 "¯ovar103"
#33 @2 "024"
#33 @7 "¯ovar24"
#33 @45 "064"
#33 @50 "¯ovar64"
#33 @88 "104"
#33 @93 "¯ovar104"
#34 @2 "025"
#34 @7 "¯ovar25"
#34 @45 "065"
#34 @50 "¯ovar65"
#34 @88 "105"
#34 @93 "¯ovar105"
#35 @2 "026"
#35 @7 "¯ovar26"
#35 @45 "066"
#35 @50 "¯ovar66"
#35 @88 "106"
#35 @93 "¯ovar106"
#36 @2 "027"
#36 @7 "¯ovar27"
#36 @45 "067"
#36 @50 "¯ovar67"
#36 @88 "107"
#36 @93 "¯ovar107"
#37 @2 "028"
#37 @7 "¯ovar28"
#37 @45 "068"
#37 @50 "¯ovar68"
#37 @88 "108"
#37 @93 "¯ovar108"
#38 @2 "029"
#38 @7 "¯ovar29"
#38 @45 "069"
#38 @50 "¯ovar69"
#38 @88 "109"
#38 @93 "¯ovar109"
#39 @2 "030"
#39 @7 "¯ovar30"
#39 @45 "070"
#39 @50 "¯ovar70"
#39 @88 "110"
#39 @93 "¯ovar110"
#40 @2 "031"
#40 @7 "¯ovar31"
#40 @45 "071"
#40 @50 "¯ovar71"
#40 @88 "111"
#40 @93 "¯ovar111"
#41 @2 "032"
#41 @7 "¯ovar32"
#41 @45 "072"
#41 @50 "¯ovar72"
#41 @88 "112"
#41 @93 "¯ovar112"
#42 @2 "033"
#42 @7 "¯ovar33"
#42 @45 "073"
#42 @50 "¯ovar73"
#42 @88 "113"
#42 @93 "¯ovar113"
#43 @2 "034"
#43 @7 "¯ovar34"
#43 @45 "074"
#43 @50 "¯ovar74"
#43 @88 "114"
#43 @93 "¯ovar114"
#44 @2 "035"
#44 @7 "¯ovar35"
#44 @45 "075"
#44 @50 "¯ovar75"
#44 @88 "115"
#44 @93 "¯ovar115"
#45 @2 "036"
#45 @7 "¯ovar36"
#45 @45 "076"
#45 @50 "¯ovar76"
#45 @88 "116"
#45 @93 "¯ovar116"
#46 @2 "037"
#46 @7 "¯ovar37"
#46 @45 "077"
#46 @50 "¯ovar77"
#46 @88 "117"
#46 @93 "¯ovar117"
#47 @2 "038"
#47 @7 "¯ovar38"
#47 @45 "078"
#47 @50 "¯ovar78"
#47 @88 "118"
#47 @93 "¯ovar118"
#48 @2 "039"
#48 @7 "¯ovar39"
#48 @45 "079"
#48 @50 "¯ovar79"
#48 @88 "119"
#48 @93 "¯ovar119"
#49 @2 "040"
#49 @7 "¯ovar40"
#49 @45 "080"
#49 @50 "¯ovar80"
#49 @88 "120"
#49 @93 "¯ovar120"
#52 @5 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#53 @5 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#54 @5 "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
#55 @5 ncoded 80 attr=underline;
%mend;
然後我填充每個宏變量逐步與數據集的前120個觀測使用:
%let rc= %sysfunc(open(dataset));
%let nobs= %sysfunc(attrn(&rc.,nlobs));
%let cl= %sysfunc(close(&rc.));
%syscall(set(dataset));
%do i=1 %to &nobs;
%let fetcher= %sysfunc(fetchobs(dataset,&i.));
%let macrovar&i.=&variable.;
%end;
無論如何,如果你只需要重現此情況下,你可以運行此代碼:
%macro a();
%do i=1 %to 120;
%let macrovar&i.= this_is_the_&i._macrovar;
%end;
%windows();
%mend a; %a();
我用這個示例代碼顯示窗口中充滿了所有的觀察結果:
現在,用我的電腦有1280×1024的分辨率,顯示正確的窗口,但另一項決議,例如具有1366x768的一臺筆記本電腦,我展示的東西截斷這樣的:
你能寫一個例子%窗口程序有這個問題,也許是一個問題的圖片? – Joe
LINESIZE和PAGESIZE僅用於固定字體列表輸出。您的問題是用戶默認字體大小與其屏幕分辨率之間的交互。 – Tom
@Joe,添加了示例代碼和圖片。謝謝。 – stat