Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
Not quite sure how to check the SQLCODE but I have one Idea if it is only two queries.
Put two inserts in two JCL steps using DSNTEP2. If step1 is sucess then execute step2 using condition codes. This way you dont need to be worried about ROLLBACK. If step1 fails it would have been already Rolled back.
Does that work .? I would do this rather than cracking DSNTEP2 code. Gues DSNTEP2 is written in Assembler or COBOL?.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
If you use a COBOL program you will have far more flexability and control of the process. Your process could support more than only simple inserts.
You could also incorporate an audit trail of what was done for when there are questions. Makes me breathe easier to have a record of what database maintenance was done "outside" the system and may also satisfy some auditors (if you deal with them - them see red flags when spontaneous updates are done to database content).