How to store the Values in the Environment Variables
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 31
- Joined: Wed Mar 17, 2004 3:33 am
How to store the Values in the Environment Variables
Hi ,
I am having the PX job design as follows.
Oracle Stage--->LkpStage-->Oracle Stage.
When the Look up is filed I have to create the Reject file with Data and the Number of the Job Run.The reject file (Sequential File Stage) is having the file name as:
CutomerReject_`date +%d_%m_%Y_$MYVAL`
Here the MYVAL is an environment variable defined in the admin and I am setting the default value as 0.
In the before Job Routine I am executing the Unix command:
MYVAL=`expr $MYVAL + 1`.
My Requirement is when I ran this job 5 times then I have to generate 5 reject files with filename_Date_1.........filename_Date_5.
But I am unable to restore the Incremental Value in the Environment Variable.
How Can I store the Incremental value in the Environment Variable?
When I ececute the Job then is it possible to reset the Environment Variable to '0 ' in Data stage?
Can any one help me regarding this?
Thanks in advance....
Regards
Siva
I am having the PX job design as follows.
Oracle Stage--->LkpStage-->Oracle Stage.
When the Look up is filed I have to create the Reject file with Data and the Number of the Job Run.The reject file (Sequential File Stage) is having the file name as:
CutomerReject_`date +%d_%m_%Y_$MYVAL`
Here the MYVAL is an environment variable defined in the admin and I am setting the default value as 0.
In the before Job Routine I am executing the Unix command:
MYVAL=`expr $MYVAL + 1`.
My Requirement is when I ran this job 5 times then I have to generate 5 reject files with filename_Date_1.........filename_Date_5.
But I am unable to restore the Incremental Value in the Environment Variable.
How Can I store the Incremental value in the Environment Variable?
When I ececute the Job then is it possible to reset the Environment Variable to '0 ' in Data stage?
Can any one help me regarding this?
Thanks in advance....
Regards
Siva
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 31
- Joined: Wed Mar 17, 2004 3:33 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 31
- Joined: Wed Mar 17, 2004 3:33 am
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 31
- Joined: Wed Mar 17, 2004 3:33 am
Sainath,
In the fisrt post onlly I mentioned I am having the problem to store the values for the Environment Variable.
What ever the responses you have given is stating that you are not at all read the complete problem. If i give the solutions to others then I can not give one line answers.
based on your response I am giving this...please dont give single line statements as answers..
Now wew can leave it to others...
In the fisrt post onlly I mentioned I am having the problem to store the values for the Environment Variable.
What ever the responses you have given is stating that you are not at all read the complete problem. If i give the solutions to others then I can not give one line answers.
based on your response I am giving this...please dont give single line statements as answers..
Now wew can leave it to others...
-
- Participant
- Posts: 31
- Joined: Wed Mar 17, 2004 3:33 am
Hi ,
While using the Start and End Loop we are getting the Counter Values.
As per the requirement I have to reset the Counter Value as Zero(0) for every day run.
How Can I achieve this in Data Stage?
If this we have to achieve by using Unix script then what are the steps we have to follow?
Please help me regarding this.
Thanks and Regards
Siva
While using the Start and End Loop we are getting the Counter Values.
As per the requirement I have to reset the Counter Value as Zero(0) for every day run.
How Can I achieve this in Data Stage?
If this we have to achieve by using Unix script then what are the steps we have to follow?
Please help me regarding this.
Thanks and Regards
Siva
-
- Participant
- Posts: 31
- Joined: Wed Mar 17, 2004 3:33 am
Hi ,
One moer thing for each run I have to create a Reject file.If i set the Job in between Start and end loop I have to give the Values for From Step and To properties of the Start Loop Stage. I have given 1,1,1 it executes the job one time and the counter value is also 1.
If I executes the Sequence for second time on the same day then again the counter value is 1 only and my reject file created as _date_1 only.But this time I need the counter value as 2.
If I increase the Strart Loop Stage values as 1,1,5 then for a single run it generates 5 rejects file this can not matck the requirement.
Can any one help me regarding this..
Thanks in advance..
Siva
One moer thing for each run I have to create a Reject file.If i set the Job in between Start and end loop I have to give the Values for From Step and To properties of the Start Loop Stage. I have given 1,1,1 it executes the job one time and the counter value is also 1.
If I executes the Sequence for second time on the same day then again the counter value is 1 only and my reject file created as _date_1 only.But this time I need the counter value as 2.
If I increase the Strart Loop Stage values as 1,1,5 then for a single run it generates 5 rejects file this can not matck the requirement.
Can any one help me regarding this..
Thanks in advance..
Siva
I don't know about anyone else, but now I'm confused as to what it is you are trying to do.
The assumption up to this point was that you needed to run your job five times in a row using different parameter values. Is that not the case? Are you saying it may need to run up to five times in a singleton fashion over the course of the day? That's completely different.
Please clarify what exactly it is that you need to do.
![Confused :?](./images/smilies/icon_confused.gif)
The assumption up to this point was that you needed to run your job five times in a row using different parameter values. Is that not the case? Are you saying it may need to run up to five times in a singleton fashion over the course of the day? That's completely different.
Please clarify what exactly it is that you need to do.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers