Is it possible to manually set a return code(RC) in a bteq. I need to restart the JCL based on a condition like .IF ACTIVITYCOUNT<>0(present in my BTEQ script) then restart jcl else quit. The JCL should be automatically restarted based on the activitycount. Is there any way to achieve it?
you can set an error code based on the activitycount.
have the below stmt right after your DML stmt:
.IF ACTIVITYCOUNT<>0 THEN .QUIT 50;
this will make your parm and in turn your JOB STEP fail(i.e errorcode or returncode<>0) and you can have a condition stmt in your PROC STEP to restart from a STEP in the jcl by checking this return code in the PROC.