Skip to Content

How to show an animated gif with isCOBOL

Estimated Reading Time: 1 Minutes

To display a moving image, or .gif, use a label control, assigning a title in HTML code.

For example:

string '<html><img src="file:'   delimited by size
       path-gif                  delimited by trailing space
       '"></img>&lt/html>'         delimited by size
       into html-title.

Where "path-gif" is the path of the gif image and tit-html is the variable used for the gif's title.

In an Application Server's environment, the HTML code is rendered on the client, so we need to have the gif image on the client.

To do this we can use the "C$COPY" routine to copy the image from the server to the client.

Attached below is a Cobol sample program showing the code used to create the HTML code, and instructions on how to copy the image from the server to the client.  There is also an example in the %ISCOBOL%/sample/issamples/s-gui/label.cbl program.

How to show an animated gif with isCOBOL
  • Attached Files
  • animgif.cbl (4.42 KB) 268
  • lb.gif (8.83 KB) 253