i have two files one is input and another is output.i have different data in both the files. i want to do like this
input file
12345
12345
72890
output file
asdff
ssssw
sssss
in the same output file i need to replace
12dff
12ssw
72sss
sort
Moderators: Frank Yaeger, Moderator Group
First - a title of 'sort' for your topic in the DFSORT part of the forum is not exactly a brief description of your problem.
Second - how do you get that output from that input? What are the rules? Why does 12345 become both asdff and ssssw and why does 72890 become sssss. And how does the 12dff, 12ssw and 72sss get into your output file and what do you want to replace them by? Also, what is the RECFM and LRECL of these file?
Thirdly - what have you tried so far? Show us your efforts.
Second - how do you get that output from that input? What are the rules? Why does 12345 become both asdff and ssssw and why does 72890 become sssss. And how does the 12dff, 12ssw and 72sss get into your output file and what do you want to replace them by? Also, what is the RECFM and LRECL of these file?
Thirdly - what have you tried so far? Show us your efforts.
Regards
Nic
Nic
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
tamilselvan.sampath,
Assuming you want to join record-by-record from the two input files, you can use a DFSORT JOINKEYS job like the following:
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:
http://www.ibm.com/support/docview.wss? ... g3T7000080
Assuming you want to join record-by-record from the two input files, you can use a DFSORT JOINKEYS job like the following:
Code: Select all
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//IN1 DD *
12345
12345
72890
//IN2 DD *
12dff
12ssw
72sss
//SORTOUT DD SYSOUT=*
//SYSIN DD *
JOINKEYS F1=IN1,FIELDS=(81,8,A),SORTED,NOSEQCK
JOINKEYS F2=IN2,FIELDS=(81,8,A),SORTED,NOSEQCK
REFORMAT FIELDS=(F1:1,2,F2:3,3)
OPTION COPY
INREC OVERLAY=(80:X)
//JNF1CNTL DD *
INREC OVERLAY=(81:SEQNUM,8,BI)
//JNF2CNTL DD *
INREC OVERLAY=(81:SEQNUM,8,BI)
/*
http://www.ibm.com/support/docview.wss? ... g3T7000080
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
-
- Member
- Posts: 26
- Joined: Mon Jan 23, 2012 11:17 pm
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Member
- Posts: 26
- Joined: Mon Jan 23, 2012 11:17 pm
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
I don't understand your question. Are you saying you can't use JOINKEYS? Or are you asking if there's another way to do it without JOINKEYS? If the latter, why do you need to do it without JOINKEYS?hi frank,
we cant do without using joinkeys frank.
I suppose it could be done with the SPLICE operator of DFSORT's ICETOOL if you can't use JOINKEYS.
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
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page