Date: Fri, 12 Apr 1996 15:02:32 +0100
Reply-To: Darrell Edgley <razzie@PRAXIS.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Darrell Edgley <razzie@PRAXIS.CO.UK>
Subject: Re: SAS/Connect & Sorted Data Sets (MVS to Unix)
On Thu 11 Apr 1996 10:19 Kimberly LeBouton <klebouton@AMERHONDA.COM> wrote:
> 'm using PROC DOWNLOAD to pass sorted SAS data sets from MVS to Unix. In
> Unix, the data sets are not recognised as sorted. Is there anyway to get
> around not resorting the data sets in Unix.
>
> Thanks for any assistance that is provided.
I think your problem is most likely caused by the different collating
sequences between MVS and UNIX (i.e. EBCDIC and ASCII). A data set
sorted in either sequence will not be necessarily recognised as sorted
by the other.
Try specifying the ASCII option when you sort your data set on the MVS
mainframe. Of course this may then cause you problems if you need to
use BY group processing under MVS (maybe resort after download or use
the NOTSORTED option).
example (run on MVS) :-
PROC SORT DATA = libref.blah ASCII ;
** Sorts the data set using the ASCII collating sequence ** ;
BY var1 var2 ... varn ;
RUN ;
------
Alternatively, use the NOTSORTED option on your BY statement on your
UNIX box, e.g.
DATA unix.blah ;
SET download.mvs_dset ;
BY var1 var2 ... varn NOTSORTED ;
IF FIRST.varn THEN DO ;
**** etc .... **** ;
END ;
RUN ;
The NOTSORTED option will cause SAS not to check that the next
observation to be read into the PDV (Program Data Vector) has BY
variable equal to or higher than the current observation. If it
detects a change in any BY variable it will however set the FIRST. and
LAST. flags.
Hope this helps
Darrell
.............................................................................
| | Darrell Edgley (aka Razzie) |
| e-mail : razzie@praxis.co.uk | Praxis plc |
| phone : +44 [0]1225 444700 | 20 Manvers Street |
| fax : +44 [0]1225 465205 | Bath, Avon |
| | BA1 1PX UK |
.............................................................................