LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2011, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 23 Jun 2011 11:47:03 -0700
Reply-To:     jfh@stanfordalumni.org
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: Need help with Bringing in SAS Formats from Mainframes to
              Unix Server
Comments: To: Michael Raithel <michaelraithel@WESTAT.COM>
In-Reply-To:  <DCCDE0D83A1D0E43BB7001C29ED5B5CA06562E@EX10MAIL3.westat.com>
Content-Type: text/plain; charset="us-ascii"

Sez <http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473473.htm>:

===== Note: SAS automatically sets the NOTSORTED option when you use the CPORT and the CIMPORT procedures to transport informats or formats between operating environments with different standard collating sequences. This automatic setting of NOTSORTED can occur when you transport informats or formats between ASCII and EBCDIC operating environments. If this situation is undesirable, then do the following:

Use the CNTLOUT= option in the PROC FORMAT statement to create an output control data set.

Use the CPORT procedure to create a transport file for the control data set.

Use the CIMPORT procedure in the target operating environment to import the transport file.

In the target operating environment, use PROC FORMAT with the CNTLIN= option to build the formats and informats from the imported control data set. =====

In other words, if you transfer a format between an ASCII system and an EBCDIC system, the target format will become NOTSORTED, and as a consequence the lookup will do a sequential scan through the entries instead of using a binary search. For a large format, this will be inefficient.

I think it would be safest to use the CNTLOUT/CNTLIN method described above. If you want the format values to be in a particular order (because you want results to be displayed in the same order on multiple operating systems), you should set the NOTSORTED flag in the original format, and that will force the same order on all systems. You shouldn't depend on the accident of the collating sequence.

On Thu, 23 Jun 2011 17:30 +0000, "Michael Raithel" <michaelraithel@WESTAT.COM> wrote: > Dear SAS-L-ers, > > In this interesting discussion, fellow Westatian Randy Herbison posted > the following: > > > > > Don't the DOWNLAOD & UPLOAD procedures automatically convert catalogs? > > If so, you don't need to explicitly use CPORT/CIMPORT or export the > > formats to a data set. > > > Randy, EXACTLY! I had the same thought too when reading the OP's OP. I > thought that he was working way too hard on this with his trifecta of the > CPORT, CIMPORT, and DOWNLOAD procedures. PROC DOWNLOAD will > "flip-the-bits", so that the mainframe SAS catalog becomes a UNIX SAS > catalog. > > I was thinking that my own approach would be to perform this task in this > order of preference: > > 1. PROC DOWNLOAD the catalog > > ...or: > > 2. CPORT and CIMPORT > > ...but not both. > > As for it "... taking very very long to run..."--long skinny transport > file vs. short squat catalog?... busy system?... who the heck knows?!?!? > > Best of luck in all your SAS endeavors! > > I hope that this suggestion proves helpful now, and in the future! > > Of course, all of these opinions and insights are my own, and do not > reflect those of my organization or my associates. All SAS code and/or > methodologies specified in this posting are for illustrative purposes > only and no warranty is stated or implied as to their accuracy or > applicability. People deciding to use information in this posting do so > at their own risk. > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Michael A. Raithel > "The man who wrote the book on performance" > E-mail: MichaelRaithel@westat.com > > SAS Press Author Page: > http://support.sas.com/publishing/authors/raithel.html > > Author: Tuning SAS Applications in the MVS Environment > > Author: Tuning SAS Applications in the OS/390 and z/OS Environments, > Second Edition > http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172 > > > Author: The Complete Guide to SAS Indexes > http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > If you spend too much time thinking about a thing, you'll > never get it done. - Bruce Lee > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >

-- Brevis esse laboro, obscurus fio.

Jack Hamilton Sacramento, California jfh@alumni.stanford.org


Back to: Top of message | Previous page | Main SAS-L page