      *> ********************************************************************
      *>
      *> Copyright (C) 1984-2007 Micro Focus (IP) Limited.
      *> 
      *> All rights reserved.  Unpublished, all rights reserved under
      *> copyright law and international treaty.  Use of a copyright notice
      *> is precautionary only and does not imply publication or disclosure.
      *> This software contains confidential information and trade secrets of
      *> Micro Focus International Ltd, and no part of this program or
      *> publication may be reproduced, transmitted, transcribed, stored in
      *> a retrieval system, or translated into any language or computer
      *> language, in any form or by any means, electronic, mechanical,
      *> magnetic, optical, chemical, manual or otherwise, without the prior
      *> written permission of:
      *> 
      *> Micro Focus International Ltd,
      *> The Lawn, Old Bath Road, Newbury, Berkshire, RG14 1QN, UK.
      *> (01635) 32646
      *> 
      *> RESTRICTED RIGHTS LEGEND
      *> Use, duplication, or disclosure by the Government is subject to
      *> restrictions as set forth in subparagraph (c)(1)(ii) of the Rights
      *> in Technical Data and Computer Software clause at DFARS 52.227-7013
      *> or subparagraphs (c)(1) and (2) of Commercial Computer Software -
      *> Restricted Rights at 48 CFR 52.227-19, as applicable.  Contact
      *> Micro Focus International Ltd, 701 East Middlefield Road,
      *> Mountain View, California 94043, USA.
      *> 
      *> Genesis Run Time System (Studio/Server 5.0 Freeze)
      *> 
      *> @(#)cblproto.cpy	11.4
      *> 
      *> Last Modified on 07/01/15 at 16:51:49
      *> 
      *> ********************************************************************
       Identification Division.
       Program-ID. "Memory management" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-ALLOC-DYN-MEM VALUE "CBL_ALLOC_DYN_MEM".
       78 CBL-ALLOC-MEM VALUE "CBL_ALLOC_MEM".
       78 CBL-ALLOC-SHMEM VALUE "CBL_ALLOC_SHMEM".
       78 CBL-ALLOC-THREAD-MEM VALUE "CBL_ALLOC_THREAD_MEM".
       78 CBL-FREE-DYN-MEM VALUE "CBL_FREE_DYN_MEM".
       78 CBL-FREE-MEM VALUE "CBL_FREE_MEM".
       78 CBL-FREE-SHMEM VALUE "CBL_FREE_SHMEM".
       78 CBL-FREE-THREAD-MEM VALUE "CBL_FREE_THREAD_MEM".
       78 CBL-GET-SHMEM-PTR VALUE "CBL_GET_SHMEM_PTR".
       78 CBL-PUT-SHMEM-PTR VALUE "CBL_PUT_SHMEM_PTR".
       78 CBL-MEM-STRATEGY VALUE "CBL_MEM_STRATEGY".
       78 CBL-MEM-VALIDATE VALUE "CBL_MEM_VALIDATE".
       01 MEM-FLAGS     cblt-os-flags.
       01 MEM-FUNC      cblt-x4-comp5.
       01 MEM-NODE-VALUE        cblt-pointer.
       01 MEM-POINTER   cblt-pointer.
       01 MEM-RTNCODE   cblt-rtncode.
       01 MEM-SIZE      cblt-os-size.
       01 MEM-STRATEGY-FLAGS    cblt-x4-comp5.
       01 MEM-VALIDATE-PARAM cblt-mem-validate-param.
      *> 
      *> CBL-ALLOC-DYN-MEM
      *> 
       Entry CBL-ALLOC-DYN-MEM Using
           By Reference MEM-POINTER
           By Value     MEM-SIZE
           By Value     MEM-FLAGS
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-ALLOC-MEM
      *> 
       Entry CBL-ALLOC-MEM Using
           By Reference MEM-POINTER
           By Value     MEM-SIZE
           By Value     MEM-FLAGS
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-ALLOC-SHMEM
      *> 
       Entry CBL-ALLOC-SHMEM Using
           By Reference MEM-POINTER
           By Value     MEM-SIZE
           By Value     MEM-FLAGS
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-ALLOC-THREAD-MEM
      *> 
       Entry CBL-ALLOC-THREAD-MEM Using
           By Reference MEM-POINTER
           By Value     MEM-SIZE
           By Value     MEM-FLAGS
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-FREE-DYN-MEM
      *> 
       Entry CBL-FREE-DYN-MEM Using
           By Value     MEM-POINTER
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-FREE-MEM
      *> 
       Entry CBL-FREE-MEM Using
           By Value     MEM-POINTER
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-FREE-SHMEM
      *> 
       Entry CBL-FREE-SHMEM Using
           By Value     MEM-POINTER
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-FREE-THREAD-MEM
      *> 
       Entry CBL-FREE-THREAD-MEM Using
           By Value     MEM-POINTER
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-GET-SHMEM-PTR
      *> 
       Entry CBL-GET-SHMEM-PTR Using
           By Reference MEM-NODE-VALUE
           By Reference ANY
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-PUT-SHMEM-PTR
      *> 
       Entry CBL-PUT-SHMEM-PTR Using
           By Value     MEM-NODE-VALUE
           By Reference ANY
           Returning    MEM-RTNCODE
       .
      *> 
      *> CBL-MEM-STRATEGY
      *> 
       Entry CBL-MEM-STRATEGY Using
           By Value     MEM-FUNC
           By Reference MEM-STRATEGY-FLAGS
           Returning    MEM-RTNCODE
       .

      *> 
      *> CBL-MEM-VALIDATE
      *> 
       Entry CBL-MEM-VALIDATE Using
           By Value     MEM-FLAGS
           By Reference MEM-VALIDATE-PARAM
           Returning    MEM-RTNCODE
       .

       End Program "Memory management".
       Identification Division.
       Program-ID. "Miscellaneous functions" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-AND VALUE "CBL_AND".
       78 CBL-EQ VALUE "CBL_EQ".
       78 CBL-GET-OS-INFO VALUE "CBL_GET_OS_INFO".
       78 CBL-IMP VALUE "CBL_IMP".
       78 CBL-NOT VALUE "CBL_NOT".
       78 CBL-OR VALUE "CBL_OR".
       78 CBL-TOLOWER VALUE "CBL_TOLOWER".
       78 CBL-TOUPPER VALUE "CBL_TOUPPER".
       78 CBL-XOR VALUE "CBL_XOR".
       01 LEN           cblt-os-size.
       01 OS-INFO-BLOCK cblt-os-info-params.
       01 RET           cblt-rtncode.
      *> 
      *> CBL-AND
      *> 
       Entry CBL-AND Using
           By Reference ANY
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-EQ
      *> 
       Entry CBL-EQ Using
           By Reference ANY
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-GET-OS-INFO
      *> 
       Entry CBL-GET-OS-INFO Using
           By Reference OS-INFO-BLOCK
           Returning    RET
       .
      *> 
      *> CBL-IMP
      *> 
       Entry CBL-IMP Using
           By Reference ANY
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-NOT
      *> 
       Entry CBL-NOT Using
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-OR
      *> 
       Entry CBL-OR Using
           By Reference ANY
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-TOLOWER
      *> 
       Entry CBL-TOLOWER Using
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-TOUPPER
      *> 
       Entry CBL-TOUPPER Using
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
      *> 
      *> CBL-XOR
      *> 
       Entry CBL-XOR Using
           By Reference ANY
           By Reference ANY
           By Value     LEN
           Returning    RET
       .
       End Program "Miscellaneous functions".
       Identification Division.
       Program-ID. "Miscellaneous File Management" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-CHANGE-DIR VALUE "CBL_CHANGE_DIR".
       78 CBL-CHECK-FILE-EXIST VALUE "CBL_CHECK_FILE_EXIST".
       78 CBL-COPY-FILE VALUE "CBL_COPY_FILE".
       78 CBL-CREATE-DIR VALUE "CBL_CREATE_DIR".
       78 CBL-DELETE-DIR VALUE "CBL_DELETE_DIR".
       78 CBL-DELETE-FILE VALUE "CBL_DELETE_FILE".
       78 CBL-DIR-SCAN-END VALUE "CBL_DIR_SCAN_END".
       78 CBL-DIR-SCAN-READ VALUE "CBL_DIR_SCAN_READ".
       78 CBL-DIR-SCAN-START VALUE "CBL_DIR_SCAN_START".
       78 CBL-FILENAME-CONVERT VALUE "CBL_FILENAME_CONVERT".
       78 CBL-FILENAME-MAX-LENGTH VALUE "CBL_FILENAME_MAX_LENGTH".
       78 CBL-GET-CURRENT-DIR VALUE "CBL_GET_CURRENT_DIR".
       78 CBL-GET-FILE-INFO VALUE "CBL_GET_FILE_INFO".
       78 CBL-JOIN-FILENAME VALUE "CBL_JOIN_FILENAME".
       78 CBL-LOCATE-FILE VALUE "CBL_LOCATE_FILE".
       78 CBL-RENAME-FILE VALUE "CBL_RENAME_FILE".
       78 CBL-SPLIT-FILENAME VALUE "CBL_SPLIT_FILENAME".
       78 CBL-GET-FILE-SYSTEM-INFO VALUE "CBL_GET_FILE_SYSTEM_INFO".
       01 CD-RET        cblt-rtncode.
       01 CF-RET        cblt-rtncode.
       01 DD-RET        cblt-rtncode.
       01 DF-RET        cblt-rtncode.
       01 DS-ATTRS      cblt-x4-comp5.
       01 DS-FLAGS      cblt-os-flags.
       01 DS-HANDLE     cblt-pointer.
       01 DS-RET        cblt-rtncode.
       01 FE-DETAILS    cblt-fileexist-buf.
       01 FE-RET        cblt-rtncode.
       01 FI-DETAILS    cblt-fileexist-buf.
       01 FI-FLAGS      cblt-os-flags.
       01 FI-RET        cblt-rtncode.
       01 FML-RET       cblt-os-size.
       01 FNC-FUNC      cblt-x1-compx.
       01 FNC-IN-LENGTH cblt-os-size.
       01 FNC-OUT-LENGTH        cblt-os-size.
       01 FNC-RET       cblt-rtncode.
       01 GCD-FLAGS     cblt-os-flags.
       01 GCD-NAME-LENGTH       cblt-os-size.
       01 GCD-RET       cblt-rtncode.
       01 LF-EXIST-FLAG cblt-x1-compx.
       01 LF-FUNC       cblt-x1-compx.
       01 LF-PATH-FLAG  cblt-x1-compx.
       01 LF-RET        cblt-rtncode.
       01 RF-RET        cblt-rtncode.
       01 SJ-PACKET     cblt-splitjoin-buf.
       01 SJ-RET        cblt-rtncode.
       01 FSI-FUNC      cblt-x4-comp5.
       01 FSI-PARAM     cblt-fs-info-param.
      *> 
      *> CBL-CHANGE-DIR
      *> 
       Entry CBL-CHANGE-DIR Using
           By Reference ANY
           Returning    CD-RET
       .
      *> 
      *> CBL-CHECK-FILE-EXIST
      *> 
       Entry CBL-CHECK-FILE-EXIST Using
           By Reference ANY
           By Reference FE-DETAILS
           Returning    FE-RET
       .
      *> 
      *> CBL-COPY-FILE
      *> 
       Entry CBL-COPY-FILE Using
           By Reference ANY
           By Reference ANY
           Returning    CF-RET
       .
      *> 
      *> CBL-CREATE-DIR
      *> 
       Entry CBL-CREATE-DIR Using
           By Reference ANY
           Returning    CD-RET
       .
      *> 
      *> CBL-DELETE-DIR
      *> 
       Entry CBL-DELETE-DIR Using
           By Reference ANY
           Returning    DD-RET
       .
      *> 
      *> CBL-DELETE-FILE
      *> 
       Entry CBL-DELETE-FILE Using
           By Reference ANY
           Returning    DF-RET
       .
      *> 
      *> CBL-DIR-SCAN-END
      *> 
       Entry CBL-DIR-SCAN-END Using
           By Reference DS-HANDLE
           Returning    DS-RET
       .
      *> 
      *> CBL-DIR-SCAN-READ
      *> 
       Entry CBL-DIR-SCAN-READ Using
           By Reference DS-HANDLE
           By Reference ANY
           Returning    DS-RET
       .
      *> 
      *> CBL-DIR-SCAN-START
      *> 
       Entry CBL-DIR-SCAN-START Using
           By Reference DS-HANDLE
           By Reference ANY
           By Value     DS-ATTRS
           By Value     DS-FLAGS
           Returning    DS-RET
       .
      *> 
      *> CBL-FILENAME-CONVERT
      *> 
       Entry CBL-FILENAME-CONVERT Using
           By Reference FNC-FUNC
           By Reference ANY
           By Reference ANY
           By Value     FNC-IN-LENGTH
           By Value     FNC-OUT-LENGTH
           Returning    FNC-RET
       .
      *> 
      *> CBL-FILENAME-MAX-LENGTH
      *> 
       Entry CBL-FILENAME-MAX-LENGTH
           Returning    FML-RET
       .
      *> 
      *> CBL-GET-CURRENT-DIR
      *> 
       Entry CBL-GET-CURRENT-DIR Using
           By Value     GCD-FLAGS
           By Value     GCD-NAME-LENGTH
           By Reference ANY
           Returning    GCD-RET
       .
      *> 
      *> CBL-GET-FILE-INFO
      *> 
       Entry CBL-GET-FILE-INFO Using
           By Value     FI-FLAGS
           By Reference ANY
           By Reference FI-DETAILS
           Returning    FI-RET
       .
      *> 
      *> CBL-JOIN-FILENAME
      *> 
       Entry CBL-JOIN-FILENAME Using
           By Reference SJ-PACKET
           By Reference ANY
           By Reference ANY
           By Reference ANY
           By Reference ANY
           Returning    SJ-RET
       .
      *> 
      *> CBL-LOCATE-FILE
      *> 
       Entry CBL-LOCATE-FILE Using
           By Reference ANY
           By Reference LF-FUNC
           By Reference ANY
           By Reference LF-EXIST-FLAG
           By Reference LF-PATH-FLAG
           Returning    LF-RET
       .
      *> 
      *> CBL-RENAME-FILE
      *> 
       Entry CBL-RENAME-FILE Using
           By Reference ANY
           By Reference ANY
           Returning    RF-RET
       .
      *> 
      *> CBL-SPLIT-FILENAME
      *> 
       Entry CBL-SPLIT-FILENAME Using
           By Reference SJ-PACKET
           By Reference ANY
           Returning    SJ-RET
       .
      *> 
      *> CBL-GET-FILE-SYSTEM-INFO
      *> 
       Entry CBL-GET-FILE-SYSTEM-INFO Using
           By Value     FSI-FUNC,
           By Reference ANY
           By Reference FSI-PARAM
       .

       End Program "Miscellaneous File Management".
       Identification Division.
       Program-ID. "NLS Support" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-NLS-CLOSE-MSG-FILE VALUE "CBL_NLS_CLOSE_MSG_FILE".
       78 CBL-NLS-COMPARE VALUE "CBL_NLS_COMPARE".
       78 CBL-NLS-INFO VALUE "CBL_NLS_INFO".
       78 CBL-NLS-OPEN-MSG-FILE VALUE "CBL_NLS_OPEN_MSG_FILE".
       78 CBL-NLS-READ-MSG VALUE "CBL_NLS_READ_MSG".
       01 COMPARE-RESULT        cblt-sx1-comp5.
       01 INFO-CATEGORY cblt-x1-compx.
       01 INFO-FUNCTION-CODE    cblt-x1-compx.
       01 MSG-FILE-NAME-LENGTH  cblt-x1-compx.
       01 MSG-HANDLE    cblt-x4-compx.
       01 MSG-NUMBER-PAIR       cblt-nls-msg-number-pair.
       01 RTNCODE       cblt-rtncode.
       01 STRING1-LENGTH        cblt-os-size.
       01 STRING2-LENGTH        cblt-os-size.
      *> 
      *> CBL-NLS-CLOSE-MSG-FILE
      *> 
       Entry CBL-NLS-CLOSE-MSG-FILE Using
           By Reference MSG-HANDLE
           Returning    RTNCODE
       .
      *> 
      *> CBL-NLS-COMPARE
      *> 
       Entry CBL-NLS-COMPARE Using
           By Reference ANY
           By Reference ANY
           By Value     STRING1-LENGTH
           By Value     STRING2-LENGTH
           By Reference COMPARE-RESULT
           Returning    RTNCODE
       .
      *> 
      *> CBL-NLS-INFO
      *> 
       Entry CBL-NLS-INFO Using
           By Reference INFO-FUNCTION-CODE
           By Reference INFO-CATEGORY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-NLS-OPEN-MSG-FILE
      *> 
       Entry CBL-NLS-OPEN-MSG-FILE Using
           By Reference ANY
           By Reference MSG-FILE-NAME-LENGTH
           By Reference MSG-HANDLE
           Returning    RTNCODE
       .
      *> 
      *> CBL-NLS-READ-MSG
      *> 
       Entry CBL-NLS-READ-MSG Using
           By Reference MSG-HANDLE
           By Reference MSG-NUMBER-PAIR
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
       End Program "NLS Support".
       Identification Division.
       Program-ID. "Run-unit specific Support" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-ABORT-RUN-UNIT VALUE "CBL_ABORT_RUN_UNIT".
       78 CBL-CULL-RUN-UNITS VALUE "CBL_CULL_RUN_UNITS".
       78 CBL-ERROR-PROC VALUE "CBL_ERROR_PROC".
       78 CBL-EXEC-RUN-UNIT VALUE "CBL_EXEC_RUN_UNIT".
       78 CBL-EXIT-PROC VALUE "CBL_EXIT_PROC".
       78 CBL-GET-EXIT-INFO VALUE "CBL_GET_EXIT_INFO".
       78 CBL-SUBSYSTEM VALUE "CBL_SUBSYSTEM".
       78 CBL-YIELD-RUN-UNIT VALUE "CBL_YIELD_RUN_UNIT".
       78 SYSTEM VALUE "SYSTEM".
       01 C-RTNCODE     cblt-rtncode.
       01 COMMAND-LINE-LEN      cblt-os-size.
       01 FLAGS         cblt-os-flags.
       01 FUNCTION-CODE cblt-x1-compx.
       01 GEI-PARAMS    cblt-exit-info-params.
       01 INSTALL-ADDRS cblt-ppointer.
       01 INSTALL-FLAG  cblt-x1-compx.
       01 INSTALL-PARAMS        cblt-exit-params.
       01 RTNCODE       cblt-rtncode.
       01 RU-HANDLE     cblt-x8-comp5.
       01 STACK-SIZE    cblt-os-size.
      *> 
      *> CBL-ABORT-RUN-UNIT
      *> 
       Entry CBL-ABORT-RUN-UNIT Using
           By Value     RTNCODE
           Returning    RTNCODE
       .
      *> 
      *> CBL-CULL-RUN-UNITS
      *> 
       Entry CBL-CULL-RUN-UNITS
           Returning    RTNCODE
       .
      *> 
      *> CBL-ERROR-PROC
      *> 
       Entry CBL-ERROR-PROC Using
           By Reference INSTALL-FLAG
           By Reference INSTALL-ADDRS
           Returning    RTNCODE
       .
      *> 
      *> CBL-EXEC-RUN-UNIT
      *> 
       Entry CBL-EXEC-RUN-UNIT Using
           By Reference ANY
           By Value     COMMAND-LINE-LEN
           By Reference RU-HANDLE
           By Value     STACK-SIZE
           By Value     FLAGS
           Returning    RTNCODE
       .
      *> 
      *> CBL-EXIT-PROC
      *> 
       Entry CBL-EXIT-PROC Using
           By Reference INSTALL-FLAG
           By Reference INSTALL-PARAMS
           Returning    RTNCODE
       .
      *> 
      *> CBL-GET-EXIT-INFO
      *> 
       Entry CBL-GET-EXIT-INFO Using
           By Reference GEI-PARAMS
           Returning    RTNCODE
       .
      *> 
      *> CBL-SUBSYSTEM
      *> 
       Entry CBL-SUBSYSTEM Using
           By Reference FUNCTION-CODE
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-YIELD-RUN-UNIT
      *> 
       Entry CBL-YIELD-RUN-UNIT
           Returning    RTNCODE
       .
      *> 
      *> SYSTEM
      *> 
       Entry SYSTEM Using
           By Reference ANY
           Returning    C-RTNCODE
       .
       End Program "Run-unit specific Support".
       Identification Division.
       Program-ID. "ByteStream API's" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-CLOSE-FILE VALUE "CBL_CLOSE_FILE".
       78 CBL-CREATE-FILE VALUE "CBL_CREATE_FILE".
       78 CBL-FLUSH-FILE VALUE "CBL_FLUSH_FILE".
       78 CBL-FREE-RECORD-LOCK VALUE "CBL_FREE_RECORD_LOCK".
       78 CBL-GET-RECORD-LOCK VALUE "CBL_GET_RECORD_LOCK".
       78 CBL-OPEN-FILE VALUE "CBL_OPEN_FILE".
       78 CBL-READ-FILE VALUE "CBL_READ_FILE".
       78 CBL-TEST-RECORD-LOCK VALUE "CBL_TEST_RECORD_LOCK".
       78 CBL-WRITE-FILE VALUE "CBL_WRITE_FILE".
       01 ACCESS-MODE   cblt-x1-compx.
       01 BYTE-COUNT    cblt-x4-compx.
       01 DENY-MODE     cblt-x1-compx.
       01 DEVICE        cblt-x1-compx.
       01 FILE-FLAGS    cblt-x1-compx.
       01 FILE-HANDLE   cblt-bytestream-handle.
       01 FILE-OFFSET   cblt-x8-compx.
       01 RECORD-LENGTH cblt-x4-compx.
       01 RECORD-OFFSET cblt-x4-compx.
       01 RESERVED      cblt-x2-compx.
       01 RETURN-STAT   cblt-rtncode.
      *> 
      *> CBL-CLOSE-FILE
      *> 
       Entry CBL-CLOSE-FILE Using
           By Reference FILE-HANDLE
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-CREATE-FILE
      *> 
       Entry CBL-CREATE-FILE Using
           By Reference ANY
           By Reference ACCESS-MODE
           By Reference DENY-MODE
           By Reference DEVICE
           By Reference FILE-HANDLE
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-FLUSH-FILE
      *> 
       Entry CBL-FLUSH-FILE Using
           By Reference FILE-HANDLE
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-FREE-RECORD-LOCK
      *> 
       Entry CBL-FREE-RECORD-LOCK Using
           By Reference FILE-HANDLE
           By Reference RECORD-OFFSET
           By Reference RECORD-LENGTH
           By Reference RESERVED
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-GET-RECORD-LOCK
      *> 
       Entry CBL-GET-RECORD-LOCK Using
           By Reference FILE-HANDLE
           By Reference RECORD-OFFSET
           By Reference RECORD-LENGTH
           By Reference RESERVED
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-OPEN-FILE
      *> 
       Entry CBL-OPEN-FILE Using
           By Reference ANY
           By Reference ACCESS-MODE
           By Reference DENY-MODE
           By Reference DEVICE
           By Reference FILE-HANDLE
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-READ-FILE
      *> 
       Entry CBL-READ-FILE Using
           By Reference FILE-HANDLE
           By Reference FILE-OFFSET
           By Reference BYTE-COUNT
           By Reference FILE-FLAGS
           By Reference ANY
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-TEST-RECORD-LOCK
      *> 
       Entry CBL-TEST-RECORD-LOCK Using
           By Reference FILE-HANDLE
           By Reference RECORD-OFFSET
           By Reference RECORD-LENGTH
           By Reference RESERVED
           Returning    RETURN-STAT
       .
      *> 
      *> CBL-WRITE-FILE
      *> 
       Entry CBL-WRITE-FILE Using
           By Reference FILE-HANDLE
           By Reference FILE-OFFSET
           By Reference BYTE-COUNT
           By Reference FILE-FLAGS
           By Reference ANY
           Returning    RETURN-STAT
       .
       End Program "ByteStream API's".
       Identification Division.
       Program-ID. "VFile Routines" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-CLOSE-VFILE VALUE "CBL_CLOSE_VFILE".
       78 CBL-OPEN-VFILE VALUE "CBL_OPEN_VFILE".
       78 CBL-READ-VFILE VALUE "CBL_READ_VFILE".
       78 CBL-WRITE-VFILE VALUE "CBL_WRITE_VFILE".
       01 HEAP-ID       cblt-vfile-handle.
       01 HEAP-LENGTH   cblt-x4-comp5.
       01 HEAP-REF      cblt-x4-comp5.
       01 RTNCODE       cblt-rtncode.
       01 STATUS-WORD   cblt-vfile-status.
      *> 
      *> CBL-CLOSE-VFILE
      *> 
       Entry CBL-CLOSE-VFILE Using
           By Value     HEAP-ID
           Returning    RTNCODE
       .
      *> 
      *> CBL-OPEN-VFILE
      *> 
       Entry CBL-OPEN-VFILE Using
           By Reference HEAP-ID
           By Reference STATUS-WORD
           Returning    RTNCODE
       .
      *> 
      *> CBL-READ-VFILE
      *> 
       Entry CBL-READ-VFILE Using
           By Value     HEAP-ID
           By Value     HEAP-REF
           By Value     HEAP-LENGTH
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-VFILE
      *> 
       Entry CBL-WRITE-VFILE Using
           By Value     HEAP-ID
           By Value     HEAP-REF
           By Value     HEAP-LENGTH
           By Reference ANY
           Returning    RTNCODE
       .
       End Program "VFile Routines".
       Identification Division.
       Program-ID. "Screen Handling Routines" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-CLEAR-SCR VALUE "CBL_CLEAR_SCR".
       78 CBL-GET-CSR-POS VALUE "CBL_GET_CSR_POS".
       78 CBL-GET-KBD-STATUS VALUE "CBL_GET_KBD_STATUS".
       78 CBL-GET-SCR-GRAPHICS VALUE "CBL_GET_SCR_GRAPHICS".
       78 CBL-GET-SCR-LINE-DRAW VALUE "CBL_GET_SCR_LINE_DRAW".
       78 CBL-GET-SCR-SIZE VALUE "CBL_GET_SCR_SIZE".
       78 CBL-READ-KBD-CHAR VALUE "CBL_READ_KBD_CHAR".
       78 CBL-READ-SCR-ATTRS VALUE "CBL_READ_SCR_ATTRS".
       78 CBL-READ-SCR-CHARS VALUE "CBL_READ_SCR_CHARS".
       78 CBL-READ-SCR-CHATTRS VALUE "CBL_READ_SCR_CHATTRS".
       78 CBL-SCR-ALLOCATE-COLOR VALUE "CBL_SCR_ALLOCATE_COLOR".
       78 CBL-SCR-ALLOCATE-VC-COLOR VALUE "CBL_SCR_ALLOCATE_VC_COLOR".
       78 CBL-SCR-CREATE-VC VALUE "CBL_SCR_CREATE_VC".
       78 CBL-SCR-DESTROY-VC VALUE "CBL_SCR_DESTROY_VC".
       78 CBL-SCR-GET-ATTRIBUTES VALUE "CBL_SCR_GET_ATTRIBUTES".
       78 CBL-SCR-GET-ATTR-INFO VALUE "CBL_SCR_GET_ATTR_INFO".
       78 CBL-SCR-NAME-TO-RGB VALUE "CBL_SCR_NAME_TO_RGB".
       78 CBL-SCR-QUERY-COLORMAP VALUE "CBL_SCR_QUERY_COLORMAP".
       78 CBL-SCR-RESTORE VALUE "CBL_SCR_RESTORE".
       78 CBL-SCR-RESTORE-ATTRIBUTES VALUE "CBL_SCR_RESTORE_ATTRIBUTES".
       78 CBL-SCR-SAVE VALUE "CBL_SCR_SAVE".
       78 CBL-SCR-SAVE-ATTRIBUTES VALUE "CBL_SCR_SAVE_ATTRIBUTES".
       78 CBL-SCR-SET-ATTRIBUTES VALUE "CBL_SCR_SET_ATTRIBUTES".
       78 CBL-SCR-SET-PC-ATTRIBUTES VALUE "CBL_SCR_SET_PC_ATTRIBUTES".
       78 CBL-SET-CSR-POS VALUE "CBL_SET_CSR_POS".
       78 CBL-SWAP-SCR-CHATTRS VALUE "CBL_SWAP_SCR_CHATTRS".
       78 CBL-WRITE-SCR-ATTRS VALUE "CBL_WRITE_SCR_ATTRS".
       78 CBL-WRITE-SCR-CHARS VALUE "CBL_WRITE_SCR_CHARS".
       78 CBL-WRITE-SCR-CHARS-ATTR VALUE "CBL_WRITE_SCR_CHARS_ATTR".
       78 CBL-WRITE-SCR-CHATTRS VALUE "CBL_WRITE_SCR_CHATTRS".
       78 CBL-WRITE-SCR-N-ATTR VALUE "CBL_WRITE_SCR_N_ATTR".
       78 CBL-WRITE-SCR-N-CHAR VALUE "CBL_WRITE_SCR_N_CHAR".
       78 CBL-WRITE-SCR-N-CHATTR VALUE "CBL_WRITE_SCR_N_CHATTR".
       78 CBL-WRITE-SCR-TTY VALUE "CBL_WRITE_SCR_TTY".
       01 ACHARACTER    cblt-x1-compx.
       01 ATTRIBUTE     cblt-x1-compx.
       01 ATTRIBUTE-INFORMATION cblt-generic-attr-information.
       01 END-LINE      cblt-x4-comp5.
       01 GRAPHICS-BUFFER       cblt-get-scr-graphics-buffer.
       01 HANDLE        cblt-pointer.
       01 KEY-STATUS    cblt-x1-compx.
       01 LINE-DRAW-FUNCTION-CODE       cblt-x1-compx.
       01 NEW-RTNCODE   cblt-rtncode.
       01 RTNCODE       cblt-rtncode.
       01 SCR-FLAGS     cblt-x4-comp5.
       01 SCREEN-DEPTH  cblt-x1-compx.
       01 SCREEN-POSITION       cblt-screen-position.
       01 SCREEN-WIDTH  cblt-x1-compx.
       01 STRING-LENGTH cblt-x2-compx.
       01 TABLE-COUNT   cblt-x2-compx.
       01 TOP-LINE      cblt-x4-comp5.
      *> 
      *> CBL-CLEAR-SCR
      *> 
       Entry CBL-CLEAR-SCR Using
           By Reference ACHARACTER
           By Reference ATTRIBUTE
           Returning    RTNCODE
       .
      *> 
      *> CBL-GET-CSR-POS
      *> 
       Entry CBL-GET-CSR-POS Using
           By Reference SCREEN-POSITION
           Returning    RTNCODE
       .
      *> 
      *> CBL-GET-KBD-STATUS
      *> 
       Entry CBL-GET-KBD-STATUS Using
           By Reference KEY-STATUS
           Returning    RTNCODE
       .
      *> 
      *> CBL-GET-SCR-GRAPHICS
      *> 
       Entry CBL-GET-SCR-GRAPHICS Using
           By Reference GRAPHICS-BUFFER
           Returning    RTNCODE
       .
      *> 
      *> CBL-GET-SCR-LINE-DRAW
      *> 
       Entry CBL-GET-SCR-LINE-DRAW Using
           By Reference LINE-DRAW-FUNCTION-CODE
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-GET-SCR-SIZE
      *> 
       Entry CBL-GET-SCR-SIZE Using
           By Reference SCREEN-DEPTH
           By Reference SCREEN-WIDTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-READ-KBD-CHAR
      *> 
       Entry CBL-READ-KBD-CHAR Using
           By Reference ACHARACTER
           Returning    RTNCODE
       .
      *> 
      *> CBL-READ-SCR-ATTRS
      *> 
       Entry CBL-READ-SCR-ATTRS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-READ-SCR-CHARS
      *> 
       Entry CBL-READ-SCR-CHARS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-READ-SCR-CHATTRS
      *> 
       Entry CBL-READ-SCR-CHATTRS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-ALLOCATE-COLOR
      *> 
       Entry CBL-SCR-ALLOCATE-COLOR Using
           By Reference TABLE-COUNT
           By Reference ANY
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-ALLOCATE-VC-COLOR
      *> 
       Entry CBL-SCR-ALLOCATE-VC-COLOR Using
           By Reference TABLE-COUNT
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-CREATE-VC
      *> 
       Entry CBL-SCR-CREATE-VC
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-DESTROY-VC
      *> 
       Entry CBL-SCR-DESTROY-VC
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-GET-ATTRIBUTES
      *> 
       Entry CBL-SCR-GET-ATTRIBUTES Using
           By Reference TABLE-COUNT
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-GET-ATTR-INFO
      *> 
       Entry CBL-SCR-GET-ATTR-INFO Using
           By Reference ATTRIBUTE-INFORMATION
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-NAME-TO-RGB
      *> 
       Entry CBL-SCR-NAME-TO-RGB Using
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-QUERY-COLORMAP
      *> 
       Entry CBL-SCR-QUERY-COLORMAP Using
           By Reference TABLE-COUNT
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-RESTORE
      *> 
       Entry CBL-SCR-RESTORE Using
           By Value     SCR-FLAGS
           By Value     HANDLE
           Returning    NEW-RTNCODE
       .
      *> 
      *> CBL-SCR-RESTORE-ATTRIBUTES
      *> 
       Entry CBL-SCR-RESTORE-ATTRIBUTES Using
           By Reference HANDLE
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-SAVE
      *> 
       Entry CBL-SCR-SAVE Using
           By Value     SCR-FLAGS
           By Value     TOP-LINE
           By Value     END-LINE
           Returning    HANDLE
       .
      *> 
      *> CBL-SCR-SAVE-ATTRIBUTES
      *> 
       Entry CBL-SCR-SAVE-ATTRIBUTES Using
           By Reference HANDLE
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-SET-ATTRIBUTES
      *> 
       Entry CBL-SCR-SET-ATTRIBUTES Using
           By Reference TABLE-COUNT
           By Reference ANY
           By Reference ANY
           Returning    RTNCODE
       .
      *> 
      *> CBL-SCR-SET-PC-ATTRIBUTES
      *> 
       Entry CBL-SCR-SET-PC-ATTRIBUTES
           Returning    RTNCODE
       .
      *> 
      *> CBL-SET-CSR-POS
      *> 
       Entry CBL-SET-CSR-POS Using
           By Reference SCREEN-POSITION
           Returning    RTNCODE
       .
      *> 
      *> CBL-SWAP-SCR-CHATTRS
      *> 
       Entry CBL-SWAP-SCR-CHATTRS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-ATTRS
      *> 
       Entry CBL-WRITE-SCR-ATTRS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-CHARS
      *> 
       Entry CBL-WRITE-SCR-CHARS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-CHARS-ATTR
      *> 
       Entry CBL-WRITE-SCR-CHARS-ATTR Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference STRING-LENGTH
           By Reference ATTRIBUTE
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-CHATTRS
      *> 
       Entry CBL-WRITE-SCR-CHATTRS Using
           By Reference SCREEN-POSITION
           By Reference ANY
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-N-ATTR
      *> 
       Entry CBL-WRITE-SCR-N-ATTR Using
           By Reference SCREEN-POSITION
           By Reference ATTRIBUTE
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-N-CHAR
      *> 
       Entry CBL-WRITE-SCR-N-CHAR Using
           By Reference SCREEN-POSITION
           By Reference ACHARACTER
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-N-CHATTR
      *> 
       Entry CBL-WRITE-SCR-N-CHATTR Using
           By Reference SCREEN-POSITION
           By Reference ACHARACTER
           By Reference ATTRIBUTE
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
      *> 
      *> CBL-WRITE-SCR-TTY
      *> 
       Entry CBL-WRITE-SCR-TTY Using
           By Reference ANY
           By Reference STRING-LENGTH
           Returning    RTNCODE
       .
       End Program "Screen Handling Routines".
       Identification Division.
       Program-ID. "Mouse handling" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-GET-MOUSE-MASK VALUE "CBL_GET_MOUSE_MASK".
       78 CBL-GET-MOUSE-POSITION VALUE "CBL_GET_MOUSE_POSITION".
       78 CBL-GET-MOUSE-STATUS VALUE "CBL_GET_MOUSE_STATUS".
       78 CBL-HIDE-MOUSE VALUE "CBL_HIDE_MOUSE".
       78 CBL-INIT-MOUSE VALUE "CBL_INIT_MOUSE".
       78 CBL-READ-MOUSE-EVENT VALUE "CBL_READ_MOUSE_EVENT".
       78 CBL-SET-MOUSE-MASK VALUE "CBL_SET_MOUSE_MASK".
       78 CBL-SET-MOUSE-POSITION VALUE "CBL_SET_MOUSE_POSITION".
       78 CBL-SHOW-MOUSE VALUE "CBL_SHOW_MOUSE".
       78 CBL-TERM-MOUSE VALUE "CBL_TERM_MOUSE".
       78 PC-GET-MOUSE-SHAPE VALUE "PC_GET_MOUSE_SHAPE".
       78 PC-SET-MOUSE-HIDE-AREA VALUE "PC_SET_MOUSE_HIDE_AREA".
       78 PC-SET-MOUSE-SHAPE VALUE "PC_SET_MOUSE_SHAPE".
       01 COLLISION-AREA        cblt-mouse-rect.
       01 MOUSE-BUTTONS cblt-x2-compx.
       01 MOUSE-EVENT   cblt-mouse-event.
       01 MOUSE-HANDLE  cblt-x4-compx.
       01 MOUSE-MASK    cblt-x2-compx.
       01 MOUSE-POSITION        cblt-mouse-pos.
       01 MOUSE-PTR-SHAPE       cblt-mouse-shape.
       01 MOUSE-QUEUE-SIZE      cblt-x2-compx.
       01 READ-TYPE     cblt-x1-compx.
       01 STATUS-CODE   cblt-rtncode.
      *> 
      *> CBL-GET-MOUSE-MASK
      *> 
       Entry CBL-GET-MOUSE-MASK Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-MASK
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-GET-MOUSE-POSITION
      *> 
       Entry CBL-GET-MOUSE-POSITION Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-POSITION
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-GET-MOUSE-STATUS
      *> 
       Entry CBL-GET-MOUSE-STATUS Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-QUEUE-SIZE
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-HIDE-MOUSE
      *> 
       Entry CBL-HIDE-MOUSE Using
           By Reference MOUSE-HANDLE
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-INIT-MOUSE
      *> 
       Entry CBL-INIT-MOUSE Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-BUTTONS
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-READ-MOUSE-EVENT
      *> 
       Entry CBL-READ-MOUSE-EVENT Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-EVENT
           By Reference READ-TYPE
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-SET-MOUSE-MASK
      *> 
       Entry CBL-SET-MOUSE-MASK Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-MASK
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-SET-MOUSE-POSITION
      *> 
       Entry CBL-SET-MOUSE-POSITION Using
           By Reference MOUSE-HANDLE
           By Reference MOUSE-POSITION
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-SHOW-MOUSE
      *> 
       Entry CBL-SHOW-MOUSE Using
           By Reference MOUSE-HANDLE
           Returning    STATUS-CODE
       .
      *> 
      *> CBL-TERM-MOUSE
      *> 
       Entry CBL-TERM-MOUSE Using
           By Reference MOUSE-HANDLE
           Returning    STATUS-CODE
       .
      *> 
      *> PC-GET-MOUSE-SHAPE
      *> 
       Entry PC-GET-MOUSE-SHAPE Using
           By Reference MOUSE-HANDLE
           By Reference ANY
           By Reference MOUSE-PTR-SHAPE
           Returning    STATUS-CODE
       .
      *> 
      *> PC-SET-MOUSE-HIDE-AREA
      *> 
       Entry PC-SET-MOUSE-HIDE-AREA Using
           By Reference MOUSE-HANDLE
           By Reference COLLISION-AREA
           Returning    STATUS-CODE
       .
      *> 
      *> PC-SET-MOUSE-SHAPE
      *> 
       Entry PC-SET-MOUSE-SHAPE Using
           By Reference MOUSE-HANDLE
           By Reference ANY
           By Reference MOUSE-PTR-SHAPE
           Returning    STATUS-CODE
       .
       End Program "Mouse handling".
       Identification Division.
       Program-ID. "PC specific run-time calls" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 PC-FIND-DRIVES VALUE "PC_FIND_DRIVES".
       78 PC-READ-DRIVE VALUE "PC_READ_DRIVE".
       78 PC-SET-DRIVE VALUE "PC_SET_DRIVE".
       01 DRIVE-INFO    cblt-x4-compx.
       01 DRIVE-LETTER  cblt-x1-compx.
       01 PC-STATUS-CODE        cblt-rtncode.
      *> 
      *> PC-FIND-DRIVES
      *> 
       Entry PC-FIND-DRIVES Using
           By Reference DRIVE-INFO
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-READ-DRIVE
      *> 
       Entry PC-READ-DRIVE Using
           By Reference DRIVE-LETTER
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-SET-DRIVE
      *> 
       Entry PC-SET-DRIVE Using
           By Reference DRIVE-LETTER
           Returning    PC-STATUS-CODE
       .
       End Program "PC specific run-time calls".
       Identification Division.
       Program-ID. "Windows specific run-time calls" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 PC-WIN-ABOUT VALUE "PC_WIN_ABOUT".
       78 PC-WIN-CHAR-TO-OEM VALUE "PC_WIN_CHAR_TO_OEM".
       78 PC-WIN-HANDLE VALUE "PC_WIN_HANDLE".
       78 PC-WIN-INIT VALUE "PC_WIN_INIT".
       78 PC-WIN-OEM-TO-CHAR VALUE "PC_WIN_OEM_TO_CHAR".
       78 PC-WIN-YIELD VALUE "PC_WIN_YIELD".
       01 ABOUT-LEN     cblt-os-size.
       01 HINST         cblt-x4-comp5.
       01 HPREVINST     cblt-x4-comp5.
       01 LPSZCMDLINE   cblt-pointer.
       01 NCMDSHOW      cblt-x4-comp5.
       01 PC-STATUS-CODE        cblt-rtncode.
       01 SRC-LEN       cblt-os-size.
       01 TGT-LEN       cblt-os-size.
       01 WIN-HANDLE    cblt-x4-comp5.
      *> 
      *> PC-WIN-ABOUT
      *> 
       Entry PC-WIN-ABOUT Using
           By Reference ANY
           By Value     ABOUT-LEN
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-WIN-CHAR-TO-OEM
      *> 
       Entry PC-WIN-CHAR-TO-OEM Using
           By Reference ANY
           By Reference ANY
           By Value     SRC-LEN
           By Value     TGT-LEN
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-WIN-HANDLE
      *> 
       Entry PC-WIN-HANDLE Using
           By Reference WIN-HANDLE
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-WIN-INIT
      *> 
       Entry PC-WIN-INIT Using
           By Reference HINST
           By Reference HPREVINST
           By Reference LPSZCMDLINE
           By Reference NCMDSHOW
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-WIN-OEM-TO-CHAR
      *> 
       Entry PC-WIN-OEM-TO-CHAR Using
           By Reference ANY
           By Reference ANY
           By Value     SRC-LEN
           By Value     TGT-LEN
           Returning    PC-STATUS-CODE
       .
      *> 
      *> PC-WIN-YIELD
      *> 
       Entry PC-WIN-YIELD
           Returning    PC-STATUS-CODE
       .
       End Program "Windows specific run-time calls".
       Identification Division.
       Program-ID. "Program Handling Routines" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-CANCEL-PROC VALUE "CBL_CANCEL_PROC".
       78 CBL-DEBUGBREAK VALUE "CBL_DEBUGBREAK".
       78 CBL-DEBUG-START VALUE "CBL_DEBUG_START".
       78 CBL-DEBUG-STOP VALUE "CBL_DEBUG_STOP".
       78 CBL-FFND-REPORT VALUE "CBL_FFND_REPORT".
       78 CBL-GET-PROGRAM-INFO VALUE "CBL_GET_PROGRAM_INFO".
       01 CANCEL-PROC-DATALENGTH        cblt-x4-comp5.
       01 CANCEL-PROC-FUNCTION  cblt-x4-comp5.
       01 CANCEL-PROC-PARAMBLOCK        cblt-cancel-proc-params.
       01 CANCEL-PROC-RTNCODE   cblt-rtncode.
       01 DBG-FLAGS     cblt-os-flags.
       01 DBG-RTNCODE   cblt-rtncode.
       01 DBG-TIMEOUT   cblt-os-ssize.
       01 FFR-RTNCODE   cblt-rtncode.
       01 FFR-RTSERR    cblt-x4-comp5.
       01 FFR-TERMINATE cblt-x4-comp5.
       01 GPI-BLOCK     cblt-prog-info-params.
       01 GPI-FUNCTION  cblt-x4-comp5.
       01 GPI-NAME-LEN  cblt-x4-comp5.
       01 GPI-RTNCODE   cblt-rtncode.
      *> 
      *> CBL-CANCEL-PROC
      *> 
       Entry CBL-CANCEL-PROC Using
           By Value     CANCEL-PROC-FUNCTION
           By Reference CANCEL-PROC-PARAMBLOCK
           By Value     CANCEL-PROC-DATALENGTH
           Returning    CANCEL-PROC-RTNCODE
       .
      *> 
      *> CBL-DEBUGBREAK
      *> 
       Entry CBL-DEBUGBREAK
           Returning    DBG-RTNCODE
       .
      *> 
      *> CBL-DEBUG-START
      *> 
       Entry CBL-DEBUG-START Using
           By Value     DBG-FLAGS
           By Value     DBG-TIMEOUT
           By Reference ANY
           Returning    DBG-RTNCODE
       .
      *> 
      *> CBL-DEBUG-STOP
      *> 
       Entry CBL-DEBUG-STOP Using
           By Value     DBG-FLAGS
           Returning    DBG-RTNCODE
       .
      *> 
      *> CBL-FFND-REPORT
      *> 
       Entry CBL-FFND-REPORT Using
           By Value     FFR-RTSERR
           By Value     FFR-TERMINATE
           Returning    FFR-RTNCODE
       .
      *> 
      *> CBL-GET-PROGRAM-INFO
      *> 
       Entry CBL-GET-PROGRAM-INFO Using
           By Value     GPI-FUNCTION
           By Reference GPI-BLOCK
           By Reference ANY
           By Reference GPI-NAME-LEN
           Returning    GPI-RTNCODE
       .
       End Program "Program Handling Routines".
       Identification Division.
       Program-ID. "Monitor Synchronization APIs" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-MONITOR-BROWSE VALUE "CBL_MONITOR_BROWSE".
       78 CBL-MONITOR-BROWSE-TO-READ VALUE "CBL_MONITOR_BROWSE_TO_READ".
       78 CBL-MONITOR-BROWSE-TO-WRITE
              VALUE "CBL_MONITOR_BROWSE_TO_WRITE".
       78 CBL-MONITOR-CLOSE VALUE "CBL_MONITOR_CLOSE".
       78 CBL-MONITOR-OPEN-INTRA VALUE "CBL_MONITOR_OPEN_INTRA".
       78 CBL-MONITOR-READ VALUE "CBL_MONITOR_READ".
       78 CBL-MONITOR-RELEASE VALUE "CBL_MONITOR_RELEASE".
       78 CBL-MONITOR-UNBROWSE VALUE "CBL_MONITOR_UNBROWSE".
       78 CBL-MONITOR-UNREAD VALUE "CBL_MONITOR_UNREAD".
       78 CBL-MONITOR-UNWRITE VALUE "CBL_MONITOR_UNWRITE".
       78 CBL-MONITOR-WRITE VALUE "CBL_MONITOR_WRITE".
       78 CBL-MONITOR-WRITE-TO-BROWSE
              VALUE "CBL_MONITOR_WRITE_TO_BROWSE".
       01 MON-FLAGS     cblt-os-flags.
       01 MON-HANDLE    cblt-pointer.
       01 MON-RTNCODE   cblt-rtncode.
      *> 
      *> CBL-MONITOR-BROWSE
      *> 
       Entry CBL-MONITOR-BROWSE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-BROWSE-TO-READ
      *> 
       Entry CBL-MONITOR-BROWSE-TO-READ Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-BROWSE-TO-WRITE
      *> 
       Entry CBL-MONITOR-BROWSE-TO-WRITE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-CLOSE
      *> 
       Entry CBL-MONITOR-CLOSE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-OPEN-INTRA
      *> 
       Entry CBL-MONITOR-OPEN-INTRA Using
           By Reference MON-HANDLE
           By Value     MON-FLAGS
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-READ
      *> 
       Entry CBL-MONITOR-READ Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-RELEASE
      *> 
       Entry CBL-MONITOR-RELEASE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-UNBROWSE
      *> 
       Entry CBL-MONITOR-UNBROWSE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-UNREAD
      *> 
       Entry CBL-MONITOR-UNREAD Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-UNWRITE
      *> 
       Entry CBL-MONITOR-UNWRITE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-WRITE
      *> 
       Entry CBL-MONITOR-WRITE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
      *> 
      *> CBL-MONITOR-WRITE-TO-BROWSE
      *> 
       Entry CBL-MONITOR-WRITE-TO-BROWSE Using
           By Value     MON-HANDLE
           Returning    MON-RTNCODE
       .
       End Program "Monitor Synchronization APIs".
       Identification Division.
       Program-ID. "Mutex Synchronization APIs" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-MUTEX-ACQUIRE VALUE "CBL_MUTEX_ACQUIRE".
       78 CBL-MUTEX-CLOSE VALUE "CBL_MUTEX_CLOSE".
       78 CBL-MUTEX-OPEN-INTRA VALUE "CBL_MUTEX_OPEN_INTRA".
       78 CBL-MUTEX-RELEASE VALUE "CBL_MUTEX_RELEASE".
       01 MUT-FLAGS     cblt-os-flags.
       01 MUT-HANDLE    cblt-pointer.
       01 MUT-RTNCODE   cblt-rtncode.
      *> 
      *> CBL-MUTEX-ACQUIRE
      *> 
       Entry CBL-MUTEX-ACQUIRE Using
           By Value     MUT-HANDLE
           By Value     MUT-FLAGS
           Returning    MUT-RTNCODE
       .
      *> 
      *> CBL-MUTEX-CLOSE
      *> 
       Entry CBL-MUTEX-CLOSE Using
           By Value     MUT-HANDLE
           Returning    MUT-RTNCODE
       .
      *> 
      *> CBL-MUTEX-OPEN-INTRA
      *> 
       Entry CBL-MUTEX-OPEN-INTRA Using
           By Reference MUT-HANDLE
           By Value     MUT-FLAGS
           Returning    MUT-RTNCODE
       .
      *> 
      *> CBL-MUTEX-RELEASE
      *> 
       Entry CBL-MUTEX-RELEASE Using
           By Value     MUT-HANDLE
           Returning    MUT-RTNCODE
       .
       End Program "Mutex Synchronization APIs".
       Identification Division.
       Program-ID. "Event Synchronization APIs" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-EVENT-CLEAR VALUE "CBL_EVENT_CLEAR".
       78 CBL-EVENT-CLOSE VALUE "CBL_EVENT_CLOSE".
       78 CBL-EVENT-OPEN-INTRA VALUE "CBL_EVENT_OPEN_INTRA".
       78 CBL-EVENT-POST VALUE "CBL_EVENT_POST".
       78 CBL-EVENT-WAIT VALUE "CBL_EVENT_WAIT".
       01 EVT-FLAGS     cblt-os-flags.
       01 EVT-HANDLE    cblt-pointer.
       01 EVT-RTNCODE   cblt-rtncode.
      *> 
      *> CBL-EVENT-CLEAR
      *> 
       Entry CBL-EVENT-CLEAR Using
           By Value     EVT-HANDLE
           Returning    EVT-RTNCODE
       .
      *> 
      *> CBL-EVENT-CLOSE
      *> 
       Entry CBL-EVENT-CLOSE Using
           By Value     EVT-HANDLE
           Returning    EVT-RTNCODE
       .
      *> 
      *> CBL-EVENT-OPEN-INTRA
      *> 
       Entry CBL-EVENT-OPEN-INTRA Using
           By Reference EVT-HANDLE
           By Value     EVT-FLAGS
           Returning    EVT-RTNCODE
       .
      *> 
      *> CBL-EVENT-POST
      *> 
       Entry CBL-EVENT-POST Using
           By Value     EVT-HANDLE
           Returning    EVT-RTNCODE
       .
      *> 
      *> CBL-EVENT-WAIT
      *> 
       Entry CBL-EVENT-WAIT Using
           By Value     EVT-HANDLE
           By Value     EVT-FLAGS
           Returning    EVT-RTNCODE
       .
       End Program "Event Synchronization APIs".
       Identification Division.
       Program-ID. "Semaphore Synchronization APIs" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-SEMAPHORE-CLEAR VALUE "CBL_SEMAPHORE_CLEAR".
       78 CBL-SEMAPHORE-CLOSE VALUE "CBL_SEMAPHORE_CLOSE".
       78 CBL-SEMAPHORE-OPEN-INTRA VALUE "CBL_SEMAPHORE_OPEN_INTRA".
       78 CBL-SEMAPHORE-POST VALUE "CBL_SEMAPHORE_POST".
       78 CBL-SEMAPHORE-WAIT VALUE "CBL_SEMAPHORE_WAIT".
       01 SEM-FLAGS     cblt-os-flags.
       01 SEM-HANDLE    cblt-pointer.
       01 SEM-RTNCODE   cblt-rtncode.
       01 SEM-START     cblt-x4-comp5.
      *> 
      *> CBL-SEMAPHORE-CLEAR
      *> 
       Entry CBL-SEMAPHORE-CLEAR Using
           By Value     SEM-HANDLE
           Returning    SEM-RTNCODE
       .
      *> 
      *> CBL-SEMAPHORE-CLOSE
      *> 
       Entry CBL-SEMAPHORE-CLOSE Using
           By Value     SEM-HANDLE
           Returning    SEM-RTNCODE
       .
      *> 
      *> CBL-SEMAPHORE-OPEN-INTRA
      *> 
       Entry CBL-SEMAPHORE-OPEN-INTRA Using
           By Reference SEM-HANDLE
           By Value     SEM-START
           By Value     SEM-FLAGS
           Returning    SEM-RTNCODE
       .
      *> 
      *> CBL-SEMAPHORE-POST
      *> 
       Entry CBL-SEMAPHORE-POST Using
           By Value     SEM-HANDLE
           Returning    SEM-RTNCODE
       .
      *> 
      *> CBL-SEMAPHORE-WAIT
      *> 
       Entry CBL-SEMAPHORE-WAIT Using
           By Value     SEM-HANDLE
           By Value     SEM-FLAGS
           Returning    SEM-RTNCODE
       .
       End Program "Semaphore Synchronization APIs".
       Identification Division.
       Program-ID. "Thread Local Storage APIs" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-TSTORE-CLOSE VALUE "CBL_TSTORE_CLOSE".
       78 CBL-TSTORE-CREATE VALUE "CBL_TSTORE_CREATE".
       78 CBL-TSTORE-GET VALUE "CBL_TSTORE_GET".
       01 TSTORE-FLAGS  cblt-os-flags.
       01 TSTORE-HANDLE cblt-pointer.
       01 TSTORE-PTR    cblt-pointer.
       01 TSTORE-RTNCODE        cblt-rtncode.
       01 TSTORE-SIZE   cblt-os-size.
      *> 
      *> CBL-TSTORE-CLOSE
      *> 
       Entry CBL-TSTORE-CLOSE Using
           By Value     TSTORE-HANDLE
           Returning    TSTORE-RTNCODE
       .
      *> 
      *> CBL-TSTORE-CREATE
      *> 
       Entry CBL-TSTORE-CREATE Using
           By Reference TSTORE-HANDLE
           By Value     TSTORE-SIZE
           By Value     TSTORE-FLAGS
           Returning    TSTORE-RTNCODE
       .
      *> 
      *> CBL-TSTORE-GET
      *> 
       Entry CBL-TSTORE-GET Using
           By Value     TSTORE-HANDLE
           By Reference TSTORE-PTR
           Returning    TSTORE-RTNCODE
       .
       End Program "Thread Local Storage APIs".
       Identification Division.
       Program-ID. "Threading APIs" External.
       Working-Storage Section.
       COPY "cbltypes.cpy".
       78 CBL-THREAD-CREATE VALUE "CBL_THREAD_CREATE".
       78 CBL-THREAD-CREATE-P VALUE "CBL_THREAD_CREATE_P".
       78 CBL-THREAD-DETACH VALUE "CBL_THREAD_DETACH".
       78 CBL-THREAD-EXIT VALUE "CBL_THREAD_EXIT".
       78 CBL-THREAD-IDDATA-ALLOC VALUE "CBL_THREAD_IDDATA_ALLOC".
       78 CBL-THREAD-IDDATA-GET VALUE "CBL_THREAD_IDDATA_GET".
       78 CBL-THREAD-KILL VALUE "CBL_THREAD_KILL".
       78 CBL-THREAD-LIST-END VALUE "CBL_THREAD_LIST_END".
       78 CBL-THREAD-LIST-NEXT VALUE "CBL_THREAD_LIST_NEXT".
       78 CBL-THREAD-LIST-START VALUE "CBL_THREAD_LIST_START".
       78 CBL-THREAD-LOCK VALUE "CBL_THREAD_LOCK".
       78 CBL-THREAD-PROG-LOCK VALUE "CBL_THREAD_PROG_LOCK".
       78 CBL-THREAD-PROG-UNLOCK VALUE "CBL_THREAD_PROG_UNLOCK".
       78 CBL-THREAD-RESUME VALUE "CBL_THREAD_RESUME".
       78 CBL-THREAD-SELF VALUE "CBL_THREAD_SELF".
       78 CBL-THREAD-SLEEP VALUE "CBL_THREAD_SLEEP".
       78 CBL-THREAD-SUSPEND VALUE "CBL_THREAD_SUSPEND".
       78 CBL-THREAD-UNLOCK VALUE "CBL_THREAD_UNLOCK".
       78 CBL-THREAD-WAIT VALUE "CBL_THREAD_WAIT".
       78 CBL-THREAD-YIELD VALUE "CBL_THREAD_YIELD".
       01 THREAD-ENTRY-PTR      cblt-ppointer.
       01 THREAD-FLAGS  cblt-os-flags.
       01 THREAD-HANDLE cblt-pointer.
       01 THREAD-IDDATA cblt-pointer.
       01 THREAD-IDDATA-SIZE    cblt-os-size.
       01 THREAD-PARAM-SIZE     cblt-os-size.
       01 THREAD-PRIORITY       cblt-sx4-comp5.
       01 THREAD-RTNCODE        cblt-rtncode.
       01 THREAD-RTNVALUE       cblt-pointer.
       01 THREAD-SLEEP  cblt-os-size.
       01 THREAD-STACK-SIZE     cblt-os-size.
       01 THREAD-STATE  cblt-x4-compx.
      *> 
      *> CBL-THREAD-CREATE
      *> 
       Entry CBL-THREAD-CREATE Using
           By Reference ANY
           By Reference ANY
           By Value     THREAD-PARAM-SIZE
           By Value     THREAD-FLAGS
           By Value     THREAD-PRIORITY
           By Value     THREAD-STACK-SIZE
           By Reference THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-CREATE-P
      *> 
       Entry CBL-THREAD-CREATE-P Using
           By Value     THREAD-ENTRY-PTR
           By Reference ANY
           By Value     THREAD-PARAM-SIZE
           By Value     THREAD-FLAGS
           By Value     THREAD-PRIORITY
           By Value     THREAD-STACK-SIZE
           By Reference THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-DETACH
      *> 
       Entry CBL-THREAD-DETACH Using
           By Value     THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-EXIT
      *> 
       Entry CBL-THREAD-EXIT Using
           By Value     THREAD-RTNVALUE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-IDDATA-ALLOC
      *> 
       Entry CBL-THREAD-IDDATA-ALLOC Using
           By Value     THREAD-IDDATA
           By Value     THREAD-IDDATA-SIZE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-IDDATA-GET
      *> 
       Entry CBL-THREAD-IDDATA-GET Using
           By Reference THREAD-IDDATA
           By Value     THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-KILL
      *> 
       Entry CBL-THREAD-KILL Using
           By Value     THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-LIST-END
      *> 
       Entry CBL-THREAD-LIST-END
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-LIST-NEXT
      *> 
       Entry CBL-THREAD-LIST-NEXT Using
           By Reference THREAD-HANDLE
           By Reference THREAD-STATE
           By Reference THREAD-IDDATA
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-LIST-START
      *> 
       Entry CBL-THREAD-LIST-START Using
           By Reference THREAD-HANDLE
           By Reference THREAD-STATE
           By Reference THREAD-IDDATA
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-LOCK
      *> 
       Entry CBL-THREAD-LOCK
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-PROG-LOCK
      *> 
       Entry CBL-THREAD-PROG-LOCK
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-PROG-UNLOCK
      *> 
       Entry CBL-THREAD-PROG-UNLOCK
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-RESUME
      *> 
       Entry CBL-THREAD-RESUME Using
           By Value     THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-SELF
      *> 
       Entry CBL-THREAD-SELF Using
           By Reference THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-SLEEP
      *> 
       Entry CBL-THREAD-SLEEP Using
           By Value     THREAD-SLEEP
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-SUSPEND
      *> 
       Entry CBL-THREAD-SUSPEND Using
           By Value     THREAD-HANDLE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-UNLOCK
      *> 
       Entry CBL-THREAD-UNLOCK
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-WAIT
      *> 
       Entry CBL-THREAD-WAIT Using
           By Value     THREAD-HANDLE
           By Reference THREAD-RTNVALUE
           Returning    THREAD-RTNCODE
       .
      *> 
      *> CBL-THREAD-YIELD
      *> 
       Entry CBL-THREAD-YIELD
           Returning    THREAD-RTNCODE
       .
       End Program "Threading APIs".
