Stage variable

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
swathi Singamareddygari
Participant
Posts: 48
Joined: Fri Feb 29, 2008 1:09 am
Location: Bangalore

Stage variable

Post by swathi Singamareddygari »

Hi

I have a requirement

My input is like this

no
--------
1
1
1
0
0
1
0
1

I want output as

No new
--------------------
1 1
1 1
1 2
0 0
0 0
1 1
0 0
1 1

If zero comes after one i want the count of how many zeros are coming after 1.

if any one knows please help me

Thanks&Regards

Swathi S
Thanks&Regards
S.Swathi
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

Swathi,

we need more information for to help you. Could you write beside every new line, how you found out and why the value of the second column.
Wolfgang Hürter
Amsterdam
swathi Singamareddygari
Participant
Posts: 48
Joined: Fri Feb 29, 2008 1:09 am
Location: Bangalore

Post by swathi Singamareddygari »

Hi WoMawil,

sorry i gave the wrong output
If the input is
no
--------
1
1
1
0
0
1
0
1
i want output as
no number
------------------
1 1
1 1
1 3
0 0
0 0
1 2
0 0
1 1

i want the output as :

if any of the zeros r coming i want the number of zeros coming sucessively plus after the which number its coming

for example:
after the third row we r getting 2 zeros
so the output will be= 2+ value in the third row
so output is 2+1=3

if any one knows please help me

Thanks

Swathi S
Thanks&Regards
S.Swathi
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

This looks suspiciously like the problem posted by dssiddu here:

viewtopic.php?t=123886

Are you in fact working on the same "issue"? :?
-craig

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