IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ICETOOL block compare


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Aug 26, 2010 11:00 pm
Reply with quote

Ronald Burr,

Correction. I did NOT assume that key is complete 381 bytes or neither it is my Invention. OP himself stated that complete 381 bytes needed to considered.

ibmmainframes.com/viewtopic.php?p=246581#246581

CICS fan wrote:
The number of AA records can be anything from equal to greater than zero.
And, yes, complete 381 bytes need to be considered.


Thank You
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 26, 2010 11:28 pm
Reply with quote

Mr. Burr,

you missed a key ingredient - 381 that is what is compared.

yes, your code will possibly work (once you change from 255 to 381).
but what is there are 86 AA segments?
at some point, given the 'rather' flexible requirements by the TS,
providing the validation necessary will probably require
  • appending sequence numbers in a sort
  • using COBOL internal tables to perform the validation and duplicate removal
  • a final sort dropping the sequence numbers


But that is just my opinion, and like other things, everyone has one.

give it a #&@ rest.
Back to top
View user's profile Send private message
CICS fan

New User


Joined: 03 Apr 2008
Posts: 82
Location: United States

PostPosted: Fri Aug 27, 2010 8:35 am
Reply with quote

Thanks Ronald, I was designing something on your line and came back here and tok valuable inputs from your post. I guess I cannot thank you enough.
Back to top
View user's profile Send private message
smijoss

Active User


Joined: 30 Aug 2007
Posts: 114
Location: pune

PostPosted: Fri Aug 27, 2010 10:52 am
Reply with quote

CICS fan,

dont take things to the heart,
we are just to find solutions to our requirements. You must agree by now that your requirement was unrealistic.
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Fri Aug 27, 2010 10:07 pm
Reply with quote

dbzTHEdinosauer wrote:
besides, you missed a key ingredient - 381 that is what is compared.

Actually, it is YOU who missed the key ingredient - the entire BLOCK ( from one 'ZZ' record to the next 'ZZ' record or EOF ), not just 381 bytes, is what should be compared - and that is exactly what my program does.

dbzTHEdinosauer wrote:
yes, your code will possibly work (once you change from 255 to 381).

Possibly work? Once I change the VSAM KEY from 255 to 381 ( which, as Kolusu pointed out, is not possible )? Fact: My program DOES work - just the way it is. The VSAM key is just an easy way to filter out the records that do not match early on: if the blocks don't match on the first 247 bytes, then there is no point in further comparison - they don't match, period; if they DO match on the first 247 bytes but the segment counts do not match, likewise, there is no point in further comparison; but, if both the first 247 bytes AND the segment counts match, then further comparison (up to the full block length, if needed), is required to make a final determination.

dbzTHEdinosauer wrote:
but what is there are 86 AA segments?

If there are more than 84 'AA' segments, then the program will display an error message (with record counts), and terminate with an RC=16.
What do YOUR programs do if a subscript or index exceeds the the number of defined OCCURS for an element in a table or array?

By the way, since when does anyone other than an OP and his/her company decide whether a requirement is "nonsensical" or "unrealistic"? In the real world *stuff* happens all the time - and that can result in a file that has a lot of extraneous data in it that shouldn't be there. But if a "good" file cannot be created, and the corrupted file is the only file available to try to salvage the "good" data and get rid of the "bad", then a requirement to do that by whatever means are available is not only realistic but also makes sense.
Just because a DFSORT solution wasn't in the cards doesn't mean that the basic requirement is flawed. It would have been more appropriate in this case to simply state that no DFSORT solution was practical given the requirements as stated - and suggest that the thread be renamed and moved to the a different category.

As an aside, it should be quite easy to develop a DFSORT solution to find the maximum number of 'ZZ' blocks and the maximum number of 'AA' seqments contained within any 'ZZ' block.

As far as my program is concerned, if the maximum number of 'AA' blocks is more than 84, then, obviously, the code, as written, would not be able to handle the task - though it COULD be modified to handle larger blocks without too much trouble (e.g. spanned VSAM records ).
Likewise, if the number of 'ZZ' blocks would exceed the available capacity for the VSAM KSDS, then a method would have to be developed to process the input file in a different manner - e.g. break the original input file into two files (A and B) between an 'AA' and 'ZZ' record; process file A creating file C; process file B creating file D; then process the concatenation of files C and D creating the final output file. In any case, no "sorting" would be done to create the final file - all records would remain in their original order.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Aug 27, 2010 10:26 pm
Reply with quote

Quote:
Possibly work? Once I change the VSAM KEY from 255 to 381 ( which, as Kolusu pointed out, is not possible )? Fact: My program DOES work - just the way it is.


Ronald,

Please define a VSAM KSDS with keys(256 0) and let us all know if it does WORK. AFAIK I know the key can be a max of 255 bytes.

Here is a manual link for Define CLUSTER parameters. This is valid for z/OS V1R11.0

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2I280/14.1
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Aug 27, 2010 10:26 pm
Reply with quote

Guys - this thread has gone "way over the top". I removed all of the "j'accuse" stuff and will continue to do so if people continue to post more. Let's keep it civil and helpful, please.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Aug 27, 2010 10:32 pm
Reply with quote

Quote:
"j'accuse"


Frank,i love it when you talk dirty!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Aug 27, 2010 10:41 pm
Reply with quote

Well, I originally used the phrase "he said/she said" but realized there probably weren't any women participating in this thread. So I changed to "j'accuse" which seems to fit better anyway.

I don't understand why people are getting so argumentative and "personal" in these threads lately. I hate having to clean it all up. I wish it would stop!
Back to top
View user's profile Send private message
Ronald Burr

Active User


Joined: 22 Oct 2009
Posts: 293
Location: U.S.A.

PostPosted: Sat Aug 28, 2010 2:15 am
Reply with quote

Skolusu wrote:
Quote:
Possibly work? Once I change the VSAM KEY from 255 to 381 ( which, as Kolusu pointed out, is not possible )? Fact: My program DOES work - just the way it is.


Ronald,

Please define a VSAM KSDS with keys(256 0) and let us all know if it does WORK. AFAIK I know the key can be a max of 255 bytes.

Here is a manual link for Define CLUSTER parameters. This is valid for z/OS V1R11.0

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2I280/14.1

Kolusu,
Why would I want to attempt to define a VSAM KSDS Key as 256 bytes when we all (should) know that the maximum keylength allowable is 255 bytes?
The obvious answer is: I wouldn't, and I didn't. In the code I posted, the VSAM File Record contained this definition of the KEY.
Code:
              10 VSAM-SEG1-KEY.
                 15 VSAM-SEG1-ID       PIC X(251).
                 15 VSAM-SEG1-SEQ      PIC S9(9)  COMP-5.

When I studied COBOL a COMP-5 field with a picture of S9(9) took up 4 bytes. Add that to the SEG1-ID of 251 bytes and you get (surprise) just 255 bytes - a perfectly acceptable VSAM KSDS keylength.

Here is a manual link for the definition of COMPUTATIONAL Items:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3LR50/5.3.17.1?SHELF=&DT=20090821081020&CASE=
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Aug 28, 2010 1:49 pm
Reply with quote

Three cheers for Ronald Burr he had the last word!
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Aug 30, 2010 11:14 pm
Reply with quote

No, you did. icon_lol.gif (Now I did.)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
Search our Forums:

Back to Top