Hi Frank,
Looking for your advise.
Suppose I have three input files and each have only one field of 8 bytes.
I need to create the output joining the fields.
File1
Data1
Data2
Data3
File2
Data4
Data5
Data6
Data7
File3
Data8
Data9
Data10
The output should be like:
Data1 Data4 Data8
Data2 Data5 Data9
Data3 Data6 Data10
bbbbb Data7
b means space or blank.
How can I join files in such a way through ICETOOL.
Thanks.
Joining input files
Moderators: Frank Yaeger, Moderator Group
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: Select all
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN1 DD DSN=... input file1 (FB/8)
//IN2 DD DSN=... input file2 (FB/8)
//IN3 DD DSN=... input file3 (FB/8)
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT DD DSN=... output file (FB/26)
//TOOLIN DD *
COPY FROM(IN1) TO(T1) USING(CTL1)
COPY FROM(IN2) TO(T1) USING(CTL2)
COPY FROM(IN3) TO(T1) USING(CTL3)
SPLICE FROM(T1) TO(OUT) ON(27,8,ZD) WITHANY KEEPNODUPS -
WITH(1,8) WITH(10,8) WITH(19,8) USING(CTL4)
/*
//CTL1CNTL DD *
INREC BUILD=(1,8,27:SEQNUM,8,ZD)
/*
//CTL2CNTL DD *
INREC BUILD=(10:1,8,27:SEQNUM,8,ZD)
/*
//CTL3CNTL DD *
INREC BUILD=(19:1,8,27:SEQNUM,8,ZD)
/*
//CTL4CNTL DD *
OUTFIL FNAMES=OUT,BUILD=(1,26)
/*
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: 6
- Joined: Fri Jan 07, 2011 5:07 pm
Thanks
Thank you Frank...appreciate your help!!
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