Actually the spl of your program
does not fork a new process. It runs it using UNIX's system command
which actually waits for the completion of it. So, the system command
will create another memory area which gets cleaned after the E/SQLC
process completes its process. Therefore YOU MUST COMMIT any transaction
within that process. But remember process X and Y share the same
memory area. So any commit commits the transaction of both the processes
So you should sepatrately commit the process Z
Please correct me if am wrong .
Jaminikant
} From informix-list-owner@rmy.emory.edu Fri Sep 27 17:39:39 1996
} From: pkjones0@aol.com (Pkjones0)
} Subject: Attaching process to existing transaction
} Date: 27 Sep 1996 12:27:40 -0400
} Reply-To: pkjones0@aol.com (Pkjones0)
} Organization: America Online, Inc. (1-800-827-6364)
} Sender: informix-list-owner@rmy.emory.edu
} To: informix-list@rmy.emory.edu
} X-Informix-List-To: jks@hclind.hclc-ggn.hcla.com
} X-Informix-List-Id: <news.28549>
} Content-Length: 713
}
} I realise that this is probably a ridiculous question, but here goes:
}
} Is it possible to attach a process to an existing transaction, so that a
} single commit will affect both processes ?
}
} For example:
}
} Process X - ESQL/C starts transaction
} Process X - Calls stored procedure Y
} Process Y - does some work in DB
} Process Y - spawns/forks/<whatever it's called in spl> ESQL/C
} process Z and waits for Z to complete
} Process Z - does some DB work
} Process Z - completes
} Process Y - completes
} Process X - commits work
}
} Desired result: All work performed by X, Y and Z committed by X.
}
} Sorry if silly question, thanks for any help if not !!
} Pete
}
}
} Pete
}