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

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

Post 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.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post 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?
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

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

Post by nicc »

Please note that they are not files but datasets. There is a difference.
Regards
Nic
Chandan Yadav
Website Team
Website Team
Posts: 70
Joined: Wed Jul 31, 2013 10:19 pm

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

Post 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
Stef31

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

Post 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)
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

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

Post by enrico-sorichetti »

 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-)
Stef31

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

Post 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 :

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;
Stef31

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

Post 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...
Chandan Yadav
Website Team
Website Team
Posts: 70
Joined: Wed Jul 31, 2013 10:19 pm

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

Post 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
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “You are a Guest.”