"WARNING: Data set TEST.XXX has a foreign format. Associated files, such as index files, cannot be cported" might be received with PROC CPORT


The warning message below can occur when the CPORT procedure encounters a foreign file in the directory:

38   proc cport file=testlib data=test.xxx; run;

NOTE: Data file TEST.XXX.DATA is in a format that is native to another host, or the file
      encoding does not match the session encoding. Cross Environment Data Access will be used,
      which might require additional CPU resources and might reduce performance.

NOTE: PROC CPORT begins to transport data set TEST.XXX
WARNING: Data set TEST.XXX has a foreign format.  Associated files, such as index files,
         cannot be cported.


The warning indicates that the data set has a foreign format. A foreign file is a SAS data set produced on a different operating system. When SAS reads foreign files, it uses Cross-Environment Data Access (CEDA) technology. The warning appears because associated files that are not supported by CEDA (such as indexes) will not be included in the transport file. In this case, the transport file is successfully created without the index. After converting the transport file back to a SAS data set on the target operating system, the index can be recreated.

When you see this warning, it might be confusing to run PROC CONTENTS on the source file to verify the index is present. CEDA cannot even 'see' the index and will report a zero (0) in the index field. If you choose to run PROC CONTENTS in the operating environment that produced the data set, a positive value in the index field appears. Therefore, to verify indexes exist on the foreign file when you receive this warning, try the _ALL_ keyword in PROC CONTENTS and view the directory portion of the output. The .bndx files indicate indexes exist. The syntax follows.

proc contents data=libref._all_;
run;