The SAS Output Delivery System and reporting techniques

Copy Formats to new Library

Super Contributor
Posts: 358

Copy Formats to new Library

Hi All:

I can't seem to find this in the doc anywhere:

I have a format that I have saved in a library on the mainframe that I need to copy to the server. How do I do this (other than the Connect stuff, which is not a problem)?

I don't want to copy the entire library or the format catalog, just the format that I need.

Much thanks.
Valued Guide
Posts: 2,191

Re: Copy Formats to new Library

proc format cntlout = work.something library= zos_fromat_lib ;
select any required $format and_or informat ;
run ;
signon yoursrv ;
rsubmit ;
proc upload data= work.something ;
proc format library=server_fmt_library cntlin= work.something ;
run ;
Super User
Posts: 3,926

Re: Copy Formats to new Library

If you don't use SAS/CONNECT there are 2 options:

1) Copy the source code that produced the format and run it on the target computer.

2) Convert the SAS format into a SAS transport file using the CPORT procedure, do a BINARY transfer of the file to your target computer, then read in the transport file using the CIMPORT procedure. Refer to SAS documentation for more details.
Super Contributor
Super Contributor
Posts: 3,176

Re: Copy Formats to new Library

Suggested Google advanced search argument, this topic/post:

proc cport transfer catalog format operating system

Scott Barry
SBBWorks, Inc.
Super Contributor
Posts: 358

Re: Copy Formats to new Library

Thanks all.

I used a technique much like Peter.C suggested except that the source library was allocated on the mainframe as a remote table using the CONNECT Spawner (thank goodness that was available). I allocated the target as the server library and - ta-da!

Also - the source library had only the formats that I needed for this application, not the entire production format library. I was thinking that I needed to select only a few formats from a library that contains hundreds.

And - unfortunately, the source code is long gone...
Ask a Question
Discussion stats
  • 4 replies
  • 4 in conversation