IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

About sort cards


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhargavi.chinta

New User


Joined: 15 Sep 2012
Posts: 2
Location: INDIA

PostPosted: Thu Oct 11, 2012 11:21 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 11, 2012 11:37 pm
Reply with quote

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
View user's profile Send private message
bhargavi.chinta

New User


Joined: 15 Sep 2012
Posts: 2
Location: INDIA

PostPosted: Thu Oct 11, 2012 11:44 pm
Reply with quote

Thanks for your suggestion.
Sure i will post my queries in the link which you sent
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Oct 11, 2012 11:54 pm
Reply with quote

Hello,

Someone will be there.

Good luck.

d
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Oct 12, 2012 12:01 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
Search our Forums:

Back to Top