how to copy multiple vsam files into a single flat file
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 2
- Joined: Mon Dec 31, 2012 6:20 pm
how to copy multiple vsam files into a single flat file
Hi, I am trying to copy the contents of 5 different VSAM files into a single flat file.. can you please let me know whether the SORT or ICETOOL utilities help this situation? I was successful in copying single VSAM file but not with the multiple VSAM files. Thanks in advance.
-
- Member
- Posts: 2
- Joined: Mon Dec 31, 2012 6:20 pm
Thanks for the reply.. I just started copying 2 VSAM files as below - but just the contents of the second VSAM file (VSAMFILE2) is copied to the OUT dataset. It appears to me that the second COPY has overrided the first COPY.
Please let me know if I am missing something.
//TOOL EXEC PGM=ICETOOL
//IN1 DD DSN=VSAMFILE1,
// DISP=(SHR,KEEP,KEEP)
//IN2 DD DSN=VSAMFILE2,
// DISP=(SHR,KEEP,KEEP)
//OUT DD DSN=DATX00D.CMBN.BF1231G,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=327)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) VSAMTYPE(F)
COPY FROM(IN2) TO(OUT) VSAMTYPE(F)
Please let me know if I am missing something.
//TOOL EXEC PGM=ICETOOL
//IN1 DD DSN=VSAMFILE1,
// DISP=(SHR,KEEP,KEEP)
//IN2 DD DSN=VSAMFILE2,
// DISP=(SHR,KEEP,KEEP)
//OUT DD DSN=DATX00D.CMBN.BF1231G,
// DISP=(NEW,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=327)
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(IN1) TO(OUT) VSAMTYPE(F)
COPY FROM(IN2) TO(OUT) VSAMTYPE(F)
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
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