Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
FALLAI-Denis opened this issue Apr 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@FALLAI-Denis
Copy link

FALLAI-Denis commented Apr 15, 2024

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
@phaumer phaumer added the enhancement New feature or request label Apr 15, 2024
@FALLAI-Denis
Copy link
Author

FALLAI-Denis commented Aug 19, 2024

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! 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants