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 (September 2002, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 12 Sep 2002 09:40:10 -0700
Reply-To:   Jeff Morison <jmt_mtf@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Jeff Morison <jmt_mtf@YAHOO.COM>
Subject:   Thanks - Flat File to Flat File Merge
Comments:   To: Lionel_Teed@TD.COM
Content-Type:   text/plain; charset=us-ascii

Thank you Lionel for your reply, this is very helpful.

Jeff.

Lionel_Teed@TD.COM To: SAS-L@LISTSERV.UGA.EDU

Sent by: "SAS(r) cc:

Discussion" Subject: Re: Flat file to Flat file merge

<SAS-L@LISTSERV.UGA.E

DU>

09/12/2002 05:23 AM

Please respond to

Lionel_Teed

For SYNCSORT, in an MVS environment, something like the following...

JCL.....

//SRTMAS0A EXEC PGM=SYNCSORT //SYSOUT DD SYSOUT=* //SORTIN01 DD DSN=DSName.One,DISP=SHR //SORTIN02 DD DSN=DSName.Two,DISP=SHR //SORTOUT DD DSN=NewDSName, // DISP=(,Catlg,Delete),unit=SYSDA, // DCB=*.SORTIN01 //SYSIN DD * MERGE FIELDS=(a,b,c,d) /*

Where a is the start of your sort field, b is the length of your sort field c is the type (CH will usually work) d is the order (A for ascending, D for Descending)

The above example assumes that the files are already in the key order. If not,then change the MERGE to a SORT, and change the JCL portion of the SORTIN01 and SORTIN02 to the following.

//SORTIN DD DSN=DSName.One,DISP=SHR // DD DSN=DSName.Two,DISP=SHR

Lionel

__________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com


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