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

Condition to be included in Spilt1r


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Tue Jul 02, 2013 12:55 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Tue Jul 02, 2013 1:49 pm
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
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

Global Moderator


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

PostPosted: Tue Jul 02, 2013 2:08 pm
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: 2481
Location: @my desk

PostPosted: Tue Jul 02, 2013 3:31 pm
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
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: 8796
Location: Welsh Wales

PostPosted: Tue Jul 02, 2013 5:37 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Jul 02, 2013 5:46 pm
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

Global Moderator


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

PostPosted: Tue Jul 02, 2013 6:44 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Jul 03, 2013 1:22 am
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

Moderator Emeritus


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

PostPosted: Wed Jul 03, 2013 6:08 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Add condition to a FINDREP SORT card DFSORT/ICETOOL 4
No new posts To Omit records based n SORT condition DFSORT/ICETOOL 6
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts How to give complex condition in JCL . CLIST & REXX 30
No new posts selectively copy based on condition DFSORT/ICETOOL 3
Search our Forums:

Back to Top