【发布时间】:2013-11-24 16:12:50
【问题描述】:
比如PNG文件d:\aaa.png,现在想用SAS把d:\aaa.png二进制文件转成hexdump。谢谢你。在R中,redBin函数可以做到。
【问题讨论】:
比如PNG文件d:\aaa.png,现在想用SAS把d:\aaa.png二进制文件转成hexdump。谢谢你。在R中,redBin函数可以做到。
【问题讨论】:
这应该可以满足您的需求。它一次读取文件一个字符,并将 HEX 表示形式写入输出文件。
%let infile = "C:\temp\SGPlot.png";
%let outfile = "c:\temp\out.txt";
filename infile &infile;
filename outfile &outfile;
data _null_;
infile infile recfm=n;
file outfile recfm=n;
format c $1.;
input c $ @@;
put c hex. @@;
run;
【讨论】: