Search for missing Semi-colon in Free format

0 pts.
Tags:
RPGLE
Is there a way in either SEU, Code400 or the LPEX editor to do a search by exclusion? I'm looking for an easy way to identify lines of code, in Free format, that are missing the semi-colon at the end.
ASKED: March 6, 2006  10:45 AM
UPDATED: December 4, 2009  2:58 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can override the source file to the source file and member and then use the following SQL statement:

SELECT SRCSEQ, SRCDTA FROM qrpglesrc WHERE srcdta not like ‘%;%’

This will show all lines in the source that do NOT have a semicolon in them. Including comments and continued lines. You could exclude these as well but you might miss the line you are looking for.

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    Free-form source lines can contain just about anything. If a previous line continues a literal, it can be 'literally' anything. Therefore, actual syntactic processing is necessary if you want certainty. Unfortunately, there is no point in running a test for missing semi-colons if the syntax is correct -- there wouldn't be any missing semi-colons. So, it's kind of a Catch-22. You want code as simple as possible, but it has to be smart enough to do what the compiler cannot do. You want a program to tell you "A semi-colon should be here." If that was easy, there wouldn't be a requirement to have semi-colons. The compiler could simply assume the existence. Tom
    125,585 pointsBadges:
    report
  • WoodEngineer
    If you have a chance, try WDSc / RDi when developing your code. It warns immediately of missing semi-colons. That is immediately after pressing the Enter on a line of code. Its really cool.
    6,045 pointsBadges:
    report
  • Teandy
    What version of the O/S are you on. I am at V5R4 and when I code in SEU and am missing a semi-colon, the editor highlights the line below and throws an error. Are you trying to come up with something that will find this in some sort of batch process?
    5,860 pointsBadges:
    report
  • Cwc
    I doubt the original poster is still looking for answers to this, as this was a three year old question, along with many others that have been getting resurrected.
    4,290 pointsBadges:
    report
  • TomLiotta
    this was a three year old question IMO -- This is also intended to be a Wiki site, described as the "Answer Wiki". As such, whenever a new perspective is found, the articles should be updated. Discussion shouldn't end just because those who see an item this month can't think of appropriate responses. Someone will have a similar problem three years later and may go searching. Someone else might have had a brilliant idea just last week. Keeping issues in mind helps spur comments that may help everybody. As important as it might be to provide an appropriate answer as soon as the question is asked, it's probably more important to put some effort into ensuring that correctness, completeness and relevance are part of every item regardless of age. The discussions are not just for the OP. They're for everyone who ever visits the page any time in the future. Again, that's only "IMO". I'd like to increase the value of every i-related site I can think of. Tom
    125,585 pointsBadges:
    report
  • Labnuke99
    TomLiotta - I agree with you. This should be a "living" site with updates and historical references. This is what learning and technical support is all about. Learn from other people's mistakes and use the knowledge gained to improve support.
    32,960 pointsBadges:
    report
  • ITKE
    I think the goal is similar to what Tom and Troy mention. Although the original poster may be long gone. We get a lot of people to old questions looking for answers to a problem that is new to them so adding "value" to old questions is a good thing especially if someone is searching for a solution for the first time. Thanks Sean Community Leader
    54,910 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following