IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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

Moderator


Joined: 07 Sep 2006
Posts: 1566
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: 8794
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

Moderator


Joined: 07 Sep 2006
Posts: 1566
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: 8794
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

Senior Member


Joined: 14 Mar 2007
Posts: 10696
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

Moderator


Joined: 07 Sep 2006
Posts: 1566
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: 7312
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: 19251
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 All times are GMT + 6 Hours
Forum Index -> JCL & VSAM
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts Converting Hex to PD Special Condition SYNCSORT 3
No new posts Print next line strings when a condit... DFSORT/ICETOOL 9
No new posts Using ICETOOL set return code as per ... DFSORT/ICETOOL 4
No new posts Usage of external condition PL/I & Assembler 1
No new posts Create Dynamic Sort card with Omit co... DFSORT/ICETOOL 9

Back to Top