使用SAS编写二进制文件?

1 binary sas

我们目前使用SAS导入二进制文件并对其数据运行查询.为此,我们使用SAS 网站上显示的技术.

例如,这是我们读取数据的方式:

data work.binary_data; 
infile "&ifName" lrecl=8 recfm=f;
input @1 a PIB1.
      @2 b PIB1.
      @3 c PIB1.
      @4 d PIB1.
      @5 e PIB1.
      @6 f PIB1.
      @7 g PIB1.
      @8 h PIB1.
run;
Run Code Online (Sandbox Code Playgroud)

我们需要将数据集发送到客户端,以便他们在SAS中进行操作.然后他们会把它发回去,我需要转换回内部程序所需的二进制格式.数据集的大小可能超过10GB,所以我不确定先转换为文本文件,然后从文本文件中写入二进制文件(使用c ++或其他东西)

有谁知道如何使用SAS写入二进制格式,这意味着,我们最初读取的文件格式是否相同?

Mar*_*ark 6

我无法再访问SAS进行测试,但我相信您可以反转上面的逻辑:

data _null_; 
  set data; 
  file 'c:\fileout.dat'; 
  put @1 a PIB1. 
      @2 b PIB1.
      @3 c PIB1.
      @4 d PIB1.
      @5 e PIB1.
      @6 f PIB1.
      @7 g PIB1.
      @8 h PIB1.
  ;
run;
Run Code Online (Sandbox Code Playgroud)

其中PIB1代表您的二进制格式.