Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

RE: COBCH0837S Procedural code not allowed here

$
0
0

Chris,

Here is the little class in question.

class-id consoleApplication24.Prog2b public.

      working-storage section.

      01  myobj1 type consoleApplication24.Prog2b

                 value new type consoleApplication24.Prog2b public.

      01  myarg type short.

      procedure division.

      invoke myobj1::getid returning myarg.       <<----gets message COBCH0837S

      display "myid is - " & myarg.

      goback.

      method-id getid public.

          local-storage section.

          linkage section.

          01  myid type short.

         procedure division returning myid.

         compute  myid = function random().

         goback.

         end method.

      end class.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>