Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/39186

From BetaArchive Wiki

COPY REPLACING when Run in ANIMATE or PANIMATE May Hang

PSS ID Number: Q39186 Article last modified on 04-20-1993

3.00 3.00a | 3.00 3.00a MS-DOS | OS/2

The information in this article applies to:
- Microsoft COBOL for MS-DOS and OS/2, versions 3.0 and 3.0a

Summary: Under a certain case, the COPY REPLACING statement supported by the Microsoft COBOL Version 3.0 Compiler may produce code that causes the ANIMATE or PANIMATE debug utilities to hang when run. The problem arises in the REPLACING clause of the COPY statement when a period is used in the replacement literals. Microsoft has confirmed this to be a problem in Versions 3.0. We are researching this problem and will post new information as it becomes available. The code example below demonstrates this problem. You can correct the problem by removing the period from the end of the replacement literals.

More Information: The program below should be compiled, then run in ANIMATE (in MS-DOS or MS OS/2 real mode) or PANIMATE (in MS OS/2) using the default directives, as follows: COBOL testprog /ANIM; ANIMATE testprog The following is a code example:

   WORKING-STORAGE SECTION.
   01  WS-CODE-FLAG                PIC 9(2).
   01  SIO-RECORD                  PIC X.
   01  SYUDAR-RECORD               PIC X.
   01  ERR-RECORD                  PIC X.
   01  CMD-RECORD                  PIC X.
   01  S-RECORD                    PIC X.
       88 S-CODE-AD                VALUE "1".
   01  FMS-RECORD                  PIC X.
       88  FMS-OK                  VALUE "1".
   01  SYMESG-RECORD.
       05  SYMESG-DETAIL           PIC X.
   01  CSCTYP-RECORD               PIC X.
   PROCEDURE DIVISION.
   0000-START.
       PERFORM 1000-INITIALIZE.
   STOP RUN.
    1000-INITIALIZE.
       MOVE ZERO TO WS-CODE-FLAG.
       COPY CPYCDERD REPLACING ==XXXXXX-RECORD.==  BY
                               ==CSCTYP-RECORD.==.

The CPYCDERD COPY file is as follows: CALL “UTZCDE” USING WS-CODE-FLAG CMD-RECORD SIO-RECORD ERR-RECORD S-RECORD FMS-RECORD SYUDAR-RECORD SYMESG-RECORD XXXXXX-RECORD. CALL SYMESG-DETAIL USING ERR-RECORD S-RECORD FMS-RECORD SYUDAR-RECORD SYMESG-RECORD XXXXXX-RECORD.

Additional reference words: 3.00 3.00a Copyright Microsoft Corporation 1993.