Hi I am Vijay
In my source i've 10 records in a single column.... but i
want to split those records into 5 sequential files each
seq file contains 2 records.?.... can any body help me?
Answers were Sorted based on User's Feedback
Answer / pavan
Using transformer we have a system variable @INROWNUM which
will store the row number of each of the incoming row.
Using this variable in constrants part of the each link we
can split the records.
for more info mail me @ akellapavankumar@gamil.com
| Is This Answer Correct ? | 12 Yes | 1 No |
Guy's,
This is Simple one. Use the row no column in SEQ_stage to
sequence numbers.
SEQ_STAGE>>>FILTER/SWITCH>>>TARGETS
seq_no are placed in SEQ column.
SO, in filter stage: seq>=0 and Seq<=1 for first target.
seq>=2 and Seq<=3 for Second Target
seq>=4 and Seq<=5 for Third Target
seq>=6 and Seq<=7 for Fourth Target
seq>=8 and Seq<=9 for Last Target
| Is This Answer Correct ? | 8 Yes | 0 No |
Hi This is Dileep,
Take one Sequential File, One Copy Stage and Put 5 O/P Links to Sequential Files.
From Sequential File, Map Directly to Copy Stage and to Sequential Stage.
In the target Sequential File, In the "Options", One 'Filter' Option is there. In that... Put the Condition like the below..
1 O/P---- head -2
2 O/P---- head -4| tail -2
3 O/P---- head -6| tail -2
4 O/P---- head -8| tail -2
5 O/P---- tail -2.
Similarly U can achieve this in Datastage by Using the Debug Stages 'Head' and 'Tail'. Precondition is to Run the Job on 'Single Node' or 'Sequentially'.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / kiran
hai vijay..,
source is seq file and take target as seq file
then in target, cilk on target folder option and select
file property for 5 times then run the job.
if u have any doubts pls make a call
Thanks&Regards
Kiran
09393363309
| Is This Answer Correct ? | 6 Yes | 6 No |
Answer / srinivasan
sort the records and split them in a seq file
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / venubabu
Mr vijay
First by using pivot stage 10 records in single column
convert into 10 rows,
Next by using transformer stage send two records to one out
put.similarlly for remaining out puts.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / aniket
i think output is to be used
like...
if record 1 and 2 then output table1;
if record 3 and 4 then output table2;
and so on...
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / p.ganesh
HAI THIS IS GANESH
IF SF CONTAINS 10 RECORDS USING SURRAGATE ID
GERNERATOR,TRANSFORMER STAGAE WE CAN SPLIT THE DATA INTO
MULTIPLE TARGERS
SF--SURRAGATE ID GENERATOR--TRANSFORMER--TGT1
--TGT2
--TGT3
--TGT4
--TGT5
IN SURRAGATE ID GENERATOR WE CAN GENERATE THE SID VALUES,NEXT
IN TRANSFORMER STAGE WE CAN CLINK ON CONSTRAINT THEN APPLY
THE EXPRESSION AS
IF MOD(DLLINK.SID,5)=1 THEN 1 ELSE 0,THIS IS FOR TGT1
IF MOD(DSLINK.SID,5)=2 THEN 1 ELSE 0,THIS IS FOR TGT2
IF MOD(DSLINK.SID,5)=3 THEN 1 ELSE 0 ,THIS IS FOR TGT3
IF MOD(DSLIND.SID,5)=4 THEN 1 ELSE 0,THIS IS FOR TGT4
IF MOD(DSLINK.SID,5)=0 THEN 1 ELSE 0,THIS IS FOR TGT5
HERE MOD(DSLINK,SID,NO.OF OUTPUT)=CONDITION
THEN
1,6 TO TGT1
2,7 TO TGT2
3,8 TO TGT3
4,9 TO TGT4
5,10 TO TGT5
IF U HAVE ANY DOUBT PLS CONTACT ME
MOBILE:9538631567
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nukaraju andala
Hi iam nukaraju,
useing tranformer stage after source can get result.
trf_stage--->in system veriables having @inrownum useing
this
@inrownum=2 in constraint of target1
@inrownum<=4 - @inrownum<=2 in constnt target2
6 - " 4 target3
8 - " 6 target4
@inrownum>10 " target5
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain how a source file is populated?
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
What is the purpose of interprocessor stage in server jobs?
if a column contains data like abc,aaa,xyz,pwe,xok,abc,xyz,abc,pwe,abc,pwe,xok,xyz,xxx,abc, roy,pwe,aaa,xxx,xyz,roy,xok.... how to send the unique data to one source and remaining data to another source????
what is operator combinality in datastage?
How you can fix the truncated data error in datastage?
options available in sequence job to run,validate?
5) A file contains 10 (1-10) I want trgt like Trgt 1 trgt 2 trgt 3 1 2 3 4 5 6 7 8 9 10
hi All, i have one scenario like if source--->transformer-->2 target sequential files the 1 st target sequential file is loads the data from source and 2nd target sequntial file contain the 1st target total record count,and file name of 1 st target seq file and timestamp seperated by delimeter for example if source have 10 record the 1st target seq file hav 10 records and 2nd target seq file example 10|xyz.txt|20101110 00:00:00 could you please help me out how can i implement in datastage job.
what is data mapping
I/P --- ID Value 1 AB 2 ABC 3 ADE 4 A O/p --- ID Value 1 A 1 B 2 A 2 B 2 C 3 A 3 D 3 E 4 A
IN SEQUENTIAL FILE,I HAVE DATA LIKE THIS EID,ENAME 11,AA 11,CC 22,DD 33,EE 22,AA 22,BB 22,CC 11,BB THEN i SELECT perform sort ON eid,uncheck both unique,stable AND I CHOOSE hash SORTING.WHAT IS THE OUTPUT I CAN GET.what happend if i select UNIQUE,STABLE. PLEASE EXPLAIN HOW THE RECORDS DISPLAY AT TARGET.