HP3000-L Archives

October 1996, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Wed, 16 Oct 1996 18:27:19 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Hi Everyone,

In COBOL a problem occurs in CM only, when a redefine clause in working storage allows you to
move data where the from data item and to data item actually are using the same area of working
storage. The effect is the target field in COBOL is being initialized.

Scenario:
0. Running a program in compatibility mode on the s/969 MPE/iX 5.0
1. The user entered positive numeric data into a VPLUS field.
2. A value of zero is actually DBPUT into the database.
3. The VPLUS-field is defined in COBOL as "PIC X(9)".
4. The redefined DB-field is defined in COBOL as "DB-field REDEFINES VPLUS-field PIC 9(9)".
5. A MOVE statement "MOVE VPLUS-field TO DB-field."

I have found one program that does this (I DON'T KNOW WHY A PROGRAMMER WOULD EVER DO THIS!)
Believe it or not, running the same program on the series 70 this problem doesn't exist. However
in compatibility mode on the series 969 the problem does exist. BUT WAIT! When I compile this
program in native mode on the 969 the problem goes away. It's true, native mode is the fix!

Here's the real problem. We have decided to run every thing in compatibility mode at first. Now
that the old box is gone, I will start recompiling to native mode. What really worries me is how
many other programs do I have running in compatibility mode that contain move statements that
address storage area in the same redundant way. The one I found only involved one user, and a
handful of entries had to be re-added, but what if I have a program running right now that is
trashing 1000's of records with zero values? I would hate to find out about something like this
at month-end  :-0

Finally the question:
Has anybody on the list experienced this problem before?
If so, Has a program been written to search COBOL source files for this condition?

I have 1000's of in-house written programs, I may need to write a program to find suspected cobol
programs that do this.

Maybe Igor Yasno, of Diamond Optimum Systems has alreay done something like this.


Thanks in advance,

--
_______________________________________________
Michael Anderson
HP3000 Systems Programmer/Analyst
_______________________________________________

Current: 8 years@ TIW Corporation Houston Texas
Prior: 3 years@ MICOM Systems Simi Valey, Calif.
Email@work mailto:[log in to unmask]
Email@home mailto:[log in to unmask]

ATOM RSS1 RSS2