Finding return value of checkpointed routine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Finding return value of checkpointed routine

Post 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 ?
- Zulfi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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
- Zulfi
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
Last edited by ray.wurlod on Sun Dec 16, 2012 5:39 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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.
- Zulfi
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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
- Zulfi
Post Reply