MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Invoking Hash and Data Compression within COBOL Pgm

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
ChrisR
Beginner


Joined: 10 Jun 2007
Posts: 5
Topics: 1

PostPosted: Mon Jun 11, 2007 11:27 am    Post subject: Invoking Hash and Data Compression within COBOL Pgm Reply with quote

Our systems are COBOL VSAM. We need to be able to do two things

* Compress and de-compress large SINGLE fixed length records by calls to a routine from within a COBOL program.

* We need to pass single large records to a HASH routine from within a COBOL program.

A crude compression algorithm would yield large time disk-space/syncsort benefits.
Hundreds of thousands of records are transmitted to us daily. Often transmissions are duplicated but with different datetime stamps. We want to generate a database of unique hash keys of the meat of the data so that we can detect individual duplicates.

IBM software is rich in compression/hash/encription features, especially DB2 and archive/data migration utiities, but how to access these from within a legacy OS/MVS COBOL program without reprogrammiing published C routines in assembler or FORTRAN?

Any suggestions gratefully received,
Thanks
Chris
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon Jun 11, 2007 12:29 pm    Post subject: Reply with quote

ChrisR,

IMHO you can still invoke encryption/decrytpion modules even from OS/VS cobol provided that you have the right Language Environment. Check the appendix 1.4 for examples.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CSFB4Z50/CCONTENTS?DT=20041208103924

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ChrisR
Beginner


Joined: 10 Jun 2007
Posts: 5
Topics: 1

PostPosted: Mon Jun 11, 2007 2:16 pm    Post subject: Reply with quote

Thanks a milion. Lots to learn but the COBOL examples are a great help. Assume "generating a 128-bit modification detection code (MDC) for a text string that the application program supplies." will give us exactly what we need to detect our duplicate records received. Our text strings will be about 700bytes. Had figured to write those keys to a VSAM file.

Is there a similar set of data compression routines callable from COBOL?
Back to top
View user's profile Send private message
CICS Guy
Intermediate


Joined: 30 Apr 2007
Posts: 292
Topics: 3

PostPosted: Mon Jun 11, 2007 4:00 pm    Post subject: Reply with quote

Way back 'then' we'd hash a key to a record to build ISAM files, but for the life of me, I can't recall the process - It was simple, but it won't surface.....
What kind of compression are you looking for?
Trailing blank?
Duplicate character?
Eight bit alphanumeric to six bit?
I'll keep thinking on the hash, while wondering if hashing the original makes more sense than hashing the compressed.....
Back to top
View user's profile Send private message
ChrisR
Beginner


Joined: 10 Jun 2007
Posts: 5
Topics: 1

PostPosted: Mon Jun 11, 2007 7:15 pm    Post subject: Reply with quote

Hi CICS Guy. Thanks for your post.
Our first attempt calling a hash routine got RACFed so the system knew what we were looking for. We hope to get authorised and be experimenting there quite soon.

As for compression, we would like all of the above depending on the overhead. Our fixed length records are print records with white space, and data records with mostly alpha numeric and zoned numeric with a very few packed and binary numeric with often large portions of record area initialised to spaces or zero values, and also strings of nulls. Talking milions of records. Often voluminous large record size files are sorted on a key to inquire on and update just a couple of data flags. All this stuff is compressed for data transmission but I presume NOT for our multiple sorts. Figured to extract the key fields and flags, and tag them on to a compressed version of entire record to save oodles of space and time assuming any COBOL program can explode back to original format only when needed. IBM data archiving software must do this already.
Back to top
View user's profile Send private message
ChrisR
Beginner


Joined: 10 Jun 2007
Posts: 5
Topics: 1

PostPosted: Wed Jun 13, 2007 6:19 pm    Post subject: Reply with quote

Just discovered Assembler data compression macros CSRCSERV and CSRCMPSC.
They aint COBOL but seem to do what we want. Have gone grovelling to an assembler guru to see if we can expoit them as an in-house utility.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group