MOVE tool/utility



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

MOVE tool/utility

Postby renukav » Tue Jan 19, 2010 9:19 pm

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.
renukav
 
Posts: 1
Joined: Tue Jan 19, 2010 9:05 pm
Has thanked: 0 time
Been thanked: 0 time

Re: MOVE tool/utility

 

Re: MOVE tool/utility

Postby dick scherrer » Wed Jan 20, 2010 12:28 am

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").
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post