IBM/zopeneditor-about

COBOL (first) - See informations carried by copybooks in the VS Code Outline view

Opened this issue · 1 comments

Description of the enhancement requested

The VS Code Outline view displays a representation of the structure of a program, with sorting options.
Regarding copybooks, this view only displays the reference to the copybooks, but no information carried by the copybooks.
However, the COBOL Language Server seems to know these informations because it displays them when hovering with the mouse.

We would like the Outline view to display certain information contained in the copybooks, at a minimum:

  • paragraph and section names
  • levels 01 in data descriptions

This in a “resolved” way:

  • with replacing actions applied
  • with application of conditional compilation applied

If this could also be done with copybook cascade calls it would be a big plus...


Illustration with our “smart” development framework:

  • the program perform a LIRE-DM routine (read DM resource)
  • the program include the AAAPACCE copybook for generalized management of external resources access, (file, Db2 table, etc.)
  • this copybook include other specialized copybooks depending on the context, and this on several levels of include
  • the code for the LIRE-DM routine (Section) is found in one of the included copybooks, AAA5LSRU, which itself perform the LIRE-DM-PHYSIQUE routine, in AAA5LSF0 copybook

Having all these Sections / Paragraphs displayed in the Outline view would help in understanding the code workflow of the program, and help to identify these Sections / Paragraphs.

In actual use case below, the name of the copybook appears on the right side of the screen hardcopies.

  • Program (application level):
    image
    image
    Informations in Outline view:
    image
  • Copybooks (framework level):
    Choice of logical acces, dependant of access type, (Read, Write...):
    image
    Choice of logical access, dependant of acces mode (Sequential, random, dynamic):
    image
    Choice of logical access, dependant of events driving:
    image
    Logical access, independant of resource organization:
    image
    Choice of physical access, dependant of resource oganization:
    image
    Physical access, dependant of resource organization:
    image

PS:

Also, and most importantly, show the copybooks inclusion hierarchy in the Outline view.

In the example above, the inclusion hierarchy is as follows:

  • program, contains the PERFORM LIRE-DM statement
  • copybook AAAPACCE, generalized processing of a resource access
  • copybook AAA5L000, processing of a resource access in reading
  • copybook AAA5LS00, processing of a resource access in sequential reading
  • copybook AAA5LSRU, logical processing of a resource access in sequential reading with calculations of break keys, declares the LIRE-DM section which contains the PERFORM LIRE-DM-PHYSIQUE statement
  • copybook AAA5LSF0, physical processing of a resource access in sequential reading for a sequential file, declares the LIRE-DM-PHYSIQUE section

Taking into account that these copybook inclusions can (are) under conditional compilation control! 😉