HP 3000 Manuals

List of Routines (cont) [ Micro Focus COBOL System Reference, Volume 1 ] MPE/iX 5.0 Documentation


Micro Focus COBOL System Reference, Volume 1

List of Routines (cont) 

CBL_WRITE_SCR_ CHATTRS 

Writes a string of characters and their attributes to the screen.

Syntax:.   

      call "CBL_WRITE_SCR_CHATTRS" using screen-position
        character-buffer
        attribute-buffer
        string-length
      returning status-code

Parameters:.   

 screen-position    Group item defined as:
  row-number        PIC X COMP-X.
  column-number     PIC X COMP-X.
character-buffer    PIC X(n).
attribute-buffer    PIC X(n).
string-length       PIC X(2) COMP-X.
status-code         See section Key 

On Entry:.   

 screen-position    The screen position at which to start writing.  The
                    top left corner is row 0, column 0.  See Notes on 
                    Screen Routines.

 character-buffer   The characters to write.

 attribute-buffer   The attributes to write.

 string-length      The length of the string to write.  If this would go
                    off the end of the screen, the write finishes at the
                    end of the screen.

On Exit:.   

None

CBL_WRITE_SCR_N_ ATTR 

Writes a specified attribute to a string of positions on the screen.

Syntax:.   

      call "CBL_WRITE_SCR_N_ATTR" using     screen-position
           attribute
           fill-length
         returning status-code

Parameters:.   

 screen-position    Group item defined as:
  row-number        PIC X COMP-X.
  column-number     PIC X COMP-X.
attribute           PIC X.
fill-length         PIC X(2) COMP-X.
status-code         See section Key 

On Entry:.   

 screen-position    The screen position at which to start writing.  The
                    top left corner is row 0, column 0.  See Notes on 
                    Screen Routines.

 attribute          The attribute to write.

 string-length      The number of screen positions to write the attribute
                    to.  If this would go off the end of the screen, the
                    write finishes at the end of the screen.

On Exit:.   

None

CBL_WRITE_SCR_N_ CHAR 

Writes a specified character to a string of positions on the screen.

Syntax:.   

      call "CBL_WRITE_SCR_N_CHAR" using     screen-position
           character
           fill-length
         returning status-code

Parameters:.   

 screen-position    Group item defined as:
  row-number        PIC X COMP-X.
  column-number     PIC X COMP-X.
character           PIC X.
fill-length         PIC X(2) COMP-X.
status-code         See section Key 

On Entry:.   

 screen-position    The screen position at which to start writing.  The
                    top left corner is row 0, column 0.  See Notes on 
                    Screen Routines.

 character          The character to write.

 string-length      The number of screen positions to write the character
                    to.  If this would go off the end of the screen, the
                    write finishes at the end of the screen.

On Exit:.   

None

CBL_WRITE_SCR_N_ CHATTR 

Writes a specified character and attribute to a string of positions on
the screen.

Syntax:.   

      call "CBL_WRITE_SCR_N_CHATTR" using  screen-position
           character
           attribute
           fill-length
         returning status-code

Parameters:.   

 screen-position    Group item defined as:
  row-number        PIC X COMP-X.
  column-number     PIC X COMP-X.
character           PIC X.
attribute           PIC X.
fill-length         PIC X(2) COMP-X.
status-code         See section Key 

On Entry:.   

 screen-position    The screen position at which to start writing.  The
                    top left corner is row 0, column 0.  See Notes on 
                    Screen Routines.

 character          The character to write.

 attribute          The attribute to write.

 string-length      The number of screen positions to write the
                    character-attribute pair to.  If this would go off
                    the end of the screen, the write finishes at the end
                    of the screen.

On Exit:.   

None

CBL_WRITE_SCR_TTY 

Writes a string of characters to the screen starting at the current
position and scrolling.

Syntax:.   

      call "CBL_WRITE_SCR_TTY" using     character-buffer
        string-length
      returning status-code

Parameters:.   

 character-buffer   PIC X(n).
string-length       PIC X(2) COMP-X.
status-code         See section Key 

On Entry:.   

 character-buffer   The characters to write.

 string-length      The length of the string to write.  If this goes off
                    the edge of the screen the screen is scrolled up a
                    line and the write continues on the bottom line.

On Exit:.   

None

CBL_WRITE_VFILE 

Writes bytes to a heap.

Syntax:.   

      call "CBL_WRITE_VFILE" using by value     heap-id
       heap-ref
       heap-len
          by reference heap-buf

Parameters:.   

 heap-id            PIC X(2) COMP-5
heap-ref            PIC X(4) COMP-5.
heap-len            PIC X(4) COMP-5.
heap-buf            PIC X(n).

Remarks:.   

See Introduction to Heap Routines  

On Entry:.   

 heap-id            This contains the heap handle assigned when the heap
                    was opened.

 heap-ref           Offset in the heap at which to start writing.

 heap-len           Number of bytes to write.

 heap-buf           Buffer from which bytes are written.  It is your
                    responsibility to ensure that the buffer is large
                    enough to hold the number of bytes being written.

On Exit:.   

None

CBL_XOR 

Does a logical XOR between the bits of two data items.

Syntax:.   

      call "CBL_XOR"         using     source
      target
            by value  length
            returning status-code

Parameters:.   

 source             Any data item.
target              Any data item.
length              Numeric literal or PIC X(4) COMP-5.
status-code         See section Key 

Remarks:.   

The routine starts at the left-hand end of source and target and
exclusive-ORs the bits together, storing the result in target.  The truth
table for this is:

           source                       target                       result 

--------------------------------------------------------------------------------------

0                            0                            0

0                            1                            1

1                            0                            1

1                            1                            0

See Introduction to Logic Routines.

On Entry:.   

 source             One of the data items to exclusive-OR.

 target             The other data item to exclusive-OR.

 length             The number of bytes of source and target to
                    exclusive-OR. Positions in target beyond this are
                    unchanged.

On Exit:.   

 target             The result.

CBL_YIELD_RUN_UNIT 

Yields the remainder of a run-unit's time-slice.

Syntax:.   

 call "CBL_YIELD_RUN_UNIT"

Parameters:.   

None

Remarks:.   

This routine has no effect in UNIX environments.

The remainder of the run-unit's time-slice is yielded to unspecified
run-units.

On Entry:.   

None

On Exit:.   

None

PC_FIND_DRIVES 

Returns all valid drives on a PC.

Syntax:.   

 call "PC_FIND_DRIVES" using   drive-info

Parameters:.   

 drive-info         PIC X(4) COMP-X.

Remarks:.   

This routine is available only in DOS, Windows and OS/2 environments.

On Entry:.   

None

On Exit:.   

 drive-info         The 26 least-significant bits correspond to drives A:
                    through Z:, with A: represented by bit 0 (the least
                    significant bit) and Z: represented by bit 25.  The
                    corresponding bit is set for each drive that is
                    present.

PC_GET_MOUSE_SHAPE 

Returns information about the shape of the mouse pointer.

Syntax:.   

      call "PC_GET_MOUSE_SHAPE" using     mouse-handle
         reserved-item
         mouse-ptr-shape
       returning status-code

Parameters:.   

 mouse-handle       PIC X(4) COMP-X.
reserved-item       PIC X(10).
mouse-ptr-shape     Group item defined as:
  char_AND_mask     PIC X COMP-X.
  attr_AND_mask     PIC X COMP-X.
  char_XOR_mask     PIC X COMP-X.
  attr_XOR_mask     PIC X COMP-X.
status-code         See section Key 

Remarks:.   

This routine is available only in DOS, Windows and OS/2 environments.

The masks in mouse-ptr-shape are bitmaps that, applied to a screen
position, would superimpose the mouse shape upon it.  The pointer shape
is formed by PC_SET_MOUSE_SHAPE by ANDing the screen character at the
mouse position with char_AND_mask, XORing the result with char_XOR_mask,
and then displaying the result on the screen.  The attribute is formed
similarly.

To call this routine you must have previously called PC_SET_MOUSE_SHAPE
with the same mouse-handle.  The data item reserved-item must be as
preserved from that call.

See Introduction to Mouse Routines.

On Entry:.   

 mouse-handle       Mouse identifier, obtained by earlier call to
                    CBL_INIT_MOUSE.

 reserved-item      Reserved for future use.

On Exit:.   

 mouse-ptr-shape    The bitmaps that would create the pointer's current
                    shape.

PC_READ_DRIVE 

Returns the current default drive letter.

Syntax:.   

      call "PC_READ_DRIVE" using      drive
          returning  status-code

Parameters:.   

 drive              PIC X.
status-code         See section Key 

Remarks:.   

This routine is available only in DOS, Windows and OS/2 environments.

On Entry:.   

None

On Exit:.   

 drive              Drive letter, upper- or lower-case.

PC_SET_DRIVE 

Sets the default drive letter.

Syntax:.   

      call "PC_SET_DRIVE"    using     drive
            returning status-code

Parameters:.   

 drive              PIC X.
status-code         See section Key 

Remarks:.   

This routine is available only in DOS, Windows and OS/2 environments.

On Entry:.   

 drive              Drive letter, upper- or lower-case.

On Exit:.   

None

PC_SET_MOUSE_HIDE_ AREA 

Defines an area ("collision area") where the mouse is to be invisible.

Syntax:.   

      call "PC_SET_MOUSE_HIDE_AREA" using     mouse-handle
     collision-area
           returning status-code

Parameters:.   

 mouse-handle       PIC X(4) COMP-X.
collision-area      Group item defined as:
  top-row           PIC X(2) COMP-X.
  left-col          PIC X(2) COMP-X.
  bottom-row        PIC X(2) COMP-X.
  right-col         PIC X(2) COMP-X.
status-code         See section Key 

Remarks:.   

This routine is available only in DOS, Windows and OS/2 environments.

On Entry:.   

 mouse-handle       Mouse identifier, obtained by earlier call to
                    CBL_INIT_MOUSE.

 collision-area     Defines the collision area.  Whenever the pointer is
                    in this area, it is hidden.  A value of zeros in this
                    item makes the whole screen a collision area.  There
                    can be only one collision area at any one time.

On Exit:.   

None

PC_SET_MOUSE_SHAPE 

Sets the shape of the mouse pointer.

Syntax:.   

     call "PC_SET_MOUSE_SHAPE" using     mouse-handle
         reserved-item
         mouse-ptr-shape
       returning status-code

Parameters:.   

 mouse-handle       PIC X(4) COMP-X.
reserved-item       PIC X(10).
mouse-ptr-shape     Group item defined as:
  char_AND_mask     PIC X COMP-X.
  attr_AND_mask     PIC X COMP-X.
  char_XOR_mask     PIC X COMP-X.
  attr_XOR_mask     PIC X COMP-X.
status-code         See section Key 

Remarks:.   

This routine is available only in DOS, Windows and OS/2 environments.

The masks in mouse-ptr-shape are bitmaps that, applied to a screen
position, would superimpose the mouse shape upon it.  The pointer shape
is formed by PC_SET_MOUSE_SHAPE by ANDing the screen character at the
mouse position with char_AND_mask, XORing the result with char_XOR_mask,
and then displaying the result on the screen.  The attribute is formed
similarly.

See Introduction to Mouse Routines.

On Entry:.   

 mouse-handle       Mouse identifier, obtained by earlier call to
                    CBL_INIT_MOUSE.

 reserved-item      Reserved for future use.

 mouse-ptr-shape    The bitmaps to create the pointer's desired shape.

On Exit:.   

None

PC_TEST_PRINTER 

Returns information about the status of a printer.

Syntax:.   

      call "PC_TEST_PRINTER" using     printer-no
      printer-status
            returning status-code

Parameters:.   

 printer-no         PIC X COMP-X.
printer-status      PIC X COMP-X.
status-code         See section Key 

Remarks:.   

This routine is available only on DOS.

On Entry:.   

 printer-no         Number of the printer to check; must be 0, 1, or 2.

On Exit:.   

 printer-status     A combination of the following values:

                    128 (x"80") = not busy
                    64 (x"40") = acknowledge
                    32 (x"20") = out of paper
                    16 (x"10") = selected
                    8 (x"08") = I/O error
                    4 (x"04") = spare
                    2 (x"02") = spare
                    1 (x"01") = timeout

PC_WIN_ABOUT 

Provides an "About" box for a Windows application.

Syntax:.   

      call "PC_WIN_ABOUT" using     text-string
          by value text-length
         returning status-code

Parameters:.   

 text-string        PIC X(n)
text-length         PIC XX COMP-5.
status-code         See section Key 

Remarks:.   

This routine is available only in the Windows environment.

This routine adds the item "About..." to the bottom of the system menu
for the application.  When your user selects this item, an information
box is displayed.  This box contains the name of the application,
together with the text supplied to this routine.

On Entry:.   

 text-string        The text to be placed in the "About" box.  To split
                    the text over a number of lines, include carriage
                    return/line feed (x"0D0A") sequences in the text.

 text-length        The length of the text in text-string.

On Exit:.   

None

PC_WIN_HANDLE 

Returns the handle of the window used for screen I/O.

Syntax:.   

      call "PC_WIN_HANDLE" using     hwnd
          returning status-code

Parameters:.   

 hwnd               PIC XX COMP-5.
status-code         See section Key 

Remarks:.   

This routine is available only in the Windows environment.

On Entry:.   

None

On Exit:.   

 hwnd               Contains the window handle

PC_WIN_INIT 

Returns the four Windows startup values.

Syntax:.   

      call "PC_WIN_INIT" using     hInst,
          hPrevInstance,
          lpszCmdLine,
          nCmdShow
        returning status-code

Parameters:.   

 hInst              PIC XX COMP-5.
hPrevInstance       PIC XX COMP-5.
lpszCmdLine         POINTER.
nCmdShow            PIC XX COMP-5.
status-code         See section Key 

Remarks:.   

This routine is available only in the Windows environment.

When starting a Windows application Windows returns four startup values.
These are required when calling a number of the Windows API routines.
When using the shared run-time system, it is necessary to call this
routine to get the startup values so you can then use the Windows API.

You should not access the command line using the parameter passed here.
Use ACCEPT...FROM COMMAND-LINE instead.

On Entry:.   

None

On Exit:.   

 hInst              The handle of this instance.

 hPrevInstance      The handle of the previous instance.

 lpszCmdLine        A pointer to the command line.  Not for COBOL use.

 nCmdShow           Flags to indicate the attributes attached to any
                    windows created.

PC_WIN_YIELD 

Processes all outstanding Windows messages that have been sent to an
application that is running but does not yield to Windows.

Syntax:.   

     call "PC_WIN_YIELD" using     hwnd
          returning status-code

Parameters:.   

None

Remarks:.   

This routine is available only in the Windows environment.

This routine is useful in a COBOL program that is linked with LCOBOLDW
and does a lot of in-memory processing.



MPE/iX 5.0 Documentation