-
Notifications
You must be signed in to change notification settings - Fork 62
Fix cics inquire #2604
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
Fix cics inquire #2604
Conversation
Could you please
|
Let me know if the latest commit does not address your suggestion. |
server/engine/src/test/java/org/eclipse/lsp/cobol/usecases/TestCicsInquireUrimap.java
Show resolved
Hide resolved
compilerOpts | ||
: (XOPTS LPARENCHAR compilerXOptsOption (commaClause? compilerXOptsOption)* RPARENCHAR) | cicsOptions; | ||
|
||
cicsOptions: CICS LPARENCHAR NONNUMERICLITERAL RPARENCHAR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not accept the simple (with the CBL prefix)
CBL CICS(SP)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the compiler I get when i omit quotes as you suggest:
0Invocation parameters:
OPTFILE
0PROCESS(CBL) statements:
CBL CICS(SP) 0032120
IGYOS4066-E The "CICS" suboptions string was invalid. The suboptions string was discarded.
0Options from SYSOPTF:
CICS 00320900```
server/engine/src/main/java/org/eclipse/lsp/cobol/implicitDialects/cics/CICSVisitor.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
checkBrowseMutuallyExclusive(atomserviceContext); | ||
if (!atomserviceContext.START().isEmpty() || !atomserviceContext.END().isEmpty()) { | ||
checkBrowsingInvalidOptions(atomserviceContext, CICSParser.ATOMSERVICE); | ||
checkBrowsingHasNotParameter(atomserviceContext, CICSParser.ATOMSERVICE); | ||
} else checkStatementHasParameter(atomserviceContext, CICSParser.ATOMSERVICE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to handle this check via a common code path? Maybe another map that contains the details needed to execute the check?
Only the CICSParser.ATOMSERVICE
part seems variable - maybe another map ruleindex->token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be a great redundancy consolidation. However since it is dependent on the logic above evaluating to false we would still need to call this check in every case like this in the switch statement. Unless you can think of a better high level implementation that can handle the logic above i.e.
if(not START or END) {..}
else checkHasParameter
in a generic way that can be called agnostic of the context then I am all ears. But this is tricky since these commands have different requirements within if(not START or END) {..}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The checkBrowseMutuallyExclusive
almost implements the check.
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckUtility.java
Outdated
Show resolved
Hide resolved
server/engine/src/test/java/org/eclipse/lsp/cobol/usecases/common/CICSTestUtils.java
Show resolved
Hide resolved
server/engine/src/test/java/org/eclipse/lsp/cobol/usecases/TestCICSInquireSP.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
87ab1f3
to
73dee01
Compare
...va/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSInquireSPOptionsCheckUtility.java
Outdated
Show resolved
Hide resolved
...va/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSInquireSPOptionsCheckUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
...va/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSInquireSPOptionsCheckUtility.java
Show resolved
Hide resolved
...in/java/org/eclipse/lsp/cobol/implicitDialects/cics/utility/CICSOptionsCheckBaseUtility.java
Outdated
Show resolved
Hide resolved
update: added parser and lexer deps for inquire association sp update: added association list update: added parser rule for inquire atom service update: added INQUIRE sp parser rules for autinstmodel autoinstall and brfacility update: add cics sp inquire commands commit: sorted and merged latest state of CICS correct tokens chore: comment out test for code change in progress update: language keywords update: autocomplete keywords for inquire sp update: populated missing Language.txt words from CICS lexer and enforced order update lexer and parser keywords update: add parser options and rules for inquire fix: lexer tokens fix: lexer fix: lexer and autocomplete list update: add missing lexer token and further cleanup update: add new inquire system commands to parser update: add cfdtpool and db2conn inquire cics parser rules update: add cics system commands db2tran and db2entry update: added in inquire cics sp statements update: add sp cics doctemplate and dsname parser rules update: add cics sp inquire parser rules for dumpds and enq update: add inquire sp epadapter and enqmodel parser rules updaaet: adin in inquire cics sp parser rules update: add inquire cics sp parser rules update: add more cics sp parser rules and grammar
…r rules update: finish new additions to parser and lexer for cics inquire sp chore: fix incorrect parser rule syntax update: implement inquire sp options check utility start update: established route for SP options checking chore: fix broken unit test and checkstyle errors update: added transaction inquire parser validation and started refactor of sp parser rules for main keyword first update: added inquire tests and update parser rules for mandatory positional first options update: started parser validation for cics inquire sp update: start on parser implementation for BROWSE functionality update: added in more browse capability for inquire sp update: changed compiler options for translator selection from xopts to cics update: change cics compiler options to match documentation string type update: add logic to enforce option parens update: change compiler options area to enforce literal values update: inquire cics sp for browse functionality update: added in validation for browsing rules update: improve parser rule validation for browse update: add in browse checks with test update: add in more browse statement parser validation update: variable keywords update: added parser rule validations for cics inquire sp update: added parser rule validation for exitprogram update: validate inquire featurekey update: refactored check mutually exclusive for browsing and added validation for AT browsing update: merge lexer words from rebase fix: changes from merge conflicts chore: repair old unit test fix: remove vs code settings change chore: remove dev comments fix: invalid option check and add test chore: fix formatting and copyright chore: revert modified copyright chore: clean up formatting for cleaner PR chore: revert more formatting changes chore: revert formatting changes chore: revert formatting changes
updating changes from rebase update: feedback from pr chore: update kct chore: fix formatting
fbed8b2
to
eb35dce
Compare
Special Notes
Compiler options - CICS translator option designation
Need to have this specified for use with INQUIRE system programming commands. This can be done by adding this line directly above the
IDENTIFICATION DIVISION.
of your code:CBL CICS ("SP")
Browsing
About half of the INQUIRE system programming commands enable the CICS browsing function. Where you can iterate over the resources using
START
END
NEXT
and sometimesAT
keywords. More details on this are explained here. However this documentation does not fully cover the intricacies of how the compiler enforces this behavior. Some of the unit tests identify the edge cases.How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: