Page 1 of 1

LOOP IN A MF INVIROMENT

Posted: Wed May 24, 2006 1:52 am
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

Re: LOOP IN A MF INVIROMENT

Posted: Wed May 24, 2006 4:57 am
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

Re: LOOP IN A MF INVIROMENT

Posted: Wed May 24, 2006 5:16 am
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.

Re: LOOP IN A MF INVIROMENT

Posted: Wed May 24, 2006 6:16 am
by mpouet
Ok,

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

Matthieu

Posted: Wed May 24, 2006 7:09 am
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.

Re: LOOP IN A MF INVIROMENT

Posted: Wed May 24, 2006 7:37 am
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.

Posted: Wed May 24, 2006 7:40 am
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

Posted: Wed May 24, 2006 7:54 am
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.

Posted: Wed May 24, 2006 10:28 am
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.