Posted: Tue Jul 20, 2010 2:14 am Post subject: delete a record in ps file.
i have some records in a ps file and the same record is in ksds file. now i have to do operations in ksds file. like adding of record or deleting of record. now the same update i have to do in the ps file. adding i think will be done in the end of the ps file. but in the case of deleting we cant delete a record from ps file. so what we should do in this case.
this all i have to do with cobol.
why do you decide to add a ksds record - add a ps record
why do you decide to delete a ksds record - delete a ps record
why do you decide to update (change a record)?
as far as the ps file logic is concerned, you would perform a father-son update on the ps.
input is the father, an output file would be the son.
you would first sort the ps in ksds key sequence.
then do a 2 file match (ps record and ksds record).
to keep a ps record, you would write to the son.
to delete a ps record, you would not write the previously read record.
to add to ps, you would have a second area were you would construct the new record and write that record before you would write the previously read record from the father.
if you want more help, you need to provide more information.
there are some sample cobol programs here _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum