MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2006

Re: prob in deleting records using a subfile from a pf.



fixed

Subfiles need to be chained. As part of the subfile record I would suggest a hidden field with the PF keys, unless the keys are displayed on the subfile. The KLIST for the PF will need to be the fields from subfile. You can do a simple DOW not %eof loop to read your subfile and delete your PF record. Chain with an index, set to 1 before the loop, and increment it as you go.

Another choice, if the PF file is not keyed, is to use the RRN and save the RRN as a hidden field in the subfile, and chain with the RRN number to the PF. This is particularly handy if you are processing a file and do not want record locks,



sunny singh wrote:
hi all..
              i have a   prob  regarding subfiles..
  i have a load all subfile displaying  for example four selected records by 
the user.
  now i want all the records to be deleted when the user presses certain key 
say f11.
  i am having a prob   when i tried to do this by reading the subfile record 
format from the top and then chaining to the physical file in a loop..can any 
one plz explain the proceedure for just idea of how this could be done
  example...
  date                                       xyz bank                           
                 time
number name dept salary 101 john comp 12344
  102                                     franky                            mba 
                  38474
  103                                     rocky                             
comp                 123454
  104                                     nick                               
b.tech                 345676
how can we delete above all four records that has been displayed on the above screen.niumber beeing key field.
  why cant i perform readp or reads operation on this subfile.
  thanks in advance...
  please do reply.
  have a nice day........
                
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.






Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact