Batch : concatenation (File1 Column) x | (File2 colum y)

This Forum is for the guests or the users who are not registered on this board. This part allows guests to post in.
Previous topicNext topic

Topic author
Stef31

Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Stef31 » Fri Mar 25, 2016 9:29 pm

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.



User avatar

Anuj Dhawan
Founder
Posts: 2413
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Anuj Dhawan » Fri Mar 25, 2016 10:24 pm

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?


Thanks,
Anuj


nicc
Global Moderator
Global Moderator
Posts: 546
Joined: Wed Apr 23, 2014 8:45 pm

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by nicc » Sat Mar 26, 2016 5:07 pm

Please note that they are not files but datasets. There is a difference.


Regards
Nic


Chandan Yadav
Website Team
Website Team
Posts: 69
Joined: Wed Jul 31, 2013 10:19 pm

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Chandan Yadav » Mon Mar 28, 2016 9:45 am

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




Topic author
Stef31

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Stef31 » Tue Mar 29, 2016 2:16 pm

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)




enrico-sorichetti
Global Moderator
Global Moderator
Posts: 834
Joined: Wed Sep 11, 2013 3:57 pm

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by enrico-sorichetti » Tue Mar 29, 2016 3:33 pm

 repost Your data without colours and using only the CODE tags


cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)


Topic author
Stef31

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Stef31 » Tue Mar 29, 2016 4:40 pm

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 :

Code: Select all

V V0012220160318
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;




Topic author
Stef31

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Stef31 » Fri Apr 01, 2016 2:27 pm

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...




Chandan Yadav
Website Team
Website Team
Posts: 69
Joined: Wed Jul 31, 2013 10:19 pm

Re: Batch : concatenation (File1 Column) x | (File2 colum y)

Post by Chandan Yadav » Fri Apr 01, 2016 6:17 pm

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



Previous topicNext topic

Return to “You are a Guest.”