Page 1 of 1
Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Fri Mar 25, 2016 9:29 pm
by Stef31
Hi,
I try to make a concatenation with a job in batch between 2 files with a single line in each one and using diferent part of each files. This files don't have the same lg (80 for E1, 133 for E2).
I need to take the informations on file 1 in position 4 (on 5 caracters) + informations on file 2 in position 13 (on 120 caracters).
I don't know if I can use a Sort, Fileaid, UT4* on an other utilities ...
Thanks in advance for your answer.
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Fri Mar 25, 2016 10:24 pm
by Anuj Dhawan
SORT would be preferred method, for me.
What are the positions of the "keys", in both files, to make the match upon? Can you please show some sample records?
PS: Do you know which SORT product is in use at your shop?
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Sat Mar 26, 2016 5:07 pm
by nicc
Please note that they are not files but datasets. There is a difference.
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Mon Mar 28, 2016 9:45 am
by Chandan Yadav
SORT Join would help you. Check for JOINKEYS in DFSORT manual.
But yes as Anuj said,before we would like to know the sample records and DFSORT product
Thanks and regards,
Chandan
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Tue Mar 29, 2016 2:16 pm
by Stef31
First, thanks for your quick answers.
In my company, we use SyncSort Product.
Datasets 1 is :
;25/03/2016;13:32:14;25/03/2016;13:33:43;25/03/2016;
Datasets 2 is :
V V0012220160318
In Final I want :
xxxxxx;00122;25/03/2016;13:32:14;25/03/2016;13:33:43;25/03/2016;
(xxxxx it's just some text)
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Tue Mar 29, 2016 3:33 pm
by enrico-sorichetti
repost Your data without colours and using only the CODE tags
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Tue Mar 29, 2016 4:40 pm
by Stef31
Datasets 1 :
Code: Select all
;25/03/2016;13:32:14;25/03/2016;13:33:43;25/03/2016;13:34:45;
Datasets 2 :
Final Dataset :
Code: Select all
xxxxxx;00122;25/03/2016;13:32:14;25/03/2016;13:33:43;25/03/2016;13:34:45;
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Fri Apr 01, 2016 2:27 pm
by Stef31
Hi,
no idea ?
I search aout JOINKEYS, but I don't find a solution because I don't have a key between my two files...
Re: Batch : concatenation (File1 Column) x | (File2 colum y)
Posted: Fri Apr 01, 2016 6:17 pm
by Chandan Yadav
Hi,
How you are going to decide which record of file 2 you are going to consider for populating it in File 1?
Thanks and regards,
Chandan