[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnubol: STD - What do you think *should* happen



In a message dated 1/29/00 11:04:10 AM EST, wmklein@ix.netcom.com writes:

<< 
 01 GROUP1.
      05 ALPHA-EDIT   PIC X/X.
 01 ELEM1                  PIC XX.
      ...
 MOVE "ABC" TO GROUP1
 MOVE ALPHA-EDIT TO ELEM1
 
 
    ****
 
  The question is what the 2nd move "should" do.  I can think of (at least) 3
 possibilities:
  >>


Actually, since numeric edited fields _would_ de-edit, I would tend to assume 
that a compiler might generate code that _would_ de-edit the alphanumeric 
edited fields for us.  So if the first move of 'ABC' to the group level 
munged the value to 'ABC' (and not 'A/?'), then the hoped for de-edit would 
shuttle 'AC' to the result field.

BUt I don't know what the standard says 'should' happen. Programs I have seen 
that are involved with de-editing are either dealing with in house data, that 
is well behaved, or dealing with data from outside and no one believes the 
picture clauses anyway!  

In practice junior programmers are a little snowed by de-editing, and 
surprisingly many DBAs do not know COBOL! Data definitions are frequently 
brutish; using redefinitions or lower level data items to do the work. There 
is not a strong tendency towards interchange that involves de-editing. So I 
think there is not a general practice, nor a general expectation for the 
scenario you posit. Instead there is a general avoidance of it.

So if you want to know what people think _should_ happen, you will probably 
find marks spread across the map, and only some of that will be from actual 
compiler interaction experience.  If you want to know what _should_ happen in 
a rational sense (which I don't think you asked), then consistency is what 
_should_ result.

De-editing should be consistent. A student who learns a few lessons about 
de-editing should be able to generalize her knowledge, no matter which part 
of the subject she studies first. COBOL should have consistent behavior 
across its facilities.

But off in the compilers, over there in reality, shoulda, coulda, and woulda, 
can be many a spendid thing indeed.

So the counter-point would be, assuming elementary moves: when do you not 
want de-editing to happen? And why? Can you state the reasons that you expect 
universal agreement on that?

Best Wishes,
Bob Rayhawk
RKRayhawk@aol.com

--
This message was sent through the gnu-cobol mailing list.  To remove yourself
from this mailing list, send a message to majordomo@lusars.net with the
words "unsubscribe gnu-cobol" in the message body.  For more information on
the GNU COBOL project, send mail to gnu-cobol-owner@lusars.net.