User Defined Variables

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

User Defined Variables

Post by roy »

Hi All,
( using Version 7.5 on solaris 2.8 )
I have a situation where I need to handle a dynamicly changing value thru-out the life cycle of a sequence job.

My job reports progres to some QA tables, along the way it records business significant points and/or processing sections so I'll be able to address them from another process flow and generate reports on them as well.

The thing is I'm trying to simplify my job design by using the automatically handle activities that fail check box in the sequence job's properties tab.

so I have 2 seperate flows:
1. the process itself.
2. the exception flow when one is caught.

The thing is that while in the first flow I'll occasionally invoke an open section job activity stating section 1 started then some processing then section 1 finished then section 2 started , section 2 finished and so on till the end of this run.

In the 2nd flow - handling the exception, how can I capture the fact that some activity failed inside a certain section?!

I thought of using user variable stage and modify it along the way, but I noticed that the stage name is also part of the user variables name if I want to pass it as a parameter value to my section failed activity.

After searching this forum and even reaching back to Oliver's List !!! I came to the conclusion that a possible solution lies in the use of common variable/s and routines.

I would apreciate any other ideas you might have to solve this issue.

Thanks in advance for your time,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Common or Named Common only exist across a single connection to Universe or the Engine. Each job has its own connection. I would use hash files or sequential files. Create a hash file to store each section and the result. Maybe clear this file at the begining. If you have known keys to this like Section and Job then you store the status of either successful or failed and maybe the date and time.
Mamu Kim
newtier
Premium Member
Premium Member
Posts: 27
Joined: Mon Dec 13, 2004 5:50 pm
Location: St. Louis, MO

User Defined Variables - Environment Variables

Post by newtier »

Have you tried using the new Environment Variables feature of 7.5? Although this may not match the "intended" use, you define them in the Project, include them as "Job Parameters", then you can access and set them in your logic (such as a Derivation).

Something to try to see if it addresses your need. We are just now moving to 7.5 and starting to experiment with them to see how they can be most effectively used.
Rick H
Senior Consultant
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Hey, if the information you need is already being recorded in "QA tables" why not retrieve it from there? Chances are that the pages needed will still be cached.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Thanks for the replies :),

this top level sequence is the one populating the QA tables with info.

Nice alternative Kim :) (crossed my mind after posting as well), since I'm in the same top level sequence I guess I'm fine scope wise, but I'll definitly test both options.

as for the user defined variable stage, as I mentioned in my original post using a variable after that stage will include it's name prefacing the variable name and I may have a variable number of stages altering the variable along the sequence flow.

I'll gladly take more ideas if anyone has any :)

(hmm nice points, got 7777 points with this one ;))

Thanks in advance,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply