IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy selective data from various files into one output file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
santoshks0611

New User


Joined: 18 Apr 2013
Posts: 10
Location: India

PostPosted: Wed May 08, 2013 9:32 am
Reply with quote

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! icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed May 08, 2013 10:25 am
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed May 08, 2013 10:27 am
Reply with quote

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
View user's profile Send private message
santoshks0611

New User


Joined: 18 Apr 2013
Posts: 10
Location: India

PostPosted: Wed May 08, 2013 10:31 am
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed May 08, 2013 10:34 am
Reply with quote

Yes it is possible to select the needed fields without Merge
Back to top
View user's profile Send private message
santoshks0611

New User


Joined: 18 Apr 2013
Posts: 10
Location: India

PostPosted: Wed May 08, 2013 10:38 am
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Wed May 08, 2013 10:44 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 08, 2013 1:31 pm
Reply with quote

Well NO

You have given us absolutely zero useful information to even begin to suggest any halpful advice.
Back to top
View user's profile Send private message
santoshks0611

New User


Joined: 18 Apr 2013
Posts: 10
Location: India

PostPosted: Wed May 08, 2013 1:45 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 08, 2013 2:52 pm
Reply with quote

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 icon_rolleyes.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 09, 2013 12:00 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
Search our Forums:

Back to Top