View previous topic :: View next topic
|
Author |
Message |
bhargavi.chinta
New User
Joined: 15 Sep 2012 Posts: 2 Location: INDIA
|
|
|
|
Hi,
First of all i need to inform that Iam a fresher ,recently i joined in project.I dont know much about sort cards.
I have two files.First file contains different fields .Second file contains two fields which are in first file.let the fields be A and B..
Now my requirement is by taking the data from A field we need to search in first file. if it found means i want the data of field A and B from first file in the output file.
How to do by using sort cards.Please help me...
Kindly ignore if you feel it so simple. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
I suspect you would be better served using our Fresher/Student Forum:
www.ibmmainframeforum.com/index.php
This forum is specifically for your level of experience.
When you post your question on that forum, you need to post some sample input data and the output you want when that data is processed.
Explain the rules for getting from the input to the output.
Mention the recfm and lrecl of the files as well. |
|
Back to top |
|
|
bhargavi.chinta
New User
Joined: 15 Sep 2012 Posts: 2 Location: INDIA
|
|
|
|
Thanks for your suggestion.
Sure i will post my queries in the link which you sent |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Someone will be there.
Good luck.
d |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
You can use DFSORT Joinkeys to perform the match on 2 different files and extract the data. Here is a sample job.
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//INA DD *
----+----1----+----2----+----3----+----4----+----5---
BHARGAVI CHINTA NEW USER
DICK SCHERRER GLOBAL MODERATOR
S KOLUSU DFSORT
BHARGAVI SRAVANI DIFFERENT LAST NAME
//INB DD *
BHARGAVI
DICK
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
JOINKEYS F1=INA,FIELDS=(1,15,A)
JOINKEYS F2=INB,FIELDS=(1,15,A)
REFORMAT FIELDS=(F1:1,80)
//* |
The output from this is
Code: |
BHARGAVI CHINTA NEW USER
BHARGAVI SRAVANI DIFFERENT LAST NAME
DICK SCHERRER GLOBAL MODERATOR
|
If that is not what you are looking for then you need to show us a sample Input and desired output along with DCB properties of the files involved.
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
www-01.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080 |
|
Back to top |
|
|
|