Page 1 of 1

Finding return value of checkpointed routine

Posted: Sun Dec 16, 2012 6:07 am
by zulfi123786
I have a checkpointed sequence which contains a routine that passes its return value to a jobs parameter. The sequence has failed but I was wondering in which of the RT_XXXX hashed files the routines return value is stored.

Could anyone please let me know from which hashed file and record id the routines return value could be fetched ?

Posted: Sun Dec 16, 2012 1:12 pm
by ray.wurlod
The routine return value is not stored.

It does, however, trigger a Failure if its value is not zero.

You need to handle non-zero values explicitly (and, for preference, include an explicit Failure trigger).

Posted: Sun Dec 16, 2012 2:20 pm
by zulfi123786
ray.wurlod wrote:The routine return value is not stored.

It does, however, trigger a Failure if its value is not zero.
If the return value is not stored then in a checkpointed sequence if the routine runs fine but a job following the routine that reads a parameter from routine return value fails, on restartable rerun the routine will be skipped and in that case from where does the job read its parameters value if it isn't stored ?

Thanks

Posted: Sun Dec 16, 2012 5:37 pm
by ray.wurlod
The checkpoints themselves are stored. The routine result is not.
If the routine fails, it does not get a checkpoint.
From memory (and I have no way of checking) they are stored as a multi-valued list in the job record in the RT_STATUSxxx table for the job.

Posted: Mon Dec 17, 2012 12:56 am
by zulfi123786
Consider the below sequeence

Routine A -----> Job A ------ Job B

The trigger of routine is unconditional and I am passing a timestamp as return value which goes as parameter in job A and job B. Job A and Job B have failure triggers which run AbortToLog routine that aborts the sequence if any of the jobs fail. The trigger from Job A to B is Executed Ok
When the sequence runs, the routine runs and fails as it passes a timestamp as return value and say the Job A also fails. On restartable rerun I am trying to understand the difference in two scenarios

1. Checkpointing the routine - Since the routine failed in previous run it would run again .
2. Marking "Do Not checkpoint" for the routine - Since it is not checkpointed it would run again when the sequence restart.

In both cases the routine runs on restart, wondering if there is any difference in above two cases.

Posted: Mon Dec 17, 2012 1:34 am
by zulfi123786
Also I have one more question.

The checkpointing happens for each activity (configured to be checkpointed) of the sequence marking failure or success and on restart it checks the failure/success stuats in the checkpoint record to identify which activities have to be rerun.

OR

Only those activities that are configured to be checkpointed are marked in the RT_XXX files when they run successfully (on failure no checkpoint record is written even if the acitvity is checkpointed) and on restart it checks if the checkpoitned record exists and if NO it reruns the activity.

Please clarify