ok i have a data set and i want to extract the foloowing ssns '123450000' from column 7 into a separate data set.
2 then create a second job step to extract from the data set created the following fund code (from column 3) into yet another data set .
my email is josepnass@hotmail.com ideas welcome and examples of course thanks Mary
please advise me in jcl
Moderators: Frank Yaeger, DikDude, Moderator Group
-
- Member
- Posts: 5
- Joined: Wed Jul 30, 2008 6:41 am
- Location: wash dc
please advise me in jcl
MAry J
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
You can do this all in one pass with DFSORT. You didn't say what "the following fund code" is so I'll assume it's '123' for the example.
If you need more specific help, explain in more detail what you're trying to do.
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:
www.ibm.com/servers/storage/support/sof ... tmpub.html
Code: Select all
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//OUT1 DD DSN=... output file1
//OUT2 DD DSN=... output file2
//SYSIN DD *
OPTION COPY
INCLUDE COND=(7,9,CH,EQ,C'123450000')
OUTFIL FNAMES=OUT1
OUTFIL FNAMES=OUT2,INCLUDE=(3,3,CH,EQ,C'123')
/*
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:
www.ibm.com/servers/storage/support/sof ... tmpub.html
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: 5
- Joined: Wed Jul 30, 2008 6:41 am
- Location: wash dc
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
The job I gave you produces the output data sets you asked for. Just substitute the constants you want for the ones I used in the example, e.g. use C'123000000' instead of C'123450000' and use 'C'131' instead of C'123'.
The OUT1 data set will contain all of the records with '123000000' and the OUT2 data sets will contain all of the records with '123000000' that also have '131'.
Isn't that what you want? Try it.
Is there some reason you want to do this in two steps rather than one step?
The OUT1 data set will contain all of the records with '123000000' and the OUT2 data sets will contain all of the records with '123000000' that also have '131'.
Isn't that what you want? Try it.
Is there some reason you want to do this in two steps rather than one step?
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: 5
- Joined: Wed Jul 30, 2008 6:41 am
- Location: wash dc
- Frank Yaeger
- Moderator
- Posts: 812
- Joined: Sat Feb 18, 2006 5:45 am
- Location: San Jose, CA
- Contact:
No.when u say pgm-iceman do i have to create a cobol pgm
You must be very new to the z/OS world.
PGM=ICEMAN invokes the sort product installed at your site. A sort product (e.g. IBM's DFSORT) is a "utility" - a general purpose program that performs many functions.
Do you have access to a z/OS system? Do you know how to run a job? If so, then try running the job I posted by:
1. Adding your JOB card before my statements
2. Changing the //SORTIN DD to point to your input file or to the following if you don't have an input file to use:
Code: Select all
//SYSIN DD *
01123 123450000
02123 123450001
03122 123450000
04123 123450000
05122 223450001
06123 123450000
Code: Select all
//OUT1 DD SYSOUT=*
//OUT2 DD SYSOUT=*
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