PROGRAM-ID. animgif. WORKING-STORAGE SECTION. copy "iscrt.def". copy "isgui.def". copy "iscobol.def". 77 crt-status special-names crt status pic 9(5). 77 hWin handle of window. 77 control-font handle of font. 77 close-win pic 9 value 0. 77 html-title pic x any length. 77 path-gif pic x any length. 77 path-user-home pic x any length. 77 path-client-image pic x any length. 77 path-copy-client-image pic x any length. 77 wstatus pic s9. 77 sel-bg-color pic s9(9). 77 sel-fg-color pic s9(9). 01 file-info. 02 file-size pic x(8) comp-x. 02 file-date pic 9(8) comp-x. 02 file-time pic 9(8) comp-x. 77 Intro-Text pic x any length. SCREEN SECTION. 01 Mask. 03 LbB label line 3 col 11 lines 5 cells size 9 cells title html-title . 03 Pb-exit push-button line 10 col 20 size 8 cells title "Exit" exception-value 27 . PROCEDURE DIVISION. MAIN. * Create the HTML code for the label title perform LOAD-HTML. display standard graphical window background-low title "Anim Gif" lines 11 size 29 handle hWin event WIN-EVT display Mask accept mask until crt-status = 27 or close-win = 1 on exception continue end-accept destroy Mask destroy hWin destroy control-font goback . WIN-EVT. if event-type = cmd-close move 1 to close-win end-if . LOAD-HTML. accept terminal-abilities from terminal-info. initialize html-title. * create the path of image if is-remote * if we are in an Application/Server environment * I prepare the path of image on the client call client "C$GETENV" USING "user.home" path-user-home initialize path-client-image string path-user-home delimited by trailing space "/lb.gif" delimited by size into path-client-image * Check if the image already exist on the client call client "C$FILEINFO" using path-client-image, file-info giving wstatus evaluate wstatus when 0 continue when 1 * if the image doesn't exist on the client I copy the image * from the server to the client initialize path-copy-client-image string "@[DISPLAY]:" delimited by size path-client-image delimited by size into path-copy-client-image CALL "C$COPY" USING "lb.gif" path-copy-client-image end-evaluate move path-client-image to path-gif else * If we are in StandAlone environment I use directly the * name of the image move "lb.gif" to path-gif end-if * Create the HTML code for string '' delimited by size into html-title.