Use byte-stream library routines to easily embed a file in a Vision file



Need a simple way to embed a file in a Vision data file.


The byte-stream library routines (cbl_*_file) provide an easy way to embed files into a Vision data file.

Here are the basic steps:

1. cbl_open_file: Open the file.

2. cbl_read_file: Get the file information by using a special flag.

3. cbl_read_file: Read the file into working-storage.

That's it! Now simply write the data into the Vision file.

Attached is a sample program, imagetest.cbl, demonstrating how to embed an image file in a Vision file using this method.  Extracting the file from the Vision file is equally simple and is also demonstrated in the sample program.  Details of the various byte-stream routine parameters are noted in the source.  You will also find those details in the documentation for those

Comment List
Related Discussions