From: Pam & H. N. <phn...@ve...> - 2006-12-31 20:42:38
|
Hi David, I am accepting data via a 14 character variable "INPUT-NUMBER PIC X(14) JUST RIGHT". This same process using tc version .58 apparently does not initialize the variable with spaces as the previous data is not overwritten. As my customer got use to the behavior of the earlier version, he wants it to work again. It doesn't bother me (or my customer) to have a unique compiler. Is there any way to modify the compiler so it doesn't initialize a PIC X variable with spaces. Thanks Harold > Subject: > [Tiny-cobol-users] changes in accept using ncurses/screen section. > From: > Pam & Harold Norris <phn...@ve...> > Date: > Sat, 30 Dec 2006 19:51:08 -0500 > To: > tin...@li... > > To: > tin...@li... > > > Hi all, > > I have been a firm believer in tc for years and it hasn't failed me > yet. I am, however, having a time with changes which went into effect > between versions .58 and .62/.63 > > I am accepting data on the screen using ACCEPT ON EXCEPTION. > According to what I saw in screenio.c, this means that the data is > being accepted using the SCREEN mode. What the problem is, is: if > data is displayed on the screen at line 1 position 5 and I accept a 14 > character variable at line 1 position 1, the data located at position > is instantly erased. Using the same accept commands with tc version > .58, the existing data stays put until you input NEWdata at its location. > > Is there any way to fix this, either by modifying tc or my program?? > > Thanks for the help > > Harold Norris > > > If I understand your query correctly, the problem is that the 14 > variable at line 1 position 1 gets initialized with blanks, assuming > it is an alphanumeric identifier. > > First of all are you using 'ACCEPT screen-n ...' or 'ACCEPT > identifier-n AT LINE/POS ...' ? > > Second is this expected behavior as found with other compilers, or > defined on some COBOL standard ? > > And finally, I don't think the behavior you are suggesting would work > for numeric variables, as these should display from RIGHT to LEFT. > It is not what TC currently does, but it is the behavior on I*M > mainframes. > > In any case using group variables will not work, as the variable gets > initialized with blanks. > And I don't see an option that disables the initialization. > Maybe the variable should not get initialized with blanks (zeros), but > let the user do so, or not (risky). > > > > |