Page 1 of 1

Generate hash/checksum and append

PostPosted: Fri Oct 28, 2011 4:00 pm
by stevexff
I have a requirement to generate a 16-byte checksum value for a record and append it to the record. The E35 exit seems like the right place to do it, and if I'm going to the trouble to write one I may as well make it generic. This is easy enough for variable length records as the record passed to the exit has an RDW on the front which gives the length. Is there any way I can obtain the LRECL in the E35 exit for fixed length records? An alternative would be to FTOV the records so by the time the exit gets hold of them they would have an RDW, but I was hoping there was a cleaner way of doing it.

Re: Generate hash/checksum and append

PostPosted: Fri Oct 28, 2011 4:56 pm
by BillyBoyo
Interesting.

A record-level checksum seems like belt-and-braces-made-of-titanium-wolfram-diamond-and-then-hardened. Ultra-security? You have to kill me if you tell me what it is for?

Assembler? Presumably you prepare the file by extending the lrecl prior to the sort?

If you append to the record, you're making it more "difficult" to find, but again I'd guess you are going to read them in Assembler?

With the Fixed, again you'd need to pre-extend the records. Maybe that gives you a good moment to make them variable?

I've previously looked a little at getting length for a fixed file to the exit. I couldn't find anything that convenient, doesn't mean the DFSORT experts won't have some ideas later.

To make it worth making it generic, I guess you're looking at using for a number of datasets? Else why bother?

Interesting. You doing a simple hash? Whoops... forget I asked that, I have family...

Re: Generate hash/checksum and append

PostPosted: Wed Nov 02, 2011 2:02 am
by Frank Yaeger
Is there any way I can obtain the LRECL in the E35 exit for fixed length records?


DFSORT does NOT have any built-in function for that.