Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ online(1) — Micro Focus COBOL 3.1.39

Media Vault

Software Library

Restoration Projects

Artifacts Sought

   =========================================================================

              M I C R O   F O C U S   C O B O L   T O O L B O X

                                   V3.1.39

               Running Under The DG/UX Operating System Version 5.4.2
                                On The AViiON
   =========================================================================

                 ON-LINE HELP SYSTEM DEMONSTRATION PROGRAMS
                 ==========================================

   This document provides replacement sections for the chapter "On-line Help
   System" in your Toolbox Operating Guide.

   TABLE OF CONTENTS
   =================
       INTRODUCTION
       EXAMPLE SOURCE FILE
       DESCRIPTION OF EXAMPLE SOURCE FILE
       EXAMPLE CALLING PROGRAM
       DESCRIPTION OF EXAMPLE CALLING PROGRAM


   INTRODUCTION
   ============
   The sections "Example Source File" and "Description of Example Source
   File" in this document replace the section "Example Source File" on
   page 21-55.

   The sections "Example Calling Program" and "Description of Example
   Calling Program" in this document should be inserted before the section
   "Shipping Hyhelp and On-line" on page 21-63.

   EXAMPLE SOURCE FILE
   ===================
   The following file, onlex.txt is an example of an on-line help source
   file and is supplied as part of Toolset and Toolbox. When compiled, it
   forms a simple on-line help system, showing some of the questions
   frequently asked of Technical Support.

   To be able to use onlex.txt you need to compile it using Ohbld. The
   section "Running the On-line Help Builder" earlier in this chapter shows
   how you do this. As onlex.txt contains index and table of contents
   entries, you should use the /INDEX and /CONTENTS Ohbld directives. For
   example, you should use the following command on DOS or OS/2:

       run ohbld onlex.txt /index /contents

   This creates the file onlex.hnf which you can make use of by running
   Hyhelp or On-line. See the section "Invoking Hyhelp and On-line" earlier
   in this chapter for information on invoking Hyhelp or On-line. For
   example, you should use the following command to use onlex.hnf with
   Hyhelp on DOS or OS/2:

       hyhelp onlex!

   You must ensure that onlex.hnf is either in the current directory or in a
   directory specified by the COBHNF environment variable.

   onlex.hnf is used in conjunction with a demonstration showing a COBOL
   program calling an on-line help file. See the section "Example Calling
   Program" later in this chapter for more information.

   The line numbers in this demonstration file have been included here for
   your convenience; they are not included in onlex.txt.

     1 .title On Line Information System Example
     2
     3 .comment ********************************************************
     4 .comment * Copyright Micro Focus Limited 1993.    All Rights    *
     5 .comment * Reserved. This demonstration program is provided for *
     6 .comment * use by users of Micro Focus products and may be used,*
     7 .comment * modified and distributed as part of your application *
     8 .comment * provided that you properly acknowledge the copyright *
     9 .comment * of Micro Focus in this material.                     *
    10 .comment ********************************************************
    11
    12 .define @cobcli  @1
    13 .define @rtserr  @2
    14 .define @direct  @3
    15 .define @exegnt  @4
    16
    17 .context onlex
    18 .browse #1 @0 @cobcli
    19 .topic A few questions frequently asked of Technical Support
    20 :p.
    21
    22 :dl.
    23
    24 :dt. \i\p\aCOBCLI\v@cobcli\v\i\p
    25 :dd. \bcobcli\p Not Found
    26
    27 :dt. \i\p\aRTSERR\v@2\v\i\p
    28 :dd. RTS Errors
    29
    30 :dt. \i\p\aDIRECT\v@3\v\i\p
    31 :dd. Directive Hierarchies
    32
    33 :dt. \i\p\aEXEGNT\v@exegnt\v\i\p
    34 :dd. \b.exe\p vs \b.gnt\p Files
    35
    36 :edl.
    37
    38 .comment ************** QUESTION 4: EXE & GNT **************
    39 .context @exegnt
    40 .browse #1 @direct @0
    41 .topic How does an .exe file differ from a .gnt file?
    42
    43 :p. The biggest difference between an \b.exe\p file and a \b.gnt\p
       file is
    44 that \b.gnt\p (generated) code files are fully relocatable and
       swappable
    45 under the memory management of the Run-Time Environment, where
    46 industry-standard \b.exe\p files are subject to the memory management
       of the
    47 resident operating system.
    48
    49 :p. If you are using DOS, Windows or OS/2, see the chapter
       \bCreating

    50 Applications\p in your \bPC Programmer's Guide\p for more
       information.
    51
    52 .comment ************** QUESTION 3: DIRECTIVES *************
    53 .context @direct
    54 .browse #1 @rtserr @exegnt
    55 .topic Directive Hierarchy
    56 :i1.directive hierarchy
    57
    58 :p. How should the Compiler directives be managed?
    59
    60 :p. The Compiler processes directives in the following order:
    61
    62 :dl tsize=20 break=fit.
    63
    64 :dthd. \uLocation\p
    65 :ddhd. \uDescription\p
    66
    67 :dt. Default values
    68 :dd. These are what the directives are set to by default.
    69
    70 :dt. \bcobol.dir\p file
    71 :dd. The values in your \bcobol.dir\p file.
    72
    73 :dt. Operating system command line
    74 :dd. The values specified on the operating system command line.
    75
    76 :dt.  A directives control statement you can insert in your program.
    78
    79 :dt. DIRECTIVES
    80 :dd. Two directives (called DIRECTIVES and USE) enable you to specify
    81 directives to be read from a file.
    82 :edl.
    83
    84 :p. For more information, see your \bCOBOL System Reference\p.
    85
    86 .comment ************** QUESTION 2: RTS ERRORS *************
    87 .context @rtserr
    88 .browse #1 @cobcli @direct
    89 .topic RTS Errors
    90 :i1. RT198 error
    91
    92 :p.What is causing run-time error          198?
    93
    94 :p.These are some possible reasons:
    95
    96 :ul.
    97
    98 :li.Not enough memory
    99 :li.Not enough file handles
   100 :li.Called module not found
   101
   102 :eul.
   103
   104 .comment ************** QUESTION 1: COBCLI *****************
   105 .context @cobcli
   106 .browse #1 @0 rtserr
   107 .topic cobcli.lbr or cli.lbr not found
   108 :i1. cobcli not found
   109 :i1. cli not found
   110 :i1. Installation problems
   111 :i1. Can't run Workbench
   112 :i1. Workbench doesn't come up
   113
   114 :p. Why does COBOL (or Toolset or Workbench) appear to be unable to
   115 find the files \bcobcli.lbr\p or \bcli.lbr\p?
   116
   117 :p. Check to ensure that your COBDIR and LIB environment variables
       are
   118 pointing to the COBOL system directories. You can either do this
       through
   119 Setup or by setting the environment variables manually at the command
   120 line or in your \bautoexec.bat\p file (for DOS, Windows and OS/2) or
   121 \b.login\p file (for UNIX).
   122
   123 .comment *** End of onlex.txt **

   DESCRIPTION OF EXAMPLE SOURCE FILE
   ==================================
   This section explains the content of onlex.txt by breaking it down into
   small sections of code.

   Lines 12-15:
   -----------

   .define @cobcli  @1
   .define @rtserr  @2
   .define @direct  @3
   .define @exegnt  @4

   Reserve context numbers for four of the five topics in this help file.
   Having reserved context numbers, you can either refer to a topic using
   its context number (as in line 27) or its topic name (as in line 24). The
   topic that does not have a context number reserved here (onlex, defined
   on line 17) is automatically assigned the next available context number,
   5.

   Line 17:
   -------

   .context onlex

   Define a topic called onlex. This is a global topic name so can be
   specified as a search string. This topic does not have a local topic
   name.

   Line 18:
   -------

   .browse #1 @0 @cobcli

   Define this topic in a browse chain. The questions in this file have been
   deliberately ordered in reverse to show how you can use browse chains.
   This line signals that when you try to browse to the previous topic, a
   "No previous topic" message is displayed, while browsing to the next
   topic displays the topic with topic name @cobcli.

   Line 19:
   -------

   .topic A few questions frequently asked of Technical Support

   Specify a title for this topic. The title for a topic is displayed on the
   help window's border.

   Lines 22-36:
   -----------

   :dl.

   :dt. \i\p\aCOBCLI\v@cobcli\v\i\p
   :dd. \bcobcli\p Not Found

   :dt. \i\p\aRTSERR\v@2\v\i\p
   :dd. RTS Errors

   :dt. \i\p\aDIRECT\v@3\v\i\p
   :dd. Directive Hierarchies

   :dt. \i\p\aEXEGNT\v@exegnt\v\i\p
   :dd. \b.exe\p vs \b.gnt\p Files
   :edl.

   Define a definition list. The :dl. tag signals the start of a definition
   list, the :dt. tags specify the terms (left-hand column) while the :dd.
   tags specify the definitions (right-hand column). The :edl. tag signals
   the end of the definition list. In this case, the terms contain hotspots
   to other topics. The horn characters (
   the hotspot text. Note the use of the \b and \i tags to highlight pieces
   of text.

   The four terms in the list all contain hotspots. cobcli and exegnt (lines
   24 and 33) are specified as local topic names, while lines 27 and 30
   specify context numbers. Double-clicking on the text displayed between
   the horn characters results in the topic specified between the two \v
   tags being displayed.

   Lines 39-41:
   -----------

   .context @exegnt
   .browse #1 @direct @0
   .topic How does an .exe file differ from a .gnt file?

   Specify the next topic. This has a local context name and a topic title,
   but no index entries. The browse chain for this topic specifies that
   browsing backward displays the topic @direct, while browsing forward
   displays the "No next topic" message.

   Lines 43-50:
   -----------

   :p. The biggest difference between an \b.exe\p file and a \b.gnt\p file
   is that \b.gnt\p (generated) code files are fully relocatable and
   swappable under the memory management of the Run-Time Environment, where
   industry-standard \b.exe\p files are subject to the memory management of
   the resident operating system.

   :p. If you are using DOS, Windows or OS/2, see the chapter \bCreating
   Applications\p in your \bPC Programmer's Guide\p. for more information.

   Text for this topic. Notice the use of the \b tag to provide emphasis.

   Lines 53-56:
   -----------

   .context @direct
   .browse #1 @rtserr @exegnt
   .topic Directive Hierarchy
   :i1.directive hierarchy

   Specify the next topic. This topic has a local context name, a topic
   title, and an index entry. The browse chain for this topic specifies that
   browsing backward displays the topic with topic-name @rtserr, while
   browsing forward displays the topic with topic-name @exegnt.

   Lines 58-60:
   -----------

   :p. How should the Compiler directives be managed?

   :p. The Compiler processes directives in the following order:

   Two paragraphs of text for this topic.

   Lines 62-82:
   -----------

   :dl tsize=20 break=fit.

   :dthd. \uLocation\p
   :ddhd. \uDescription\p

   :dt. Default values
   :dd. These are what the directives are set to by default.

   :dt. \bcobol.dir\p file
   :dd. The values in your \bcobol.dir\p file.

   :dt. Operating system command line
   :dd. The values specified on the operating system command line.

   :dt.  A directives control statement you can insert in your program.

   :dt. DIRECTIVES
   :dd. Two directives (called DIRECTIVES and USE) enable you to specify
   directives to be read from a file.
   :edl.

   Define a definition list. In this definition list, the :dl. tag has two
   extra parameters, specifying that 20 characters are to be allocated for
   the term, and that the definition is to be displayed on the next line
   down if its term is longer than 20 characters. This definition list also
   uses :dthd. and :ddhd. tags to provide headings for the terms and
   definitions. Note that use of the \u tag to highlight these headings.

   Line 84:
   -------

   :p. For more information, see your \bCOBOL System Reference\p.

   Additional paragraph for this topic.

   Lines 87-90:
   -----------

   .context @rtserr
   .browse #1 @cobcli @direct
   .topic RTS Errors
   :i1. RT198 error

   Specify the next topic. The topic has a local topic name for use within
   this help file, a topic title, and one index entry. The browse chain for
   this topic specifies that browsing backward displays the topic with
   topic-name @cobcli, while browsing forward displays the topic with
   topic-name @direct.

   Lines 92-102:
   ------------

   :p.What is causing run-time error 198?

   :p.These are some possible reasons:

   :ul.

   :li.Not enough memory
   :li.Not enough file handles
   :li.Called module not found
   :eul.


   The text for this topic, including an unordered list. The :ul. tag
   signals the start of the list, each :li. tag specifies an item in the
   list, and the :eul. tag signals the end of the list.

   Lines 105-112:
   -------------

   .context @cobcli
   .browse #1 @0 @rtserr
   .topic cobcli.lbr or cli.lbr not found
   :i1. cobcli not found
   :i1. cli not found
   :i1. Installation problems
   :i1. Can't run Workbench
   :i1. Workbench doesn't come up

   Specify the next topic. The topic has a local topic name and five index
   entries which will be displayed when the user presses I, and a title. The
   browse chain for this topic specifies that browsing backward displays the
   "No previous topic" message, while browsing forward displays the topic
   with topic-name @rtserr.

   Lines 114-121:
   -------------

   :p. Why does COBOL (or Toolset, Toolbox or Workbench) appear to be unable
   to find the files \bcobcli.lbr\p or \bcli.lbr\p?

   :p. Check to ensure that your COBDIR and LIB environment variables are
   pointing to the COBOL system directories. You can either do this through
   Setup or by setting the environment variables manually, at the command
   line or in your \bautoexec.bat\p file (for DOS, Windows and OS/2) or
   \b.login\p file (for UNIX).

   The text for the final topic in the file, each paragraph starting with a
   :p. tag. No special terminating tag is required.

   EXAMPLE CALLING PROGRAM
   =======================
   The following program, callhelp.cbl is supplied as part of Toolset and
   Toolbox; its function is to call Hyhelp to display an on-line help file,
   onlex.hnf. See the section "Example Source File" earlier in this chapter
   for details of creating onlex.hnf from onlex.txt.

   To use this program you must first compile it. Before you compile
   callhelp.cbl you must observe the following points:

    o  The COPY-file onl-link.cpy must be in the current directory or a
       directory specified by the COBCPY environment variable.

    o  The on-line help file onlex.hnf must be in the current directory or a
       directory specified by the COBHNF environment variable. See the
       section "Example Source File" earlier in this chapter for details of
       creating onlex.hnf.

    o  The library file hyhelp.lbr must be in the current directory or a
       directory specified by the COBDIR environment variable.

   See the chapter "Compiler" in your COBOL System Reference for details on
   compiling. For example, on DOS, Windows or OS/2, you could issue the
   following command to compile callhelp.cbl:

       cobol callhelp omf"gnt";

   This creates the file callhelp.gnt, which you can run. See the section
   "Running a Single Application" in the chapter "Run-Time Environment" for
   information on running an application. For example, on DOS and OS/2 you
   could issue the following command to execute callhelp.gnt.

       run callhelp

   This displays a small help window. For details of using Hyhelp see the
   chapter "On-line Help System Access and Display Utility (Hyhelp)" in your
   COBOL System Reference.

   The line numbers in this demonstration file have been included here for
   your convenience; they are not included in callhelp.cbl.

     1     All Rights Reserved.  *
     5 * This demonstration program is provided for use by users of   *
     6 * Micro Focus products and may be used, modified and           *
     7 * distributed as part of your application provided that you    *
     8 * properly acknowledge the copyright of Micro Focus in this    *
     9 * material.                                                    *
    10 ****************************************************************
    11
    12 ************************************************************
    13 *                                                          *
    14 *                     callhelp.cbl                         *
    15 *                                                          *
    16 *  This program demonstrates some features of the call     *
    17 *  interface to the On-Line Help System. Using             *
    18 *  the call interface to Hyhelp, you can control           *
    19 *  a great deal about the help panels you show the         *
    20 *  user: things like panel size and location, or           *
    21 *  whether the function keys are shown or hidden.          *
    22 *                                                          *
    23 *  See the chapter On-line Help System in your Toolset     *
    24 *  Reference or Toolbox Operating Guide for more details.  *
    25 *                                                          *
    26 ************************************************************
    27
    28  working-storage section.
    29  78 pack-byte-func                   value x"f4".
    30  01 packed-byte                      pic 99 comp-x
    31                                        value zeros.
    32  01 byte-array.
    33    05 unpacked-byte                  pic 99 comp-x
    34                                        occurs 8 times
    35                                        value zeros.
    36
    37 ****************************************************************
    38 *   On-Line Help System Constants                              *
    39 ****************************************************************
    40  01  on-line-topic               pic x(50) value spaces.
    41  78  help-menu-invisible         value 1.
    42  78  help-screen-on-exit         value 1.
    43  78  help-no-return-topic-not-fd value 1.
    44  78  help-file-not-open-on-start value 1.
    45  78  help-screen-saved-restored  value 1.
    46  78  help-close-files-on-exit    value 1.
    47  78  help-deallocate-mem-on-exit value 1.
    48  78  help-win-location-given     value 1.
    49  78  help-win-size-given         value 1.
    50
    51  copy "onl-link.cpy".
    52
    53  procedure division.
    54  main-logic.
    55      perform help-request
    56      perform terminate-prog.
    57
    58  help-request.
    59      perform initialize-help-system
    60      move on-line-qry-by-context to on-line-action
    61      move "onlex" to on-line-topic
    62      move 7 to on-line-context-no
    63      perform call-on-line-help.
    64
    65  initialize-help-system.
    66      move on-line-initialize to on-line-action
    67      perform set-help-system-flags
    68      perform call-on-line-help
    69      move 26 to on-line-window-x
    70      move 5 to on-line-window-y
    71      move 45 to on-line-win-width
    72      move 15 to on-line-win-height.
    73
    74  call-on-line-help.
    75      call "hyhelp" using on-line-pb
    76                          on-line-topic
    77      if on-line-return not = 0
    78         display "On-Line Error: " on-line-return
    79      end-if.
    80
    81  set-help-system-flags.
    82      move zero to on-line-flags
    83      move help-menu-invisible to unpacked-byte(1)
    84      move help-screen-saved-restored to unpacked-byte(6)
    85      move help-close-files-on-exit to unpacked-byte(7)
    86      move help-deallocate-mem-on-exit to unpacked-byte(8)
    87      perform pack-a-byte
    88      move packed-byte to on-line-flags
    89      move zeroes to packed-byte byte-array
    90      move help-win-location-given to unpacked-byte(7)
    91      move help-win-size-given to unpacked-byte(6)
    92      perform pack-a-byte
    93      move packed-byte to on-line-win-flags.
    94
    95  pack-a-byte.
    96      initialize packed-byte
    97      call pack-byte-func using packed-byte
    98                                byte-array.
    99
   100  terminate-prog.
   101      move on-line-close-down to on-line-action
   102      perform call-on-line-help
   103      cancel "HYHELP"
   104      stop run.

   DESCRIPTION OF EXAMPLE CALLING PROGRAM
   ======================================
   This section explains the functionality of callhelp.cbl by breaking it
   down into small sections of code.

   Line 29:
   -------

   78 pack-byte-func                  value x"f4".

   Define a constant to represent the value x"f4". This is done to aid
   clarity. x"f4" is the value of a call-by-number routine whose purpose is
   to pack a byte, which is reflected in the constant name.

   Lines 30-31:
   -----------

   01 packed-byte                     pic 99 comp-x
                                        value zeros.

   Define a data item to hold the byte output from the byte packing routine.
   See the description of lines 95-98 for more information on this routine.

   Lines 32-35:
   -----------

   01 byte-array.
   05 unpacked-byte                  pic 99 comp-x
                                       occurs 8 times
                                       value zeros.

   Define a data item to hold the input for the byte packing routine. See
   the description of lines 95-98 for more information on this routine.

   Line 40:
   -------

   01  on-line-topic             pic x(50) value spaces.

   Define a data item to hold the name of the .hnf file to load into Hyhelp.
   When this field is passed to Hyhelp it must be terminated with a space,
   so this data item is defined as all spaces.

   Lines 41-47:
   -----------

   78  help-menu-invisible         value 1.
   78  help-screen-on-exit         value 1.
   78  help-no-return-topic-not-fd value 1.
   78  help-file-not-open-on-start value 1.
   78  help-screen-saved-restored  value 1.
   78  help-close-files-on-exit    value 1.
   78  help-deallocate-mem-on-exit value 1.

   Define constants that are used to specify the bits of on-line-flags. All
   bits that are applicable to Hyhelp are listed, although not all are used
   in this program. See the section "onl-link.cpy" for details of the
   effects of these bits.

   Lines 48-49:
   -----------

   78 help-win-location-given     value 1.
   78 help-win-size-given         value 1.

   Define constants that are used to specify the bits of on-line-win-flags.
   All flags applicable to Hyhelp are listed. See the section "onl-link.cpy"
   for details of the effects of these bits.

   Line 51:
   -------

   copy "onl-link.cpy".

   Include the COPY-file onl-link.cpy. You must include this file in any
   program that calls Hyhelp or On-line.

   Lines 54-56:
   -----------

   main-logic.
     perform help-request
     perform terminate-prog.

   The main program. The Help-Request paragraph is responsible for
   initializing Hyhelp and making the call to display the on-line help file,
   while the Terminate-Prog paragraph is responsible for closing down
   Hyhelp. See the description of lines 58-63 and 100-104 for more
   information on the Help-Request and Terminate-Prog paragraphs
   respectively.

   Lines 58-63:
   -----------

   help-request.
     perform initialize-help-system
     move on-line-qry-by-context to on-line-action
     move "onlex" to on-line-topic
     move 7 to on-line-context-no
     perform call-on-line-help.

   The Help-Request paragraph. This paragraph first calls the
   Initialize-Help-System paragraph to initialize Hyhelp. The first topic we
   want to display is the contents, so this program needs to specify the
   following three things:

    o  We want to query by context as opposed to query by name, so we
       specify on-line-qry-by-context in on-line-action.


    o  The help file we want to use is onlex.hnf, so we specify onlex in
       on-line-topic.

    o  The first topic we want to display is the contents. By looking at the
       file onlex.txt, it can be seen that four topics have context numbers
       reserved for them, the topic onlex will be allocated context number
       five, with the index and contents list being allocated context
       numbers six and seven respectively. So, we need to specify 7 in
       on-line-context-no.

   When these things are specified, a call to Hyhelp is made via the
   Call-On-Line-Help paragraph. See lines 65-72 and 74-79 for details on the
   Initialize-Help-System and Call-On-Line-Help paragraphs respectively.

   Lines 65-72:
   -----------

   initialize-help-system.
     move on-line-initialize to on-line-action
     perform set-help-system-flags
     perform call-on-line-help
     move 26 to on-line-window-x
     move 5  to on-line-window-y
     move 45 to on-line-win-width
     move 15 to on-line-win-height.

   The Initialize-Help-System paragraph. on-line-action is set to
   on-line-initialize to signal that we want to initialize Hyhelp. (Although
   not strictly necessary, it is good practice to do this.) The
   Set-Help-System-Flags paragraph is executed to specify the settings for
   on-line-flags and on-line-win-flags. With these two data items set,
   Hyhelp is called via the Call-On-Line-Help paragraph.

   The rest of the paragraph specifies the position of the help window (in
   on-line-window-x and on-line-window-y) and the size of the display window
   (in on-line-win-width and on-line-win-height. For more information
   on the Set-Help-System-Flags paragraph see lines 81-93.

   Lines 74-79:
   -----------
   call-on-line-help.
     call "hyhelp" using on-line-pb
                         on-line-topic
     if on-line-return not = 0
       display "On-Line Error: " on-line-return
     end-if.

   The Call-On-Line-Help paragraph. This paragraph is called from three
   places in this program: to initialize Hyhelp on line 68, to display the
   first help screen on line 63, and to terminate Hyhelp on line 102. This
   paragraph calls Hyhelp specifying the 01 level data item from
   onl-link.cpy, and on-line-topic. On return, the value of on-line-return
   is checked to determine if the call was successful. If not, the value of
   on-line-return is displayed.

   Lines 81-88:
   -----------

   set-help-system-flags.
     move zero to on-line-flags
     move help-menu-invisible to unpacked-byte(1)
     move help-screen-saved-restored to unpacked-byte(6)
     move help-close-files-on-exit to unpacked-byte(7)
     move help-deallocate-mem-on-exit to unpacked-byte(8)
     perform pack-a-byte
     move packed-byte to on-line-flags

   This part of the Set-Help-System-Flags paragraph is responsible for
   setting on-line-flags prior to calling Hyhelp. The settings in this
   program specify that Hyhelp will start with its menu invisible, the user
   screen is restored on exit, all help files used are closed on exit, and
   all dynamically allocated memory is deallocated on exit.

   The temporary data item byte-array is used to hold the settings.
   byte-array is then used as input to the Pack-A-Byte paragraph, which
   returns a value that is passed to on-line-flags. See lines 95-98 for more
   information on the Pack-A-Byte paragraph.

   Lines 89-93:
   -----------

     move zeroes to packed-byte byte-array
     move help-win-location-given to unpacked-byte(7)
     move help-win-size-given to unpacked-byte(6)
     perform pack-a-byte
     move packed-byte to on-line-win-flags.

   This part of the Set-Help-System-Flags paragraph is responsible for
   setting on-line-win-flags prior to calling Hyhelp. The settings in this
   program specify that the location and size of the help window is to be
   specified by the program (in on-line-window-x, on-line-window-y,
   on-line-win-width and on-line-win-height).

   The temporary data item byte-array is used to hold the settings.
   byte-array is then used as input to the Pack-A-Byte paragraph, which
   returns  a value that is passed to on-line-win-flags. See lines 95-98 for
   more information on the Pack-A-Byte paragraph.

   Lines 95-98:
   -----------

   pack-a-byte.
     initialize packed-byte
     call pack-byte-func using packed-byte
                               byte-array.
   The Pack-A-Byte paragraph. This paragraph calls the x"F4" routine, whose
   function is to take the least significant bit from the eight fields from
   an array, forming a new byte. It is used in this program to convert the
   temporary data item byte-array into a packed byte, which is then moved to
   either on-line-flags or on-line-win-flags. See the section "Pack Byte" in
   the chapter "Library Routines (Call-by-number)" in your Toolset Reference
   or Toolbox Reference for more information on the x"F4" routine.

   Lines 100-104:
   -------------

   terminate-prog.
     move on-line-close-down to on-line-action
     perform call-on-line-help
     cancel "HYHELP"
     stop run.

   The Terminate-Prog paragraph. This paragraph is called to terminate the
   Hyhelp session, which is signaled by moving on-line-close-down to
   on-line-action. When this move has been performed, the call to Hyhelp is
   made via the Call-On-Line-Help paragraph. Hyhelp is then canceled.
   freeing memory and ensuring that the next time it is run it will be in
   its initial state.



   =========================================================================
   Micro Focus is a registered trademark of Micro Focus Limited.
   Micro Focus COBOL and Micro Focus COBOL Toolbox COBOL are trademarks of
   Micro Focus Limited.
   UNIX is a registered trademark of UNIX System Laboratories Inc.
   =========================================================================
   @(#)Vrn/online.1/3.1.03/15Jul93/nrV
   Copyright (C) 1992-93 Micro Focus Limited

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026