-1

比如PNG文件d:\aaa.png,现在想用SAS把d:\aaa.png二进制文件转成hexdump。谢谢你。在 R 中,redBin 函数可以做到这一点。

4

1 回答 1

0

这应该做你正在寻找的。它一次读取文件一个字符,并将 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;
于 2013-11-24T18:47:22.923 回答