Is there any way to overwrite the parameter with row values?
Moderators: chulett, rschirm, roy
Is there any way to overwrite the parameter with row values?
Dear All,
Is there any way to overwrite the parameter with row values?
For example: Job parameter vndemail=123@abc.com
row value ->
vndA,vndAemail@123.com
vndB,vndBemail@456.com
vndC,vndCemail@123.com
.
.
.
I would like to overwrite the value of vndemail=123@abc.com with vndAemail@123.com when reading the first row and send email to vndAemail@123.com and when 2nd row and 3rd row reading, I would also like to overwrite the value of vndemail with respective values and send email to respective email which get it from vndemail parameter.
Do you think it can be done in Datastage Server job or Sequencer job???
Thank you for your time,
Is there any way to overwrite the parameter with row values?
For example: Job parameter vndemail=123@abc.com
row value ->
vndA,vndAemail@123.com
vndB,vndBemail@456.com
vndC,vndCemail@123.com
.
.
.
I would like to overwrite the value of vndemail=123@abc.com with vndAemail@123.com when reading the first row and send email to vndAemail@123.com and when 2nd row and 3rd row reading, I would also like to overwrite the value of vndemail with respective values and send email to respective email which get it from vndemail parameter.
Do you think it can be done in Datastage Server job or Sequencer job???
Thank you for your time,
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Not possible legally. Parameter values are read into memory when the job is started.
If you're not interested in "legally", search DSXchange for references to STAGECOM.ARR.
If you're not interested in "legally", search DSXchange for references to STAGECOM.ARR.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
The STAGECOM.ARR values are not documented and, as Ray has pointed out, there is no official way to do this. Manipulating the STAGECOM.ARR takes some knowledge of the internals of DataStage. I would go the path that Sainath has recommended and use explicit calls from your transform stage to the sendmail script with row data. That is documented, legal and supportable.
Dear ArndW and Saint,
Yeah I really want to use it but my actual rows will be as below.
Order_id, SKU, VndNo,Qty, Price...
001,10001,100,10,10
001,10002,100,10,10
001,10003,100,20,20
002,10001,101,12,12
.
.
.
Then I want to send order no 001 to respective VndNo 100's email. So I want to check the next row's Order_id is same order_id or not. Hence I would like to reset the parameter value with previous row's Order_id to check whether it is same order_id or not.
I am so sorry for my poor example from my first post:(
Is there any idea please???
Thank you so much for your time,
ICE
Yeah I really want to use it but my actual rows will be as below.
Order_id, SKU, VndNo,Qty, Price...
001,10001,100,10,10
001,10002,100,10,10
001,10003,100,20,20
002,10001,101,12,12
.
.
.
Then I want to send order no 001 to respective VndNo 100's email. So I want to check the next row's Order_id is same order_id or not. Hence I would like to reset the parameter value with previous row's Order_id to check whether it is same order_id or not.
I am so sorry for my poor example from my first post:(
Is there any idea please???
Thank you so much for your time,
ICE
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Dear Sainath,
Yes. I am so sorry that I gave poor example and made misunderstanding![Sad :(](./images/smilies/icon_sad.gif)
Yes. I also want to split the files according to Order_id but I don't know how to split the rows by grouping order_id such as
001,10001,100,10,10
001,10002,100,10,10
001,10003,100,20,20
I want all the above 3 rows to be in order_id=001 file and etc.
Is there any idea how can I split it please???
Thank you,
Yes. I am so sorry that I gave poor example and made misunderstanding
![Sad :(](./images/smilies/icon_sad.gif)
Yes. I also want to split the files according to Order_id but I don't know how to split the rows by grouping order_id such as
001,10001,100,10,10
001,10002,100,10,10
001,10003,100,20,20
I want all the above 3 rows to be in order_id=001 file and etc.
Is there any idea how can I split it please???
Thank you,
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
Do you have PX installed ? Reason for this question is that I can give you easy solutions in Unix than in Windows.
In Windows, you can create a unique list of values by passing the data through an aggregator and writing to a separate file. This file can be used in a loop to locate, prepare and email the records from your current output.
In Windows, you can create a unique list of values by passing the data through an aggregator and writing to a separate file. This file can be used in a loop to locate, prepare and email the records from your current output.
Nope. Mine is 7.5 Window version ![Sad :(](./images/smilies/icon_sad.gif)
May I know how to create unique list of value? Do you think it can be solved as my requirement include duplicate order-id with diff sku?
Thank you so much for your time,
![Sad :(](./images/smilies/icon_sad.gif)
May I know how to create unique list of value? Do you think it can be solved as my requirement include duplicate order-id with diff sku?
Thank you so much for your time,
Sainath.Srinivasan wrote:Do you have PX installed ? Reason for this question is that I can give you easy solutions in Unix than in Windows.
In Windows, you can create a unique list of values by passing the data through an ...
I have already tried with folder stage but it could solve only 50% of my requirement. Using Folder stage, files could be created according to Order_id but the problem is the generated file can keep only the last rows of the specific order_id ![Sad :(](./images/smilies/icon_sad.gif)
Actually there should hav more than one rows in the file.
For example:
Order_id,SKU, VendNo,price, qty
001,10001,100,10,10
001,10002,100,10,10
001,10003,100,20,20
File created as 001 for Order_id 001 but it include only the last row which is for sku 10003 as follows.
001,10003,100,20,20
It seems like overwrite.
Is there any way to append the rows in folder stage file creation?
Thank you so much for your time,
![Sad :(](./images/smilies/icon_sad.gif)
Actually there should hav more than one rows in the file.
For example:
Order_id,SKU, VendNo,price, qty
001,10001,100,10,10
001,10002,100,10,10
001,10003,100,20,20
File created as 001 for Order_id 001 but it include only the last row which is for sku 10003 as follows.
001,10003,100,20,20
It seems like overwrite.
Is there any way to append the rows in folder stage file creation?
Thank you so much for your time,
chulett wrote:Write the files out using a Folder stage, it will create data-driven separate files for you automatically if you set it up properly. ...
As I said, I don't recall that being a restriction and unfortunately I have no way to run my own tests anymore. And the documentation is a little sparse on the subject, so I'm afraid others will have to actually help you with this. That or ask your official support provider. Sorry.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers