Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 20, 2006 3:02 pm Post subject:
Here's a DFSORT/ICETOOL job that will do what you want. It's a bit tricky, but it does work. If a record with the condition is not present, it generates an OMIT COND=ALL statement for CTL2CNTL. If a record with the condition is present, it generates INCLUDE COND=ALL and OMIT COND=ALL statements for CTL2CNTL and the OMIT statement is ignored as a duplicate.
_________________ 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
Thanks you very much FRANK!! This is a very nice trick and it works great! Also it is a very good learning that if we use two COND statement in sysin , the second statement would get ignored..
Thanks again,
Jaya. _________________ "Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Sep 20, 2006 5:07 pm Post subject:
Quote:
Thanks you very much FRANK!! This is a very nice trick and it works great!
Yeah, it is a cute trick. Glad I could help.
Quote:
if we use two COND statement in sysin , the second statement would get ignored..
Actually, it's an INCLUDE statement and an OMIT statement in this case. COND is just the parameter. An INCLUDE statement and an OMIT statement are mutually exclusive so DFSORT will accept the first and ignore the second (third, ...) in any combination (INCLUDE and INCLUDE, OMIT and OMIT, INCLUDE and OMIT, OMIT and INCLUDE). Since you get a RC=0, it doesn't hurt anything in this case to have the duplicate statement. _________________ 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
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