LOOP IN A MF INVIROMENT

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
guysma
Participant
Posts: 32
Joined: Wed Sep 14, 2005 2:15 am
Location: ISRAEL

LOOP IN A MF INVIROMENT

Post by guysma »

Hi,
I want to multiply by 40 each row that comes from the input stage to the output stage
I'm using the MF edition
Thanks'

Guy smadga
mpouet
Participant
Posts: 34
Joined: Mon Oct 18, 2004 10:23 am
Location: France

Re: LOOP IN A MF INVIROMENT

Post by mpouet »

Hi,

What is the MF edition ?

What a strange idea !!!
You can use a row generator to create 40 lines with one column (called "JOIN" for example) filled with a fixed value (for example "1").
Then you create a column (also called "JOIN") in your "stream" flow with the value "1".
Use a join stage to join your flows on the "JOIN" column.
Each line from your "stream" flow will be multiply by 40.

That's all !
Matthieu
Last edited by mpouet on Wed May 24, 2006 8:38 am, edited 1 time in total.
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Re: LOOP IN A MF INVIROMENT

Post by balajisr »

mpouet wrote:Hi,

What is the MF edition ?

What a strange idea !!!
You can use a row generator to create 40 lines with one column (called "JOIN" for example) filled with a fixed value (for example "1").
Then you create a column (also called "joined") in your "stream" flow with the value "1".
Use a join stage to join your flows on the "JOIN" column.
Each line from your "stream" flow will be multiply by 40.

That's all !
Matthieu
Matthieu,

guysma is using MVS Edition. Rowgenerator stage is not available in MVS Edition. It is available only in EE Edition.
mpouet
Participant
Posts: 34
Joined: Mon Oct 18, 2004 10:23 am
Location: France

Re: LOOP IN A MF INVIROMENT

Post by mpouet »

Ok,

So, just create a flat file with 40 lines containing "1"...

Matthieu
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

Guysma, can you offer a simple example of what you're trying to accomplish? Please indicate the structure of your source and target files.

There are probably several ways to accomplish your task, ranging from a pure DS/390 solution to a pure IBM utility solution.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: LOOP IN A MF INVIROMENT

Post by ray.wurlod »

guysma wrote:Hi,
I want to multiply by 40 each row that comes from the input stage to the output stage
I'm using the MF edition
Thanks'

Guy smadga
The edition does not really matter. You use a Transformer stage, and build an expression that multplies the input column by 40,in the derivation expression of the output column.

The job itself looks after iterating through all the rows supplied via its input.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
guysma
Participant
Posts: 32
Joined: Wed Sep 14, 2005 2:15 am
Location: ISRAEL

Post by guysma »

My source and target files are flat files and for each row in the source file i need 40 duplicated rows
For example:
Input:
xxx yyy
Output:
xxx yyy 1
xxx yyy 2
xxx yyy ...
xxx yyy 40

I know that I can do it with 40 links ' I'm trying to find something more efficient
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Just have another additional column in both the file. With the value of '1'. Make a JOIN. Youcan get the cartesian product of what you expect.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
dls
Premium Member
Premium Member
Posts: 96
Joined: Tue Sep 09, 2003 5:15 pm

Post by dls »

Guysma, based on your example, I would explore a utility approach unless a programmatic (i.e., DataStage) solution is demanded. Solicit some help from the MVS system or application programmers in your shop. I'm suggesting that there may be several IEB utilities that can accomplish what you want to do without creating a special program to do it.
Post Reply