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
mouthou
Participant
Posts: 208 Joined: Sun Jul 04, 2004 11:57 pm
Post
by mouthou » Wed Feb 21, 2007 11:45 am
Hello everyone,
Is there an option in a job to duplicate the records from the source file. I need to create 3 duplicated records from a single record. Any help would be appreciated.
Version: Server
Os: Windows
Thanks,
asitagrawal
Premium Member
Posts: 273 Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto
Post
by asitagrawal » Wed Feb 21, 2007 11:50 am
How many fields are there in the input ?
kcbland
Participant
Posts: 5208 Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:
Post
by kcbland » Wed Feb 21, 2007 12:09 pm
3 output links from a Transformer going into a Link Collector/Hashed file/3 separate Sequential files/etc.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
mouthou
Participant
Posts: 208 Joined: Sun Jul 04, 2004 11:57 pm
Post
by mouthou » Wed Feb 21, 2007 12:35 pm
[quote="kcbland"]3 output links from a Transformer going into a Link Collector/Hashed file/3 separate Sequential files/etc. ...[/quote]
Is there a better option than having 3 sequential files. I need to have all those 3 records in a single sequential file.
mouthou
Participant
Posts: 208 Joined: Sun Jul 04, 2004 11:57 pm
Post
by mouthou » Wed Feb 21, 2007 12:36 pm
[quote="asitagrawal"]How many fields are there in the input ?[/quote]
I have 18 fields. Are you talking about @VM?
DSguru2B
Charter Member
Posts: 6854 Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX
Post
by DSguru2B » Wed Feb 21, 2007 1:27 pm
Code: Select all
---->
your source --->xfm ----> LinkCollector ---->Single Target.
---->
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
mouthou
Participant
Posts: 208 Joined: Sun Jul 04, 2004 11:57 pm
Post
by mouthou » Wed Feb 21, 2007 2:33 pm
Thanks. It worked. I didnt realise that there is a link collector in Server edition. It is same as what kcbland suggested.
DSguru2B
Charter Member
Posts: 6854 Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX
Post
by DSguru2B » Wed Feb 21, 2007 2:35 pm
I just gave a visual view of Ken's suggestion
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
urshit_1983
Participant
Posts: 73 Joined: Wed Jun 28, 2006 3:27 pm
Location: NJ
Post
by urshit_1983 » Thu Feb 22, 2007 11:37 am
Another soln
you can write a before job subroutine script :
{ rm -f infile && awk '{ for (i=0;i<3; i++) { print $0 } }' > infile; } < infile
"Nobody is expert in Everything,
But Everybody is expert in Something."