Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Copy selective data from various files into one output file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Copy selective data from various files into one output file
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

Senior Member


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

PostPosted: Wed May 08, 2013 10:25 am    Post subject:
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

Moderator


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

PostPosted: Wed May 08, 2013 10:27 am    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Wed May 08, 2013 10:34 am    Post subject:
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    Post subject:
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

Moderator


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

PostPosted: Wed May 08, 2013 10:44 am    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 08, 2013 1:31 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 08, 2013 2:52 pm    Post subject:
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

Site Director


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

PostPosted: Thu May 09, 2013 12:00 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us