how to generate an alphanumeric seq

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsproj2003
Participant
Posts: 21
Joined: Wed Oct 01, 2003 11:53 am

how to generate an alphanumeric seq

Post by dsproj2003 »

Hi,

I have PX 6.0.

How to generate a an alphanumeric seq in a job?
for eg:-
Requirement1
-AA
-AB
-AC
-AD

Requirement2 (alphabets concated with a range of numbers, say till 3)
-AA1
-AA2
-AA3
-AB1
-AB2
-AB3..

Please reply asap.

Thanks.
Nitin
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That smacks severely of non-standard custom programming to me. It's the kind of thing we consultants do (in exchange for money). If you'd like me to quote, please respond via private message. [^]

Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
To my understanding,Waht your asking is:
has anyone done this and is that person willing to share?

Well I haven't yet.

I think you can do it yourself, but if I'm mistaken
and no one is willing to send you such a code,
you can, as Ray said, "hire" someone to do it for you.

Good Luck,

Roy R.
degraciavg
Premium Member
Premium Member
Posts: 39
Joined: Tue May 20, 2003 3:36 am
Location: Singapore

Post by degraciavg »

Nitin,

It's easy in DS Server... you just need to play around with the ASCII codes to generate this kind of sequence.

But the PX solution may be a little bit more tricky as BASIC routines are not directly runnable in PX. The reason is PX is written in C while DS Server routines are written in UV BASIC...

A possible work-around is to write a special routine in DS Server and call it from a Shared Container in PX... or simply, create a Server job to handle this process. The DS Server engine is also available at your disposal in DSPX 6.0 anyway.

Regards,
vladimir
bigpoppa
Participant
Posts: 190
Joined: Fri Feb 28, 2003 11:39 am

Post by bigpoppa »

Hi.

You could build this sequence using a _sequential_ PX transformer stage. You can set a stage var to the alphabet string (e.g. "ABCDEFGH..") and use substrings to grab the letter that you need for your index. You would need two other stage vars to keep track of the indexes you pass to the substring function.

-BP
Teej
Participant
Posts: 677
Joined: Fri Aug 08, 2003 9:26 am
Location: USA

Post by Teej »

quote:Originally posted by dsproj2003
[br]Hi,

I have PX 6.0.

[discussion of requirements]


Hmm. Sounds like a Buildop stage to me.

As Ray said -- consultants love to do stuff like this. :) Too bad I'm not one... yet. ;-)

-T.J.


* * *

... now if this can make breakfast, my life is complete.
Post Reply