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) - Allow use of "exotic" EXEC / END-EXEC block in source programs #439

Open
FALLAI-Denis opened this issue Sep 11, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@FALLAI-Denis
Copy link

FALLAI-Denis commented Sep 11, 2024

Description of the enhancement requested

Hi,

We use a product (IBM origin) that requires the use of EXEC / END-EXEC instructions blocks, other than SQL, SQLIMS or CICS, in the source code of programs (COBOL).
These EXEC / END-EXEC are translated to COBOL with a specific preprocessor.

When these programs are edited with IBM Z Open Editor, the (COBOL) Language Server triggers errors, which then invalidates many of ZOE features... 😢

We would like the (COBOL) Language Server to accept others EXEC / END-EXEC blocks than those currently provided (SQL, SQLIMS, CICS), and not trigger errors.
At the textmate grammar level, we should provide a specific scope name for these EXEC / END-EXEC blocks that we could overload with a proprietary "left" textmate grammar in a "language" extension developed by ourself.

Another solution would be to implement a before/after markup system in the form of standardized comments to tell the (COBOL) Language Server to ignore lines of source code that Language Server does'nt support:

  • *>BEGIN-LS-IGNORE
  • *>END-LS-IGNORE

Thanks.


Our specific use case, but enhancement should be generic:

image

image

image

image

image

@phaumer
Copy link
Member

phaumer commented Sep 16, 2024

Do you think this could be solved by our new preprocessor capability? You could use the Java or REXX samples we provide and adjust them to do this substitution?

https://ibm.github.io/zopeneditor-about/Docs/advanced_preprocessor.html

@phaumer phaumer added the enhancement New feature or request label Sep 16, 2024
@FALLAI-Denis
Copy link
Author

FALLAI-Denis commented Sep 21, 2024

Hi @phaumer,

In our use case, the preprocessor is a remote processing on mvs.
I don't think that using the preprocessor function meets our needs.
We want to be able to work on the COBOL source code before translating by the preprocessor, and not after this translating.

The same problem exists on programs edited with ZOE before translation:
image

The solution proposed by ZOE makes me think more of a "quick writing" type solution using a macro-language, than of a solution for extending the basic language (like COBOL Report Writer, or TypeCobol), or a embedded language solution (like Exec / End-Exec):

  • in the case of a macro-language system, we can forget the initial version carrying the macros, then use the output of the preprocessor to continue working on the code after translation,
  • in a system for extending the basic language, or support embeded languages, the goal is to work only on the source code before translation.

Note: about macro-language, see the cobolmac contribution for gnuCOBOL

Thanks.

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