× 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.



Jen,

if you have the key fields for a chain, you can use them for a delete
op code too

don't know how in free form, but the way to do it in fixed is:

             dou      not %found(filename)
keylist   delete   filename
             enddo

for imbedded sql,

c/exec sql                                              
c+              
c+  delete                   
c+     from filename         
c+    where key1 = :mykey1            
c+        and key2 = :mykey2
c+        and key3 = :mykey3
c+              
c/end-exec  

where mykey* are program described fields

hth

On 9/13/05, Jen Raihala <jen_raihala@xxxxxxxxx> wrote:
> Good morning from a slightly damp Midwest!
> 
> I have a question regarding multiple deletes in a RPG
> /Free program I am writing. I have a status field
> that, at anytime during the parsing of an XML "sheet",
> can be set to 'F' to fail a document (through errors
> like letters where there are supposed to be numbers or
> blanks for required information).
> 
> The program ultimately updates/writes to 7 different
> db files, BUT it writes as it goes (I chose to reuse
> certain fields rather than trying to guess how many
> unique fields I would need since using arrays was
> poo-pooed by the team leads). So if file 4 fails, then
> there are fragments in 1,2 and 3 that I need to get
> rid of. I think an SQL delete would be faster to write
> than a set of repeated CHAIN deletes.
> 
> How would I pass in the parameters of document number,
> date and year? I honestly havent messed much with SQL
> since school (and that was only on a faked up Oracle
> db for Oracle class).
> 
> Thanks for any advice in advance!
> JenR
> --
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
> 
>


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.