Binary 使用SAS编写二进制文件?

Binary 使用SAS编写二进制文件?,binary,sas,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

我们目前使用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;
我们需要将数据集发送到客户机,以便他们在SAS中进行操作。然后他们会发回,我需要转换回内部程序需要的二进制格式。数据集的大小可能超过10GB,所以我不确定首先转换为文本文件,然后只从文本文件(使用C++或其他东西)编写二进制文件


有人知道如何使用SAS写入二进制格式,也就是说,与我们最初读取的文件格式相同吗

我不再能够访问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;

其中PIB1代表您的。

我不再有权访问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;
其中PIB1代表您的