Posted: Thu Mar 01, 2007 11:29 pm Post subject: Maintain duplicate in a group of records
My requirement is like :
Input :
-------
AAA - Group1
BBB
CCC11
CCC22
DDD
AAA - group2
CCC11
CCC11
DDD
AAA - group3
CCC22
EEE
The input file will have groups of records start from AAA and ends in any record DDD or EEE. Its like a group starts only with AAA.
1.When a CCC record occurs in a single group multiple times , all those records needs to be maintained.
2.If CCC record occurs in a group only once , that CCC record should be eliminated from the Group.
3. Eventhough CCC record occurs in a group multiple times and it has
same values in the 4th and 5th position then both CCC record should be eliminated Ex : CCC11 and CCC11 in a samegroup , both record should be eliminated , if CCC22 and CCC11 both should be written.
The output should be , for the input given above:
AAA - group1
BBB
CCC11
CCC22
DDD
AAA - group2
DDD
AAA - group3
EEE
This can be done in a program or SELCOPY(i haven't tried) , can it be done by means of JCL???
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Fri Mar 02, 2007 4:12 am Post subject:
NO - JCL lets the machine know which programs you want to execute and what datasets your program needs - not what data within the datasets. (If SELCOPY is not a program what is it?) _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Many times i have written a program for a certain requirement , but later when I come across the forum I found that the requirement i had is been done very simply...
many times yourself and Frank yeager has a solution that will make me surprised.
thats the reason why i have posted the query...the solution seems to be
reachable either by jcl or by some utilities...
How can i educate you kolusu ??? , I am just 2 yrs old in mainframe...
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Fri Mar 02, 2007 9:14 am Post subject:
If after 2 years in a mainframe environment you do not know what JCL is for and how it differs from other languages and tools then i am surprised that the world still spins on its axis. Get yourself on a JCL course - you should have gone on one within 1 week of starting on a mainframe. Actually there is an online one provided by IBM - there is a link in one of the forums - or maybe several of them - otherwise just go to IBM's website and search on JCL Course or similar. I was looking at it the other day because you never know when something new will pop up. I'm sure Kolusu will be able to offer you a more simple and surprising answer! _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
Posted: Fri Mar 02, 2007 9:17 am Post subject:
mainframemouli,
either you are being facetious or your command of english is rudimentary.
JCL = Job Control Language As Nic said, JCL does not do anything other than establish an environment in which the STEPs of the JOB can be run (execute).
Sort Control Cards ARE NOT JCL
Quote:
reachable either by jcl or by some utilities
should be
Code:
achievable by some utility
Quote:
How can i educate you kolusu ??? Smile , I am just 2 yrs old in mainframe...
your attempt at humor is wasting the boards time; I am answering you because you have missed the point. you do not seem to know what JCL is. _________________ Dick Brenholtz
American living in Varel, Germany
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
dbzTHEdinosauer,Nic Clouston.
I undrestood the mistake of mine. I should not mentioned it as jcl or should not have posted in this category. I assure you that it won't happen again.
Frank,
The output for the input you have mentioned will be.
In group 1 the First occurance of CCC11 is eliminated .
In group 2 1 occurance of CCC11 and Last two occurance of CCC22 got eliminated.
In group 3 all the occurance of CCC11 has been eliminated.
The basic idea is CCC11 record should be followed by a CCC22 record , if so that combination need to be maintained else if only CCC11 or CCC22
occurs in a group ( AAA is the starting of the group) those records needs to be eliminated.
Thats why in Group 1 first occurance of CCC11 got eliminated since it doesn't have a CCC22 record folowing it. In Group 2 the first occurance of CCC11 got eliminated and last two CCC22 , in group 3 no combination CCC11 and CCC22 hence all the CCC's got eliminated.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum