【问题标题】:How to convert the binary file into a hexdump in SAS如何在SAS中将二进制文件转换为hexdump
【发布时间】:2013-11-24 16:12:50
【问题描述】:

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

【问题讨论】:

    标签: binary sas hexdump


    【解决方案1】:

    这应该可以满足您的需求。它一次读取文件一个字符,并将 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;
    

    【讨论】:

    • 你能上传你的文件SGPlot.png,我会从另一个软件粘贴reslut。谢谢!
    • 我无法上传我的 png 和 reslut 文件。能不能告诉我你的邮箱。我会把这些文件发给你。您可以上传这些文件。谢谢!
    • 只使用你的文件并比较输出形式 SAS 和 R。我不明白你为什么需要我的文件。
    • max.bytes
    • 把 c 十六进制。 @@;如何把大写变成小写?
    猜你喜欢
    • 1970-01-01
    • 2019-06-19
    • 2017-07-11
    • 1970-01-01
    • 2015-11-07
    • 2017-06-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多