I have a COBOL DB2 stored procedure XYZ to insert records into tables P (parent), C1 (child1) and C2 (child2). P has unique key index on seq_num_p. XYZ doesnt do a commit or rollback after inserts and expects the calling process to do it.
I have a batch cobol program ABC that reads an input file and for each record read it call XYZ. When I execute ABC thru a regular job, it abends with -803 on table P. But when I execute ABC thru xpediter, it doesnt abend and executes successfully.
I have a CICS cobol program EFG which calls XYZ for 1 record at a time (per transacation). This works fine too and no issues are encountered.
Could anyone, help me understand why I get a -803 when XYZ is called multiple times. The input file doesnt have any duplicates or any of that sort.