× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Why does the DELETE not work?
  • From: "Robert E. Burger" <rburger@xxxxxxxx>
  • Date: Wed, 26 Jan 2000 19:55:42 -0600

Peter,

After looking at your comment about the code I ommited for brevity, and 
implmenting the error checking Finucci suggested, and
scratching my head about why I was getting a 23 file status, I added DISPLAYS 
of the key fields immediately before the delete,
and damn if I didn't have to smack myself in the head.  THey of course did not 
contain the value they contained when the file
was read!  The DELETE was happening, but since the key fields were (unrealized 
by me) being changed in the part I omitted for
brevity (that I swore when I did it couldn't POSSIBLY be the problem!).  The 
code that was messing me up is the following
INSPECT...REPLACING statements.  I had copied this code from one of the vendors 
programs and didn't even really look at it.  I
do wonder why the INSPECT...REPLACING statements are even necessary.  Would'nt 
STRING...DELIMITED BY "xx" where xx is actually
spaces work as well or does COBOL do something with spaces I don't expect.

             INSPECT CS-LNAME-LABL REPLACING ALL SPACES BY "ª".
             INSPECT CS-FNAME-LABL REPLACING ALL SPACES BY "ª".
             INSPECT CS-MNAME-LABL REPLACING ALL SPACES BY "ª".
             STRING CS-LNAME-LABL DELIMITED BY "ªª", ", ",
                    CS-FNAME-LABL DELIMITED BY "ªª", " ",
                    CS-MNAME-LABL DELIMITED BY "ªª"
                    INTO CA-CLIENT-TMP.
             INSPECT CA-CLIENT-TMP REPLACING ALL "ª" BY SPACES.
             MOVE CA-CLIENT-TMP TO DEF-RPT.

Thanks for all of the quick comments guys,

Robert

----- Original Message -----
From: Peter Lunde <telsci@interlog.com>
To: <COBOL400-L@midrange.com>
Sent: Wednesday, January 26, 2000 8:24 AM
Subject: Re: Why does the DELETE not work?


> Well, have you used debug to ensure that the DELETE statement is actually
> executed?
>
> I notice that you do not use the END-IF, so it is possible that the code you
> left out for brevity has an IF statement that is missing a period.
>
> Peter Lunde
> Please check out my web site at www.telsci.bizland.com
>
> +---
> | This is the COBOL/400 Mailing List!
> | To submit a new message, send your mail to COBOL400-L@midrange.com.
> | To subscribe to this list send email to COBOL400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---END
>

+---
| This is the COBOL/400 Mailing List!
| To submit a new message, send your mail to COBOL400-L@midrange.com.
| To subscribe to this list send email to COBOL400-L-SUB@midrange.com.
| To unsubscribe from this list send email to COBOL400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---END



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.