I want to have a report of number of different values found for name DATA, The name DATA will be the same in all detail records, only the
value could change,example PRODFILE,TESTFILE,DCARDFILE ....
I want to have a report of number of different values found for name DATA.
DATA PRODFILE = 2
DATA TESTFILE = 1
And if the value of DATA is not distinct, like in this case, I want the step to have a return code greater than 0, else a 0.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Mar 06, 2007 11:05 am Post subject:
Kolusu,
I don't understand your example. It didn't seem to work when I tried it. Unless I'm missing something, SORT FIELDS=(1,5,CH,A) and SUM FIELDS=NONE will result in only one record for '2DATA', so I don't see how it can work.
Shuko,
I believe the following DFSORT job would give the needed report:
And if the value of DATA is not distinct, like in this case, I want the step to have a return code greater than 0, else a 0.
I don't understand what you mean by this. Please explain in more detail what you want. _________________ 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
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Mar 06, 2007 11:12 am Post subject:
Frank Yaeger wrote:
Kolusu,
I don't understand your example. It didn't seem to work when I tried it. Unless I'm missing something, SORT FIELDS=(1,5,CH,A) and SUM FIELDS=NONE will result in only one record for '2DATA', so I don't see how it can work.
Frank,
I am actually summing on the constants I put at the end. Basically the requirement is to check the counts of "prodfile, testfile and dcardfile". If the count of all these are equal then set the return code to zero and if they don't match then you need to set the return code to greater than zero.
So I used IFTHEN to populate constants based on the character found at 34 and Summing on the constants to get 1 single record and using include cond on the OUTFIL I am comparing the counts.
And if the value of DATA is not distinct, like in this case, I want the step to have a return code greater than 0, else a 0.
Frank
I just want to ensure that the first value found for DATA is the same for each of the following detail records with the name DATA. In my example I have DATA PRODFILE=2 and DATA TESTFILE =1, here a return code > 0.
(expected DATA PRODFILE and not DATA TESTFILE)
If I had DATA PRODFILE=3 and no DATA TESTFILE, then a return code = 0.
(All DATA values are the same). I just hope I expressed myself properly.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Mar 06, 2007 1:50 pm Post subject:
shuko,
What is the return code if you had DATA TESTFILE=3 and no DATA PRODFILE ? Similary what is the return code it you had only DCARDFILE and no TEST/PROD file?
If the same rules apply as you mentioned for PRODFILE, then following JCL will give you the desired results.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Mar 06, 2007 3:57 pm Post subject:
Quote:
I am actually summing on the constants I put at the end. Basically the requirement is to check the counts of "prodfile, testfile and dcardfile". If the count of all these are equal then set the return code to zero and if they don't match then you need to set the return code to greater than zero.
So I used IFTHEN to populate constants based on the character found at 34 and Summing on the constants to get 1 single record and using include cond on the OUTFIL I am comparing the counts.
Kolusu,
Sorry, don't know why I got it in my head that you were using SUM FIELDS=NONE.
However, I thought the idea was to get the report regardless of whether RC=0 or RC=4 should be passed back. When I ran your original job, I didn't get the report lines. That's because the counts in your single output record are 2, 1 and 0, so the OUTFIL INCLUDE deletes that single record and the OUTREC has no record to operate against.
Seems like we could just produce the report with SECTIONS and then process that output to determine when to set RC=0 or RC=4 (a tad more processing, but perhaps simpler conceptually) . But I can't figure out from shuko's explanation when he wants RC=0 or RC=4, so I'll leave it to you. _________________ 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