Using COBCPY, COPYEXT and simple displays for cobol-mb (Microbase) conversion to Visual COBOL.
How to convert cobol-mb (MicroBase) showing accessing copy books and using display at 01 01 syntax.
Put the 01 01 into a variable.
01 display-cursor. 03 dc-line pic 99. 03 dc-column pic 99.
Then just use this in the procedure division.
move "0101" to display-prompt-line display "my text" at display-cursor
Here is a example of the above display method and others combined with the usage of copy books showing COBCPY and COPYEXT
This has been tested with Oracle unix using bash.
For all programs and scripts needed for this example,
click the link and save as <2679886copy-001.tar>
Copy this onto a test area on your unix machine and untar it, see below. Change setup.sh to point at your cobol environment cobsetenv
This will compile and run the same program three times.
This program will use different copy books from different locations each time it is compiled and run, changing the program behaviour.
Basically produces 6, 12 and 16 times table and prompt for user input on the last run of the test script.
testbuildandrun.sh. uses copy book numberofiterations that defines the times table to produce and the field width using the copy book displaystring.
It sets COBCPY to point to the copy book locations.
Sets a compiler directive to define the copy book extensions COPYEXT.
simply by setting this to NO or YES.
Sets which copy book acceptanswer to use see testbuildandrun.sh below.
COPYEXT is a directive not a environment variable.