Joined: 10 Mar 2005 Posts: 41 Location: United States Of America
I have a query if anybody can helpout this.
I have an employee file having empno,name,address etc... Whenever an employee moves from one place to another his address changes and we need to create one more record for that employee with the same empno.
Ex: say empno 1234
1234 - Name1 - Address 1
1234 - Name1 - Address 2
Hence our file will have some employees having single instance and have some employees have more than once instance ( 2 or many).
I just want to pull only those employees who have transferred at least once. I mean to say those having multiple instances based on EMPNO.
It would be easy to write a cobol program and can do the elimination. But it would be great if anybody can solve this using JCL or using any TOOL which pulls multiple records ONLY.
* Make sure i don't want those records having single instances.
Appriciate if anybody can respond with a resolution.
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:
In your DFSORT/ICETOOL job, you have the following in //OUT:
It's best NOT to specify these attributes in the output DD statement, so DFSORT can set them automatically for you. That way, you could use this same JCL regardless of the input attributes. The way you have it set up, it will only work for an input file with RECFM=FB and LRECL=80. If you remove the attributes from the DD statement, it will work for an input file with any attributes (e.g. RECFM=FB and LRECL=500).