skip to main content

Transitioning from ACUCOBOL-GT : Syntax and Behavior

Syntax and Behavior
o
o
       01 COM-02                 PIC XBXBXBXBXBXBXBXBXBXBXBXBXBXBX
    05 ENTRY-FIELD.
It must be changed to:
    03 ENTRY-FIELD.
The "SET POINTER TO ADDRESS OF DataItem" statement is not supported. There are two possible solutions:
o
compile the program with the -cp option. This is suggested if you need to pass the pointer to external C functions.
o
compile the program with -rm=handle,address. This is suggested if you use the pointer internally in the COBOL program.
The "RECEIVE MyMessage FROM ANY THREAD" statement must include the NO WAIT statement, or its equivalent, BEFORE TIME 0. Any other timeout is not supported. For example, the following code below will not compile:
RECEIVE MyMessage FROM ANY THREAD
RECEIVE MyMessage FROM ANY THREAD BEFORE TIME 1
It must be changed to:
RECEIVE MyMessage FROM ANY THREAD NO WAIT
RECEIVE MyMessage FROM ANY THREAD BEFORE TIME 0
LINKAGE SECTION.
01 GROUP-ITEM.
   03 ITEM-1 PIC XX.
   03 ITEM-2 PIC X(10).
PROCEDURE DIVISION USING ITEM-2.
The following is supported instead:
LINKAGE SECTION.
01 GROUP-ITEM.
   03 ITEM-1 PIC XX.
   03 ITEM-2 PIC X(10).
PROCEDURE DIVISION USING GROUP-ITEM.
For time and date formatting conforming to American conventions, use the following properties:
DISPLAY-FORMAT "MM/dd/yyyy"
DISPLAY-FORMAT "EEEE, MMMM dd, yyyy"
If your code does not currently specify any of the above styles and does not specify the DISPLAY-FORMAT property, use DISPLAY-FORMAT "M/d/yyyy". If no display format styles or properties are specified, then DISPLAY-FORMAT "dd/MM/yyyy"is the default.
isCOBOL Reserved Words cannot be used as variable or constant names by default. In order to use them as variable or constant names, they must be treated as common words by using -rc compiler option.
iscobol.file.status=com.iscobol.io.FileStatus85
           perform thread show-time handle t1.
           STOP THREAD t1.
           perform thread show-time handle t1.
           perform until 1 = 2
             accept w-time from time
             display w-time line 2 pos 70
01 my-group.
   05 my-item USAGE HANDLE.
to
01 my-group.
   05 my-item PIC 9(9COMP-5 SYNC.
o
o
DIVIDE ITEM1 BY ITEM2 REMAINDER REM.
In order to be compiled by isCOBOL, it must be changed to:
DIVIDE ITEM1 BY ITEM2 GIVING FOO REMAINDER REM.
Or you can use the REM intrinsic function:
MOVE FUNCTION REM(ITEM1, ITEM2) TO REM.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left