Page 1 of 1

MOVE tool/utility

PostPosted: Tue Jan 19, 2010 9:19 pm
by renukav
Hi to all the experts in this forum,

I want to write/create a program/tool that, :idea:
1. will check all the MOVE statements in a COBOL program
2. calculate the length of 'from' variables - length a
3. calculate the length of 'to' variable - length b (assuming for now that there is only one variable after TO keyword)
4. compare the lengths a and b and check if it matches.

EG: say there is a statement MOVE A B C D to E. I want to check and make sure the length of A+B+C+D is equal to E.
I want to make this tool because I see that sometimes we make mistakes in MOVE statements where the FROM variable is larger than the TO variable leading to truncation that may go unnoticed sometimes.

Any suggestions on which language will be easier to do this? and what commands can help with Steps 1,2 & 3.
I am familiar with cobol,eazytrieve and little bit of Rexx.

Thanks.

Re: MOVE tool/utility

PostPosted: Wed Jan 20, 2010 12:28 am
by dick scherrer
Hello,

say there is a statement MOVE A B C D to E.
Please post where this is documented in an IBM COBOL manual. . .

because I see that sometimes we make mistakes in MOVE statements where the FROM variable is larger than the TO variable leading to truncation
And often this is no mistake, but is intended. . .

What you believe you want to do is not a task for someone with limited experience. . .

It is also not a task that any management i've worked with would be willing to pay for (which they would be doing if you do this on "work-time").