Migrating SAS applications, SAS data sets, and other SAS structures such as user-defined formats and informats is becoming a common occurrence. This answer focuses on the methods available for migrating user-defined formats and informats. The discussion is limited to formats created with SAS Release 6.03 and above.
The following is a list of the available options:
- Copy the formats catalog to the transfer medium using the COPY procedure, and then move this to the receiving system. This option is valid only when moving between systems with the same SAS library structure. If the two locations are running on the same operating system and both are using the same release of SAS, this method is valid.
- Transfer the source code for the formats or informats to the receiving system, and then regenerate the formats using this code.
- Use the CPORT procedure to generate a transport file. Then move this file to the receiving system and use the CIMPORT procedure to remove the formats or informats from the transport structure.
- Use PROC FORMAT with the CNTLOUT= option to generate a SAS data set containing all the format information, and then transport this data set to the receiving system in XPORT transport format. Use PROC FORMAT with the CNTLIN= option to regenerate all the formats from the transported data set.
There is no best method. Your specific situation controls your options as well as the optimal solution. The first two options are somewhat self-explanatory and are preferred if possible. Unfortunately, it might happen that neither areĀ feasible due to unlike systems or no existing PROC FORMAT source code. If this is the case, one of the remaining methods must be used. These methods might both be able to overcome the problems that prevent use of the first two methods; however, PROC FORMAT with CNTLOUT= and CNTLIN= is the most flexible.