transformer logic

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

Post Reply
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

transformer logic

Post by devesh_ssingh »

Hi,
i have a 2 requirements
1)

Code: Select all

i/p                     o/p
a                         a
b                         b
c                         c 
1                        01
2                        02
3                        03
4                        04
5                        05
6                        06 
7                        07
8                        08
9                        09 
10                       10

i have declared stage variable and wrote if else like below...
if col=1 or col=2 or col=3 or col=4 or col=5 or col=6 or col=7 or col=8 or col=9 then 0||col
else col...
then used this variable in derivation
is there any better way to do this
input column is of varchar type so as o/p.............

2)
in one of case
i/p------------>trx--------------->file
i just wanted to pass the values through transformer to o/p file
but there was no data coming from i/p file so o/p is empty.
so i just hard coded the value..but that was the case when no data coming...since this was weekly file next time if data come through input file then o/p will not those values...
so i declared a stage variable and set flag
if inrownum<>0 then o else 1
now in trx derivation i wrote
if sv=0 then inp_colm else 'value'

its not working ...i just need to pass some hardcode value in case there is no value in input.

hope i m clear.....

Many many thanks in advance.

Cheers!!!!
Devesh
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

For first case, try using isValid() function to check for numbers and then depending on length pad with zeros.

For second case, use a dummy file with hardcoded values. If the input file arrives with values, you can use that. Otherwise use the hardcoded file.
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

Post by devesh_ssingh »

thanks for response
i got first one but could not see the other as it is hiding
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Once you get yourself a premium membership the entire post will be visible.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

Post by devesh_ssingh »

Hi ray,

i didnot found online payment safe....other option of payment is outa of question...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

devesh_ssingh wrote:i did not found online payment safe
It's an online world and only going to get 'onliner' as we go forward, so suggest you put your fear behind you and pay attention to where you go when paying and how that payment is done and make sure you have some common protections in place.

For example, DSXchange uses the secure Yahoo store for its payments, you can tell by both the "https" in the URL and the "padlock" that should show up somewhere in your browser of choice. So, unless your PC has already has been compromised, then it should be perfectly safe. Typically, you even have an option to persist your card information after the sale, simple enough (usually) to choose to not do that.

Make sure you have a good anti-virus and anti-malware in place as well. Many are free for home use - MS Security Essentials, Avast, AVG, Malwarebytes to name a few - and can protect in real time. Download something, scan your machine and then come get some. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

subject gone in other direction

Post by devesh_ssingh »

i meant when i put my card information...the CVV number is visible. as in its not encrypted...whenever i have used my card CVV num was encrypted.....
hence scared :(

is it safe to do online transcation here....cause i need to upgrade my membership....
please suggest
arun_im4u
Premium Member
Premium Member
Posts: 104
Joined: Mon Nov 08, 2004 8:42 am

Post by arun_im4u »

If you need some additional convincing than what Ray already said.. I have been a premium member here for a while and have renewed it twice..

And NO.. no one stole my Credit card details...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

We all did the same thing and it is SSL encrypted during the transmission, just not "on the screen". Just make sure no-one is peeping over your shoulder. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply