Load images to a VSAM file



Help for IBM's record-oriented filesystem VSAM, ESDS, KSDS, RRDS, LDS and Storage management Subsystems

Load images to a VSAM file

Postby ash4u » Thu Apr 29, 2010 4:37 am

Hi..

Can anyone help me to know if we can upload images to a VSAM (KSDS) file. As of now we use PDS members to load the images and use it for statement documents. Now i need to load these to a VSAM as there can be so many images and I just cant have that much members for my PDS.
Basically I am looking for is, can I have all my image members copied to a VSAM file, where key will be used to identify the image name. Key will have the image name and data will have the binary image uploaded for this KSDS.

Thanks in advace for your help!!
ash4u
 
Posts: 3
Joined: Thu Apr 29, 2010 4:30 am
Has thanked: 0 time
Been thanked: 0 time

Re: Load images to a VSAM file

Postby Robert Sample » Thu Apr 29, 2010 5:23 am

How many images are you dealing with? We have PDS files at our shop with 4,000 members in them.

As far as I know, there's no problem with doing what you want as long as the images are small enough to fit into one record. And if they're fitting into a PDS, they should fit into a VSAM KSDS.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Load images to a VSAM file

Postby ash4u » Thu Apr 29, 2010 9:21 am

Basically these are going to be cheque images for a customer....so there can be any no of customers and each one customer may have any no of cheques for a cycle......thats why Im bothered to use PDS members for these images. We are going to ask other team to get that available somewhere on mainframe from where I can pick up to display it on statements... and also there can be sceanario where 2 customers can have same cheque numbers and I just cant have image names (member) unique due to limitaion of 8 bytes length for a member name.............please suggest where and how I can store these images without any limitation and easy to retrieve..?
Also if I have suppose 10 PDS member images, can I have it copied to a VSAM, where I can use some key to link each image...e.g. key will be account number and the data part will have the respective image..so VSAM will have 10 entries with acct number as a key and the respective image for each acct number as data part......

Thanks for all ur help!
ash4u
 
Posts: 3
Joined: Thu Apr 29, 2010 4:30 am
Has thanked: 0 time
Been thanked: 0 time

Re: Load images to a VSAM file

Postby dick scherrer » Thu Apr 29, 2010 10:10 am

Hello,

Be prepared for the same customer to submit the same check number more than once. . . It happens ;)

Has anyone considered storing these check images in a database?

Whether you use vsam or a database, you need to write a bit of code that reads the uploaded images one-by-one and writes them to the vsam file or the database. I'd suggest that the "key" be part of the input record that also contains the image so that this new code simply reads the file and writes to the random data (vsam or db).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Load images to a VSAM file

Postby ash4u » Thu Apr 29, 2010 11:31 am

Thanks for ur suggestions!

I tried to upload the JPG image to a PS file, being a check image, its quite big and takes more than one line records. The PS file used is FB with record length of 32756. Please suggest, if the image is taking more than one line record, can we have it stored in VSAM for a particular key? And how can i define a KSDS which will have first 16 bytes (e.g. acct number) and the rest is binary data for image?
ash4u
 
Posts: 3
Joined: Thu Apr 29, 2010 4:30 am
Has thanked: 0 time
Been thanked: 0 time

Re: Load images to a VSAM file

Postby Robert Sample » Thu Apr 29, 2010 4:44 pm

Choosing either PDS or VSAM is a pretty bad choice for this data. It should be stored as a BLOB in a database, which does not have the record length limitations of z/OS files. If you add a sequence number to your key, then yes you can split the image into multiple records and store them in a VSAM file. However, you then have to do additional work in your application to ensure you retrieve all records and splice the image together correctly.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times


Return to VSAM/SMS

 


  • Related topics
    Replies
    Views
    Last post