Multiline

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
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Multiline

Post by jseclen »

Hi,

I have a process that read a text file, in this record in a position it has a value, it means the number of records will be repeat, example

F1 F2 F3 F4
HELLO 092983 3 OTHER VALUES

This record will be convert in three records...

F1 F2 F3 F4
HELLO 092983 3 OTHER VALUES
HELLO 092983 3 OTHER VALUES
HELLO 092983 3 OTHER VALUES

I make a routine that receive 2 arguments, the number of repetitions, but i have problems with the EndLine..

The code is

Arg1 = Cadena
Arg2 = Veces

FinLinea = Char(10)
oCad = Cadena

For i = 1 to (Veces - 1)
oCad = FinLinea : oCad
Next i
Ans = Cad : oCad

Thks for your help..






Miguel Seclen
Lima - Peru
chunsli
Participant
Posts: 23
Joined: Sun Aug 10, 2003 5:31 pm

Post by chunsli »

There are some posts helpful for your case, see

http://www.tools4datastage.com/forum/to ... C_ID=84657

for details.
jseclen
Participant
Posts: 133
Joined: Wed Mar 05, 2003 4:19 pm
Location: Lima - Peru. Sudamerica
Contact:

Post by jseclen »

Thanks for the help,

I proved with that routine and the problem dont be resolved, i remake my routine and controlled the finish blank line ..

oCad = ""

For i = 1 to Veces
oCad = oCad : Cadena : Char(10)
Next i
Ans = oCad


Thanks...



Miguel Seclen
Lima - Peru
Post Reply