Rexx Tool To Check Coding Standards In Java
Hello everyone, I am quite new to REXX and I am assigned to develop a rexx tool which should check if the programmer has followed cobol standards. In the process I need to check the following for which I need some help and your valuable inputs a)A Para must have a period only at the end of it, I need to find a way to identify if it's not followed b)All the paragraphs must have an exit Para with an exit statement C)usage of negative conditional statements need to be identified. Looking forward to your inputs or ideas. Posts: 6 Joined: Mon May 09, 2016 9:00 pm Has thanked: 0 time Been thanked: 0 time. Read the program using EXECIO and save to a stem variable. Make multiple passes through all of the program statements. The first pass is to remove any comments.
Rexx Tool To Check Coding Standards. Java Using REXX and DB2 Developing Applications Using Only SQL Summary. SAY ' REXX TOOL TO CHECK JCL SYNTAX & CODING. There is the free VALJCL tool and i saw the link for the REXX code on the IBM website but i guess the location. SAY ' REXX TOOL TO CHECK JCL SYNTAX & CODING STANDARD'. Rexx Tool To Check Coding Standards Toolstation. Java, or COBOL. Rexx scripts can issue DB2 commands through a direct interface to DB2’s command line processor.
That is, replace with blanks. I have had problems with language keywords being in comments. Possibly also translate other statements to uppercase. Use a 'Do' loop to scan all program statements. 4 Examine each program statement. Use the POS built-in function to see if a particular keyword is in the current statement.
Then use PARSE to look for proper syntax. I am quite new to REXX and I am assigned to develop a rexx toolSigh. The rule of thumb I was taught in college classes is that writing a tool is 3 times as hard as writing an application program, and writing a compiler is 3 times as hard as writing a tool. This is assuming, of course, that the tool will be generic and usable by everyone in the applications development group at your site.
How much experience do you have in writing COBOL programs? And are you going to be checking for NEXT SENTENCE as well in your tool? Global moderator Posts: 3393 Joined: Sat Dec 19, 2009 8:32 pm Location: Dubuque, Iowa, USA Has thanked: time Been thanked: times. I always point out it is easier to use the listing - or even request the ADATA output from the compiler, although for your three tasks that is perhaps overkill. The negation is easy.
After proceeding with the listing following Pedro's scheme, the only negation possible is NOT and FALSE (for EVALUATE). For the exit-paragraph being present (assuming the programs don't also have multiple other paragraphs) you just match pairs of paragraph-names on the cross-reference. The cross-reference will note those that are used in a PERFORM so you can even check that the THRU exists from that. The easiest part is the full-stops/periods. Count them all, starting from the PROCEDURE DIVISION header.
That has one. Each paragraph-name has one. Then you should have one for each paragraph (so you know how many to expect). Any deviation from the expected total means more than one in a paragraph. You don't have to worry about a paragraph not having one, because that gives a compiler diagnostic anyway. Have to point out that not using negation and using THRU are both. But fairly common.
Tools To Check Coding Standards
Robert's point about the NEXT SENTENCE is worth following up on. If you only allow one full-stop/period per paragraph you definitely need to check no-one is using NEXT SENTENCE. Global moderator Posts: 3804 Joined: Tue Jan 25, 2011 12:02 am Has thanked: times Been thanked: times. Hi Billy, Thanks for taking the time out. 'The easiest part is the full-stops/periods. Count them all, starting from the PROCEDURE DIVISION header.
That has one. Each paragraph-name has one. Then you should have one for each paragraph (so you know how many to expect). Any deviation from the expected total means more than one in a paragraph. You don't have to worry about a paragraph not having one, because that gives a compiler diagnostic anyway.'
I need to identify the paragraph having multiple periods as well,Coz I am writing the discrepancies in a report and it would be better for me to write the para name there. Your's and Robert's point about NEXT SENTENCE is very valid,I will probably add it Posts: 6 Joined: Mon May 09, 2016 9:00 pm Has thanked: 0 time Been thanked: 0 time. Related topics Replies Views Last post. by » Mon Jan 21, 2008 9:06 pm 1 Replies 6151 Views Last post by Tue Jan 22, 2008 5:51 am.
by » Thu Oct 31, 2013 12:18 am 7 Replies 3408 Views Last post by Fri Nov 01, 2013 12:16 am. by » Mon Apr 23, 2012 10:14 am 4 Replies 2511 Views Last post by Wed Apr 25, 2012 2:36 pm.
Jim stengel grow. by » Thu Aug 25, 2011 9:27 am 6 Replies 2922 Views Last post by Thu Aug 25, 2011 5:25 pm., by » Tue Feb 17, 2009 10:28 pm 22 Replies 8265 Views Last post by Fri Sep 07, 2012 4:04 am.