Loading images/docs into a VSAM file
-
- Posts: 3
- Joined: Thu Mar 22, 2012 1:42 pm
- Skillset: IBM Mainframes, JCL, COBOL, VSAM, DB2
- Referer: Internet
Loading images/docs into a VSAM file
What is the process to load images / documents (like PDF files..) into a VSAM file. Also how to copy it to another VSAM file?
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Loading images/docs into a VSAM file
the question as posed makes little sense, too generic...
You can load/insert things according to the VSAM logic
build a record containing whatever You want and WRITE/INSERT/UPDATE the <thing>
and do not complain, please, You got what You asked for
You can load/insert things according to the VSAM logic
build a record containing whatever You want and WRITE/INSERT/UPDATE the <thing>
and do not complain, please, You got what You asked for
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Global moderator
- Posts: 3805
- Joined: Tue Jan 25, 2011 12:02 am
- Skillset: Easytrieve Plus, Cobol, Utilities, that sort of stuff
- Referer: Google
Re: Loading images/docs into a VSAM file
Any type of file is just data, 256 combinations per byte.
As long as the data fits within mainframe constraints, they can be put into a VSAM file.
If they don't currently fit, you can always make it so...
Don't expect to be able to double-click and read it from a batch program
As long as the data fits within mainframe constraints, they can be put into a VSAM file.
If they don't currently fit, you can always make it so...
Don't expect to be able to double-click and read it from a batch program

-
- Posts: 3
- Joined: Thu Mar 22, 2012 1:42 pm
- Skillset: IBM Mainframes, JCL, COBOL, VSAM, DB2
- Referer: Internet
Re: Loading images/docs into a VSAM file
To elaborate the question further, is it possible to load the images / pdf files to a VSAM file thru a COBOL program, just like loading regular data (text and hexadecimal values) to a VSAM file. If YES, how to read images, pdf files thru the COBOL program. Any sample files and sample programs to read / write images / pdf files into VSAM files are available to view?
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Loading images/docs into a VSAM file
Yes, of course -- data is data is data is data. Note, however, that PDF files are frequently larger (much larger) than the typical 32760-byte record length limit of the mainframe, so your program will have to work out a way to split the PDF file into some number of records.To elaborate the question further, is it possible to load the images / pdf files to a VSAM file thru a COBOL program
With a READ statement in COBOL -- just like any other data. PDF file data is nothing but data to COBOL.how to read images, pdf files thru the COBOL program
THAT's not going to happen -- a PDF file can be handled as an image on the mainframe through Unix System Services (I use them on my internal HTML pages at my site), but as far as I know there is no PDF viewer available for COBOL on z/OS. And since you would need a graphics device -- not the 3270 emulator software usually used to connect to the mainframe -- to even view the PDF file, there would be many, many, MANY issues in even attempting to view a PDF with a mainframe program.read / write images / pdf files into VSAM files are available to view?
-
- Posts: 3
- Joined: Thu Mar 22, 2012 1:42 pm
- Skillset: IBM Mainframes, JCL, COBOL, VSAM, DB2
- Referer: Internet
Re: Loading images/docs into a VSAM file
Ok. I understand that it may not be possible to view the VSAM file (containing images / pdf file) in mainframe Z/OS. But is it possible to transmit / extract that VSAM file to UNIX or a different system thru FTP/NDM and view the file in the destination system. If yes, is there any sample code to transmit /extract this VsAM file to a different system?
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Loading images/docs into a VSAM file
Write a program to chop up the PDF into record-sized blocks of data and place in the VSAM file.
Write another program to read the VSAM file and rebuild the original PDF in a Unix System Services file. Your PC browser can then view the image on Unix System Services (assuming the HTTP server, or any equivalent from another software vendor, is running and has a specification for a PDF file).
Neither of these programs would be particularly hard to write in C (for example). I sincerely doubt you would find any examples since you're asking about a VERY hgihly specialized need -- but on the other hand, I've been surprised by what is available in the past.
Write another program to read the VSAM file and rebuild the original PDF in a Unix System Services file. Your PC browser can then view the image on Unix System Services (assuming the HTTP server, or any equivalent from another software vendor, is running and has a specification for a PDF file).
Neither of these programs would be particularly hard to write in C (for example). I sincerely doubt you would find any examples since you're asking about a VERY hgihly specialized need -- but on the other hand, I've been surprised by what is available in the past.
-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Loading images/docs into a VSAM file
what is that is not clear?
vsam DOES not care about the content of the record, they are just sequences of bits.
the same for FTP/NDM they are just truckers who carry boxes without caring for the content.
it' s somebody' s else task to interpret those bits according to some <whatever> logic. AMEN
vsam DOES not care about the content of the record, they are just sequences of bits.
the same for FTP/NDM they are just truckers who carry boxes without caring for the content.
it' s somebody' s else task to interpret those bits according to some <whatever> logic. AMEN
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
-
- Similar Topics
- Replies
- Views
- Last post
-
- 0
- 1164
-
by gascolese
View the latest post
Fri Sep 03, 2021 4:57 pm
-
- 2
- 1459
-
by naga821
View the latest post
Fri Oct 28, 2022 7:31 pm
-
-
How to import a ZFS data file into VSAM catalog
by danik56 » Tue Nov 23, 2021 10:29 pm » in VSAM/SMS - 0
- 3410
-
by danik56
View the latest post
Tue Nov 23, 2021 10:29 pm
-
-
- 3
- 7914
-
by socker_dad
View the latest post
Thu Jan 28, 2021 4:13 am
-
- 2
- 1429
-
by Robert Sample
View the latest post
Fri Oct 22, 2021 9:41 pm