View previous topic :: View next topic
|
Author |
Message |
santoshks0611
New User
Joined: 18 Apr 2013 Posts: 10 Location: India
|
|
|
|
Hi,
I need to copy selective columns from 7 input files to a single output file. All the seven input files contains data from the same table but split in seven different files. Hence I have first merged the 7 files. Then using INREC for the columns required. But the job is taking a lot of time. Can anybody help to do this task faster.
My input file layout is
Company id Pic X(2)
Policy id Pic X(10)
Upd-User-Id Pic X(8)
Timestamp Pic X(26)
.
.
.
.
.
Agent-d Pic X(10)
.
.
.
.
Thanks a ton! |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
You need to define "a lot of time" a little better - are you talking about CPU or elapsed time?
Why do you have seven different files for the data from same table? If they all have different data (may be because of different SELECT and WHERE) -- possibly, you can have seven different SORT-Jobs and then merge the outputs of SORT-Jobs, no? |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
If the seven files contain data of the same fields and in same order then you dont need to merge the input
Just concatenate all the 7 files and sort and select the fields required |
|
Back to top |
|
|
santoshks0611
New User
Joined: 18 Apr 2013 Posts: 10 Location: India
|
|
|
|
Hi, Thanks for the reply.
Yes the job is taking much CPU time. Initially i got SB37 abend. But when I increased the size of the output merged file, it got resolved. Actually I do not need all the data of the merged file but still I had to allocate lot of size for merged file. Hence I wanted to know if is possible to do this task without merging.
All the files have same data, but from different regions. So all the files contain similar data. Thanks. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Yes it is possible to select the needed fields without Merge |
|
Back to top |
|
|
santoshks0611
New User
Joined: 18 Apr 2013 Posts: 10 Location: India
|
|
|
|
Hi Pandora-Box, Thanks for the reply.
Could you please tell me which command can be used here. How to Concatenate, sort and select only required fields. Thanks. |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
I would suggest you to read the manuals
And Look for INCLUDE COND to select the fields needed by providing the position & SORT FIELDS to sort the fields in th order you need by providing position |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Well NO
You have given us absolutely zero useful information to even begin to suggest any halpful advice. |
|
Back to top |
|
|
santoshks0611
New User
Joined: 18 Apr 2013 Posts: 10 Location: India
|
|
|
|
Hi, Ok. Here is an example of what i need.
Code: |
File1:
AA1111USER2013-03-01-20.31.25.956466...AGENT1SERV1...
AA1112USER2013-03-01-20.31.25.956466...AGENT2SERV1...
AA1113USER2013-03-01-20.31.25.956466...AGENT2SERV1...
File2:
BB1111USER2013-03-01-20.31.25.956466...AGENT1SERV1...
BB1112USER2013-03-01-20.31.25.956466...AGENT2SERV1...
BB1113USER2013-03-01-20.31.25.956466...AGENT3SERV1...
File3:
CC1111USER2013-03-01-20.31.25.956466...AGENT1SERV1...
CC1112USER2013-03-01-20.31.25.956466...AGENT2SERV1...
CC1113USER2013-03-01-20.31.25.956466...AGENT3SERV1...
Similar data in File3,4,6 &7
|
I want the output to be in below format:
Code: |
AA1111USER2013-03-01-20.31.25.956466AGENT1
AA1112USER2013-03-01-20.31.25.956466AGENT2
AA1113USER2013-03-01-20.31.25.956466AGENT2
BB1111USER2013-03-01-20.31.25.956466AGENT1
BB1112USER2013-03-01-20.31.25.956466AGENT2
BB1113USER2013-03-01-20.31.25.956466AGENT3
CC1111USER2013-03-01-20.31.25.956466AGENT1
CC1112USER2013-03-01-20.31.25.956466AGENT2
CC1113USER2013-03-01-20.31.25.956466AGENT3
|
All the files from 1 to 7 are already in sorted order. I just have to copy specific columns. Thanks for your interest in helping me. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
OK, so we can look at the output and work out for ourselves exactly what it is that YOU want,
and the rules that select the correct data that YOU know about, but we don't.
You may have to wait a while for any help as I believe that psychic day is Friday this week
Oh but wait ....... I think I feel a column identification coming through |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you post the JCL and sort control statements you are currently using.
It would be most helpful if you post the "rules" for getting from the inout to the output.
I believe all you need is a simple COPY concatenating the input datasets, but cannot be sure until you clarify. |
|
Back to top |
|
|
|