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
 

 

Condition to be included in Spilt1r

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anitha Sekar

New User


Joined: 17 Jan 2009
Posts: 5
Location: Chennai

PostPosted: Tue Jul 02, 2013 12:44 pm    Post subject: Condition to be included in Spilt1r
Reply with quote

I have to split the input file in to 10 output files based on the number of records present in the input file. please provide me the jcl
Back to top
View user's profile Send private message

Pandora-Box

Moderator


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

PostPosted: Tue Jul 02, 2013 12:55 pm    Post subject:
Reply with quote

Quote:
based on the number of records present in the input file


What is the basis to split the data ?

Quote:
please provide me the jcl


Didnt you search forum?

And what is the sort product you use
Back to top
View user's profile Send private message
Anitha Sekar

New User


Joined: 17 Jan 2009
Posts: 5
Location: Chennai

PostPosted: Tue Jul 02, 2013 1:22 pm    Post subject: Reply to: Condition to be included in Spilt1r
Reply with quote

for example, if i am having 40000 records. first 4000 records should go into 1st file, second 4000 into 2nd file,etc

If i am having 50000 records,first 5000 records should go into 1st file.

I searched it. But i didn't find anything.As it is urgent, I have posted it here.
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: Tue Jul 02, 2013 1:49 pm    Post subject:
Reply with quote

Unfortunately the only URGENT is yours

It would also help if you actually answered the question regarding the sort product being used that Pandora has asked.

I have just done a quick search on the forum for your question and had 150+ hits.
Back to top
View user's profile Send private message
Anitha Sekar

New User


Joined: 17 Jan 2009
Posts: 5
Location: Chennai

PostPosted: Tue Jul 02, 2013 1:58 pm    Post subject:
Reply with quote

sort,sychsort,iceman,icetool are the sort product being used
Back to top
View user's profile Send private message
Pandora-Box

Moderator


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

PostPosted: Tue Jul 02, 2013 2:08 pm    Post subject:
Reply with quote

Anitha,

I guess you use SYNCSORT

Try this

Code:
 SORT FIELDS=COPY
 OUTFIL FNAMES=(OUT1,OUT2,OUT3,OUT4,OUT5,OUT6,OUT7,OUT8,OUT9,OUT10),SPLIT


But its sad that you are being very naive for not searching which is at very reach icon_sad.gif icon_sad.gif icon_sad.gif icon_sad.gif icon_sad.gif

Code'd
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Tue Jul 02, 2013 3:31 pm    Post subject:
Reply with quote

Anitha Sekar,

With SPLIT, rec1 from input goes to output1, rec2 goes to output2 and so on. Is that what you are expecting?

Quote:
if i am having 40000 records. first 4000 records should go into 1st file, second 4000 into 2nd file,etc

If i am having 50000 records,first 5000 records should go into 1st file
For this, you might need to find the total count and divide by 10 to obtain 'n' and generate a dynamic sort card with SPLIT1R=n
Back to top
View user's profile Send private message
Anitha Sekar

New User


Joined: 17 Jan 2009
Posts: 5
Location: Chennai

PostPosted: Tue Jul 02, 2013 5:23 pm    Post subject:
Reply with quote

Hi Arun,

I have to find the count the number of records present in input file and divide by 10 to put it into 10 output files.

Please help me on this..
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: Tue Jul 02, 2013 5:37 pm    Post subject:
Reply with quote

Is there any perticular reason why the solution given by Pandora is not acceptable.

That way you do not need to know anything about record counts at all.

Perhaps if you had given a wider view of the problem, an explanation why they must be in consecutive chunks, then that information would help people help you without wasting time and effort.

Quote:
please provide me the jcl

This is a HELP forum rather than a DO IT FOR ME forum, but as has been said many times before, if you demand code please be prepared to pay the going rate for the code.

Please show us what you have tried and what the results were.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Tue Jul 02, 2013 5:46 pm    Post subject: Reply to: Condition to be included in Spilt1r
Reply with quote

Pandora' s solution will split data with a <rotating> scheme

and that might not be what the TS wants

but if the TS does not tell we will never know icon_cool.gif
Back to top
View user's profile Send private message
Pandora-Box

Moderator


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

PostPosted: Tue Jul 02, 2013 6:44 pm    Post subject:
Reply with quote

My solution will not work as per the requirement but TS needs to implement what Arun has said

My solution will just be an example for the Urgent TS
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Jul 03, 2013 1:22 am    Post subject: Reply to: Condition to be included in Spilt1r
Reply with quote

Have a look at this one from the Beginner's site. It was there this morning, you could have had the thing finished before you even posted if it was that urgent.

I haven't checked, but I'm sure there are other examples which are easy to find and apply.
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: Wed Jul 03, 2013 6:08 am    Post subject:
Reply with quote

Hello,

The way to do this using the least machine resources is to have the process that created the whole file create another dataset that has the record count.

Then read the record cont file and generate the OUTFIL statement.

Run the split.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts INCLUDE condition questions van bui DFSORT/ICETOOL 1 Thu Jun 30, 2016 9:52 am
No new posts 2 vsam file compare and update a fiel... ABINAYATHULASI DFSORT/ICETOOL 6 Sun May 29, 2016 11:15 am
No new posts OUTREC RDW NOT INCLUDED krsenthil85 SYNCSORT 10 Fri May 06, 2016 3:22 am
No new posts File matching using specific condition mf_karthik DFSORT/ICETOOL 3 Fri Nov 20, 2015 11:04 pm


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