Re: SORT - Merge Two Files by Variable

2016-05-17 Thread Sri h Kolusu
Ravi,

A sample input and desired output would have helped. Your description of 
the problem is too vague. Either way as Martin pointed out DFSORT Joinkeys 
will give you the desired results.

Check out the Smart DFSORT tricks on Joinkeys which is what you need

Join fields from two files on a key
Join fields from two files record-by-record
Cartesian join
Create files with matching and non-matching records

You can find the DFSORT smart tricks at 

http://www-01.ibm.com/support/docview.wss?rs=114=isg3T794

Further if you have any questions please let me know

Thanks,
Kolusu
DFSORT Development
IBM Corporation

IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> wrote on 
05/17/2016 12:13:21 AM:

> From: Ravi Gaur <gaur.ravi2...@gmail.com>
> To: IBM-MAIN@LISTSERV.UA.EDU
> Date: 05/17/2016 12:13 AM
> Subject: SORT - Merge Two Files by Variable
> Sent by: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU>
> 
> Since I am not that good on Sort programming could somebody throw a 
> code which could help in Merging two files which has common BY 
> variable..(I generally do it with SAS) however where this required 
> it's not licensedso it's possible via rexx however for millions 
> of records that's damn slow...so believe DFSORT can easily achieve 
> it with SPLICE ...
> 
> So here's what I have in two files..
> 
> FILE 1 Contain variables like DSNAME VOLSER 
> FILE2  Contain variables like DSNAME VOLSER 
> 
> Now my requirement is based on VOLSER MATCH between file1 and file2 
> the output record should be created in FILE3.
> 
> Thanks, Ravi
> 
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> 



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SORT - Merge Two Files by Variable

2016-05-17 Thread Martin Packer


Or, less kindly, learnt DFSORT / ICETOOL. It's a very useful utility and
pervasive (if one counts Syncsort as the overlap in syntax and semantics
approaches 100%).

It's really not that difficult.

Cheers, Martin

Sent from my iPad

> On 17 May 2016, at 11:51, Elardus Engelbrecht
 wrote:
>
> Ravi Gaur wrote:
>
>> Since I am not that good on Sort programming could somebody throw a code
which could help in Merging two files which has common BY variable..(I
generally do it with SAS) however where this required it's not
licensedso it's possible via rexx however for millions of records
that's damn slow...so believe DFSORT can easily achieve it with SPLICE ...
>
> Or as Martin kindly said, use JOINKEYS
>
>> So here's what I have in two files..
>
>> FILE 1 Contain variables like DSNAME VOLSER
>> FILE2  Contain variables like DSNAME VOLSER
>
>> Now my requirement is based on VOLSER MATCH between file1 and file2 the
output recor should be created in FILE3.
>
> I'm not sure what you want, please supply sample input and sample
outputs. Also give the keys in what columns.
>
> Groete / Greetings
> Elardus Engelbrecht
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SORT - Merge Two Files by Variable

2016-05-17 Thread Elardus Engelbrecht
Ravi Gaur wrote:

>Since I am not that good on Sort programming could somebody throw a code which 
>could help in Merging two files which has common BY variable..(I generally do 
>it with SAS) however where this required it's not licensedso it's possible 
>via rexx however for millions of records that's damn slow...so believe DFSORT 
>can easily achieve it with SPLICE ...

Or as Martin kindly said, use JOINKEYS

>So here's what I have in two files..

>FILE 1 Contain variables like DSNAME VOLSER 
>FILE2  Contain variables like DSNAME VOLSER 

>Now my requirement is based on VOLSER MATCH between file1 and file2 the output 
>record should be created in FILE3.

I'm not sure what you want, please supply sample input and sample outputs. Also 
give the keys in what columns.

Groete / Greetings
Elardus Engelbrecht

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SORT - Merge Two Files by Variable

2016-05-17 Thread Martin Packer


I'd research DFSORT JOINKEYS.

Cheers, Martin

Sent from my iPad

> On 17 May 2016, at 08:13, Ravi Gaur  wrote:
>
> Since I am not that good on Sort programming could somebody throw a code
which could help in Merging two files which has common BY variable..(I
generally do it with SAS) however where this required it's not
licensedso it's possible via rexx however for millions of records
that's damn slow...so believe DFSORT can easily achieve it with SPLICE ...
>
> So here's what I have in two files..
>
> FILE 1 Contain variables like DSNAME VOLSER
> FILE2  Contain variables like DSNAME VOLSER
>
> Now my requirement is based on VOLSER MATCH between file1 and file2 the
output record should be created in FILE3.
>
> Thanks, Ravi
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


SORT - Merge Two Files by Variable

2016-05-17 Thread Ravi Gaur
Since I am not that good on Sort programming could somebody throw a code which 
could help in Merging two files which has common BY variable..(I generally do 
it with SAS) however where this required it's not licensedso it's possible 
via rexx however for millions of records that's damn slow...so believe DFSORT 
can easily achieve it with SPLICE ...

So here's what I have in two files..

FILE 1 Contain variables like DSNAME VOLSER 
FILE2  Contain variables like DSNAME VOLSER 

Now my requirement is based on VOLSER MATCH between file1 and file2 the output 
record should be created in FILE3.

Thanks, Ravi

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN