Copying Vsam contents into a flat file based on the key cond
Moderator: Moderator Group
Copying Vsam contents into a flat file based on the key cond
Hi guys,
I want to copy the records from a VSAM into a flatfile based on the key condition, I want to use the repro commamnd could u pls suggest me any suitable method.
eg: key field
12ab34567
12cd84393
46ab88380
78ab93909
84cd94923
output should contain only
12ab34567
46ab88380
78ab93909 the third n fourth position of the key should be compared.
I want to copy the records from a VSAM into a flatfile based on the key condition, I want to use the repro commamnd could u pls suggest me any suitable method.
eg: key field
12ab34567
12cd84393
46ab88380
78ab93909
84cd94923
output should contain only
12ab34567
46ab88380
78ab93909 the third n fourth position of the key should be compared.
-
- Active Member
- Posts: 732
- Joined: Thu May 24, 2012 4:07 am
One more thing, I just came across commands such as INCCHAR and INCREL, which exactly does wat I want,but this parameter should be used only with CPYF command.So could any one tell me whether this CPYF (copy file)command be used in JCL,If it could be used what shoud be PGM=
here is the link for details the two parameters
http://pic.dhe.ibm.com/infocenter/iseri ... opyrec.htm
http://pic.dhe.ibm.com/infocenter/iseri ... pyreco.htm
here is the link for details the two parameters
http://pic.dhe.ibm.com/infocenter/iseri ... opyrec.htm
http://pic.dhe.ibm.com/infocenter/iseri ... pyreco.htm
I am using z/OS system only.
We already have a JCL which extracts records based on key field character using repro fromkey tokey, I need to add two more comparison valueS to the key field, I mean totally three key field values to be picked up from the whole of VSAM.For that I might need to use fromkety tokey three times.So wanted to know whether i can use the CPYF command along with INCCHAR and INCREL.
We already have a JCL which extracts records based on key field character using repro fromkey tokey, I need to add two more comparison valueS to the key field, I mean totally three key field values to be picked up from the whole of VSAM.For that I might need to use fromkety tokey three times.So wanted to know whether i can use the CPYF command along with INCCHAR and INCREL.
-
- 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