-
Notifications
You must be signed in to change notification settings - Fork 593
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
Updating the reserved words for COBOL filedef #2021
Open
DansLeRuSH
wants to merge
3
commits into
geany:master
Choose a base branch
from
DansLeRuSH:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What is that?
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.
Hi,
I started with cobol.vim by Tim Pope but main of the adds were by knowledge, use and experience.
Trust me, I didn't find a proper COBOL definition since a long time but every word I add is verified.
For exemple, RENAMES you could find this > http://www.techtricky.com/cobol-renames-clause-with-examples/ or by IBM > https://www.ibm.com/support/knowledgecenter/SSAE4W_9.1.0/com.ibm.etools.iseries.langref.doc/evfeb4ls37.htm
For DECLARATIVES (by IBM)> https://www.ibm.com/support/knowledgecenter/SSPSQF_9.0.0/com.ibm.etools.iseries.langref.doc/c0925395314.htm
Above it is for the declaration of variables in characters or numeric. The 'x' ones are for some characters declarations and 'z' ones for numbers. I know that these types of statements may seem strange but I have not found other ways to translate them and here all cases are covered
For example you could have
05 WS-EXCEEDS-PTS-P PIC ZZZZZZZZ9.99 VALUE ZEROS.
Or
05 W-SIT-ISC-IMS-SSID PIC XXXX.
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.
aren't the zzzzzzzzzzzzzzzz things formatting, not keywords?
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.
It's PIC clause, it's slightly different ;')
PS : For COMPUTATIONAL (still by IBM) > https://www.ibm.com/support/knowledgecenter/fr/SSKPEG_9.5.0/com.ibm.pdp.pac.doc/topics/rsegment_ce_fillerdef.html
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 link points to something about an unintelligible language (Cobol) in an unintelligible language (French) so its no help.
PIC effectively is the record format, but however you want to look at it, the point is its not a keyword.
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.
My bad, I think I put an english link but I wrongly connect with my account before to copy, here the good one > https://www.ibm.com/support/knowledgecenter/en/SSKPEG_9.5.0/com.ibm.pdp.pac.doc/topics/rsegment_ce_fillerdef.html
Yes certainly, it's just more readable like this but you are master on that
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.
Do I have to erase them from filedef ?
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.
My point is that your version does not have
RENAMES
, which I found odd. It's the same with the other ones I listed in the same bunch: they appear in the three sources I found, but not in your list.I've seen
COMPUTATIONAL
up to 6, but your link lists 7 and 9, so OK.I don't have a strong opinion as I don't know COBOL, but I'd rather separate this. Maybe put it in
extended_keywords
so it's at least in a different list?BTW, how did you split secondary and primary? Just curious.
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.
It's true. I mainly add the reserved words I see often and those of the Tim Pope's list as I said. If you're OK I'll have a look within a few days and let you know.
OK I'll also test it and let you know. Agree ?
I simply tried to get as close as possible to what you could find on the IBM editor and made some adaptations for more readability
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.
Sure, sounds great :)