A problem with Micro-focus Cobol (HP 9000/840) 
Author Message
 A problem with Micro-focus Cobol (HP 9000/840)

[I sometimes post some questions in alt.cobol, but I seldom receive
an answer. I suppose it is a problem of restricted distribution
of the alt.* groups, so this time I also try with comp.lang.misc]

I've had the following problem with the micro-focus compiler for
Cobol 85. It doesnt recognize sentences like :

        if foo = bar(1:N) then .... else ....

apparently because of the substring-ing (and dancing ?) of bar (an
honest pic X(30) variable).

Is it a problem in the Micro-focus implementation or a violation
of a too restrictive (IMHO) rule in the COBOL 85 norms ?

M Billaud

--

Departement d'Informatique     :  phone W: 56.84.57.92  // 56.84.69.22
IUT "A", Universite Bordeaux I :  
33405 Talence  (FRANCE)        :  "Les cochons aussi aiment les truffes"



Mon, 18 Dec 1995 01:34:29 GMT  
 A problem with Micro-focus Cobol (HP 9000/840)

Quote:

> [I sometimes post some questions in alt.cobol, but I seldom receive
> an answer. I suppose it is a problem of restricted distribution
> of the alt.* groups, so this time I also try with comp.lang.misc]

> I've had the following problem with the micro-focus compiler for
> Cobol 85. It doesnt recognize sentences like :

>    if foo = bar(1:N) then .... else ....

> apparently because of the substring-ing (and dancing ?) of bar (an
> honest pic X(30) variable).

> Is it a problem in the Micro-focus implementation or a violation
> of a too restrictive (IMHO) rule in the COBOL 85 norms ?

I don't know of a restriction in ANSI-85, but then I don't know COBOL that
well.  Do you have a small demo. program you could post ?

Thanks,
James.
--
 "Yield to temptation --             |

                                     |
        - Lazarus Long               |              James Fidell



Mon, 18 Dec 1995 21:23:53 GMT  
 A problem with Micro-focus Cobol (HP 9000/840)
Until recently (according to the dox) Micro Focus COBOL defaulted to
OSVS compliance. This dialect disallows conditional statements on
reference modified items (e.g. bar(1:N). Recompile the program with
compiler directive -C NOOSVS. If you require some of the functionality
that was provided previously use -C "NOOSVS VSC2".
I would suggest placing these options in your default cobopt file
--
        Mike Kenny                             Shared Financial Systems
        Phone: 214-458-3989                    Dallas, Tx
        ------>>> everybody is entitled to their own opinions <<<------
        ------>>> these are mine and not those of my employer <<<------
--
        Mike Kenny                             Shared Financial Systems
        Phone: 214-458-3989                    Dallas, Tx
        ------>>> everybody is entitled to their own opinions <<<------
        ------>>> these are mine and not those of my employer <<<------


Mon, 18 Dec 1995 22:45:17 GMT  
 A problem with Micro-focus Cobol (HP 9000/840)

Quote:

>[I sometimes post some questions in alt.cobol, but I seldom receive
>an answer. I suppose it is a problem of restricted distribution
>of the alt.* groups, so this time I also try with comp.lang.misc]

>I've had the following problem with the micro-focus compiler for
>Cobol 85. It doesnt recognize sentences like :

>    if foo = bar(1:N) then .... else ....

>apparently because of the substring-ing (and dancing ?) of bar (an
>honest pic X(30) variable).

>Is it a problem in the Micro-focus implementation or a violation
>of a too restrictive (IMHO) rule in the COBOL 85 norms ?

>M Billaud

>--

>Departement d'Informatique     :  phone W: 56.84.57.92  // 56.84.69.22
>IUT "A", Universite Bordeaux I :  
>33405 Talence  (FRANCE)        :  "Les cochons aussi aiment les truffes"

      $set ans85
       01  stuff.
           03  n               pic 99 comp-5.
           03  foo             pic x(10).   *> didn't say what foo was
           03  bar             pic x(30).

       procedure division.

           move 10 to n
           if foo = bar(1:n)
               display "Equal"
             else
               display "not Equal"
           end-if

           goback.

Worked for me. I'm using v3.1 Make sure you have it set to ansi-85 (either
by a set statement or I think it can be set in cobol.dir and of course
if your using WorkBench it can be changed on the check menu.) Drop
me a line if you have any more probs.

    Chad Brockman

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Chad A.Brockman           -                                 -
- VertiComp, Inc.           -  I'm just an OS/2 junkie!!      -  



Mon, 18 Dec 1995 23:45:46 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Forth on the HP 9000/840

2. Problems with Alsys Ada + HP 9000/800 + HP-UX 7.0

3. cobol on HP 9000 (UNIX)

4. HP Server VS. HP 9000 Series

5. Oberon-System for HP-9000 (HP-UX 8.07)

6. CProlog for a HP 9000 running HP-UX

7. Tk4.b1 on a HP 9000/380, hp-ux 9.03

8. Using of pointers in HP Micro-Focus COBOL

9. HP Micro Focus COBOL/UX

10. Micro*Focus COBOL on HP 10.10

11. Micro Focus COBOL under HP-UX

12. Problem compiling tree-3.2.6 on HP-UX 9.0.1 9000/720

 

 
Powered by phpBB® Forum Software