Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file

Google
 
Web mainframegurukul.com

Need sort to compare 2 datasets

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities
  View previous topic :: View next topic  
Author Message
ujwal.borkar
Member


Joined: 17 Jun 2011
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jun 17, 2011 4:10 pm    Post subject: Need sort to compare 2 datasets Reply with quote

I have 2 datasets having different copybooks ( Say File 1 and File 2 )

I want records present in file1 but not in file2 based on a Keyword which exists in both the datasets at different positions.

Can you please help me to get sort for this ?
Back to top
View user's profile Send private message Yahoo Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jun 17, 2011 9:51 pm    Post subject: Reply with quote

You can use DFSORT's JOINKEYS function for that. For some examples, see the "Create files with matching and non-matching records" Smart DFSORT Trick at:

http://www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000094

If you need more specific help, please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example.
_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Frank Yaeger
Moderator


Joined: 18 Feb 2006
Posts: 812
Location: San Jose, CA

Answer was approved by Question owner.
Useful Post
1 votes
Not an useful post
Greate Post!! Salute Author
1 salutes

PostPosted: Mon Jun 20, 2011 10:32 pm    Post subject: Reply with quote

Based on the information you sent me offline, here's a DFSORT JOINKEYS job that will do what I think you want:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD DSN=...  input file1 (FB/70)
//IN2 DD DSN=...  input file2 (FB/74)
//SORTOUT DD DSN=... output file (FB/70)
//SYSIN DD *
  JOINKEYS F1=IN1,FIELDS=(1,8,A)
  JOINKEYS F2=IN2,FIELDS=(1,8,A)
  JOIN UNPAIRED,F1,ONLY
  REFORMAT FIELDS=(F1:1,70)
  OPTION COPY
/*

_________________
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
ujwal.borkar
Member


Joined: 17 Jun 2011
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jun 29, 2011 5:10 pm    Post subject: Reply with quote

Thanks Guru Smile
Back to top
View user's profile Send private message Yahoo Messenger
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
dbzTHEdinosauer
Moderator


Joined: 02 Oct 2006
Posts: 981

Answer was approved by Question owner.
Useful Post
1 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Jun 29, 2011 8:37 pm    Post subject: Reply with quote

Frank is not a sort-guru
he is the sort-god.
_________________
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Basav
Member


Joined: 10 Sep 2015
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2015 9:00 am    Post subject: Reply with quote

Frank Yaeger, :

Hi Frank,

Can you please help me on this below mentioned requirement.

I/P:
0192002682|0000001004931|RAINBOW
0192002682|0000000706570|NON-RAINBOW
0192002682|0000000706570|NON-RAINBOW
4000000018|0001935277780|RAINBOW
4000000018|0001943580989|RAINBOW
5192002681|0000001004932|RAINBOW
5192002681|0000000706570|NON-RAINBOW
6792002686|0000000706570|NON-RAINBOW
6992002688|0000000706570|RAINBOW
7192002683|0000001004932|NON-RAINBOW
7192002683|0000000706570|RAINBOW
7192002683|0000001004932|NON-RAINBOW

Expected O/P:
0192002682|0000001004931|RAINBOW
0192002682|0000000706570|NON-RAINBOW
0192002682|0000000706570|NON-RAINBOW
5192002681|0000001004932|RAINBOW
5192002681|0000000706570|NON-RAINBOW
7192002683|0000001004932|NON-RAINBOW
7192002683|0000000706570|RAINBOW
7192002683|0000001004932|NON-RAINBOW
_________________
efge
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 732

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2015 11:57 am    Post subject: Reply with quote

|1) Franlk retired more than three years ago. 2) This is the same as your previous question. Hod did you get on with that?
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Basav
Member


Joined: 10 Sep 2015
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2015 4:42 pm    Post subject: Reply with quote

William Collins wrote:
|1) Franlk retired more than three years ago. 2) This is the same as your previous question. Hod did you get on with that?
Hi William,

Since i am very new to the mainframe technology , I am trying to implement suggestion given by you in another thread .

As a beginner in mainframe technology i am trying to understand your technical words.

Thanks,
Basavaraj.A.S
_________________
efge
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Basav
Member


Joined: 10 Sep 2015
Posts: 7

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Sep 15, 2015 4:44 pm    Post subject: Reply with quote

Basav wrote:
William Collins wrote:
|1) Franlk retired more than three years ago. 2) This is the same as your previous question. Hod did you get on with that?
Hi William,

Since i am very new to the mainframe technology , I am trying to implement suggestion given by you in another thread .

As a beginner in mainframe technology i am trying to understand your technical words.

Thanks,
Basavaraj.A.S
Since it is very confusing to implement using ICETOOL (above all it is grey area to me) , Currently I am implementing using COBOL code.
_________________
efge
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Jan 25, 2016 9:28 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> DFSORT , ICETOOL & Utilities All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-5843.html