How to store the Values in the Environment Variables

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

Seems like you are using a list loop with seretator as , and values 1,1,1

For 3 runs you are passing the same value, So how you are expecting the counter to be different for each run?

Pass 1,2,3 to create 3 different files.

Else as Craig said explain your problem properly.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

priyadarshikunal wrote:Seems like you are using a list loop with seretator as , and values 1,1,1
No, they were noted as being the Start, Stop and Step values used in the stage... as in looping "from 1 to 1 by 1", a single iteration - which would mean there's absolutely no need for the loop. Hence the confusion.
-craig

"You can never have too many knives" -- Logan Nine Fingers
shivakumar
Participant
Posts: 31
Joined: Wed Mar 17, 2004 3:33 am

Post by shivakumar »

Hi ,

Basically I need the reject files based on my job runs.Suppose if my job runs 5 times in a day then I have to execute my job 5 times so 5 Rejecte files are to be created with/ithout rejected records.

The reject file name cinatains "RejectFile_Date_<JobrunNumber>"

Here the <Jobrunnumber>={1,2,3,4,5} it varies from day to day based on the job runs on that particular day.

06-07-2009 ---> if my job rund 2 times then I have to get 2 reject files

RejectFile_06-07-2009-1 and RejectFile_06-07-2009-2.

for 07-07-2009 ---->if my job runs for 3 times then I have to get 3 reject files as RejectFile_07-07-2009-1, RejectFile_07-07-2009-2 and RejectFile_06-07-2009-3.

If you observe the above files I have to rest the counter value if Date changes.


Can you please guide me how to achieve this in Data Stage?

Thanks and Regards
Siva
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

We get all that. That's straightforward. What you still haven't explained is what drives your "if my job runs X times" requirement. How is it triggered? What controls running 2 versus 3 or 5 times? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

chulett wrote:
priyadarshikunal wrote:Seems like you are using a list loop with seretator as , and values 1,1,1
No, they were noted as being the Start, Stop and Step values used in the stage... as in looping "from 1 to 1 by 1", a single iteration - which would mean there's absolutely no need for the loop. Hence the confusion.
:shock: Thanks for clarification.

After reading each and every post, what I understand is there is no loop at all (at least not needed). Its being triggered when the condition is met (like file arrival).

In that case you need to store your counter and loop will not hold it once the job is complete. hence you need to think out of the box and store the counter somewhere like in a file (or database) . Increase it every time and reset it everyday.

PS: Its impossible to guess the problem without proper explanation. In that case probablity of getting correct answer will be too less.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply