Saturday, February 13, 2010

datastage faqs

 1.how to generate even numbers in surrogate or tranformar stage ? 2. how many ways to remove duplicate values?
To generate even numbers using transformer, we can make use 
of stage variables. declare a stage variable say SV1 and 
initialise it to 0. In the derivation of that stage 
variable increment it by 2 which looks like SV1+2. By doing 
this we can generate even numbers.
how many write modes are there in ds ?
1.Append
2.Overwrite
3.Create(Error if exist)
4.Use existing (discard record)
5.Use existing (discard record & schema)
How to stop a job when its status is running?
To stop a running job go to DataStage Director and click the stop button (or Job -> Stop from menu). If it doesn't help go to Job -> Cleanup Resources, select a process with holds a lock and click Logout If it still doesn't help go to the datastage shell and invoke the following command: ds.tools  It will open an administration panel. Go to 4.Administer processes/locks , then try invoking one of the clear locks commands (options 7-10).
How to send notifications from Datastage as a text message (sms) to a cell phone
There is a few possible methods of sending sms messages from Datastage. However, there is no easy way to do this directly from Datastage and all methods described below will require some effort.  The easiest way of doing that from the Datastage standpoint is to configure an SMTP (email) server as a mobile phone gateway. In that case, a Notification Activity can be used to send message with a job log and any desired details. DSSendMail Before-job or After-job subroutine can be also used to send sms messages.  If configured properly, the recipients email address will have the following format: 600123456@oursmsgateway.com  If there is no possibility of configuring a mail server to send text messages, you can to work it around by using an external application run directly from the operational system. There is a whole bunch of unix scripts and applications to send sms messages.  In that solution, you will need to create a batch script which will take care of sending messages and invoke it from Datastage using ExecDOS or ExecSh subroutines passing the required parameters (like phone number and message body). 

No comments:

Post a Comment