就是 sas中 经常看到ls=2000,或者lrecl=32767,后面的数是怎么定义的?
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了就是 sas中 经常看到ls=2000,或者lrecl=32767,后面的数是怎么定义的?相关的知识,希望对你有一定的参考价值。
要是 问题回答对了 还会追加悬赏。 因为最近问题太多 ,但回答的人太少,所以.. ..
LRECL 是逻辑长度,Logic-Record-Length的缩写,在一些操作环境(windows系统),SAS假定外部文件的纪录对最长为256(一行数据包括空格等所有字符在内的长度),如果预计读入的纪录长度超过256,可在Infile语句中使用LRECL=n 这个命令。 参考技术A LRECL是用来规定逻辑记录长度,后面的数字是用来定义读取的文件逻辑长度为多少字节的。ls其实就是linesize的缩写,是用来规定行的读取长度的,后面的数字是用来定义读取时每行最多读多少个字节的长度。追问
那我想知道逻辑长度是怎么规定的?以什么为标准?
本回答被提问者采纳SAS ESCAPECHAR /SAS REPORT
1
/*先定义个三线表*/ proc template; define style work.threeline; parent=styles.rtf; class table/ frame=hsides rules=group borderspacing=0pt; end; run; option orientation=landscape ps=30 ls=80 nodate nonumber nobyline; ods path work.templat(update) sashelp.tmplmst(read); ods escapechar=‘~‘; /* 遇到~就转译*/ ods _all_ close; ods rtf file=‘.file.rtf‘ style=work.threeline; title1 color=lightbule ‘~{thispage} of ~{lastpage}‘; /* 用法一:~显示页码*/ title2 ‘~S={color=red fontsize=20pt} page ~S={foreground=blue} ~{pageof}‘ ; /*~S调用样式*/ title4 color=lightblue ‘{field{fldinst{page}}}‘; /*VBA控制页码*/ title5 ‘~{style [color=purple fontsize=10pt ] ~{unicode 263B} ~{super A} ~{sub B}}‘; /*多层嵌套用法*/ title6 ‘~S={preimage="1.png"}‘;/*插入图片*/ data sample; set sashelp.class; if _n_<10; run; proc report data=a nowd headline headskip; columns name (‘~{style [background=blue fontsize=15pt ] ~{unicode 263B} Sex-Age}‘ sex age) (‘~S={fontsize=15pt background=lightblue}‘ weight) height ; define name/ style(header)={just=r cellwidth=120pt font_face=Arial font_weight=bold background=red} style(column)={just=c font_face=Arial font_size=10pt background=blue}; define sex/group; run; ods rtf close; ods listing;
最丑效果图,主要看各种命令效果.....
以上是关于就是 sas中 经常看到ls=2000,或者lrecl=32767,后面的数是怎么定义的?的主要内容,如果未能解决你的问题,请参考以下文章