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
 

 

Splitting File To 'N' Files.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Kumaresan.nk

New User


Joined: 22 Mar 2010
Posts: 31
Location: Chennai

PostPosted: Wed Jun 23, 2010 2:59 pm    Post subject: Splitting File To 'N' Files.
Reply with quote

Hi,

I have a requirement, where we have a file with a large number of data. The input file is of lenth 500. We have to split this file in to different files depending upon the COMPANY CODE (Length 4). But there is no definite number of company codes. That is we can get 4 types of company code one day and the other day there might be 10 types of company codes. The company code might range from 0001 to 9999. I went thru the previous topics of dynamic allocation, but cdn't find anything useful related to my requirement.

Please help me how to get this done.
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 Jun 23, 2010 3:17 pm    Post subject:
Reply with quote

If you have DFSORT installed, click HERE to get an idea.

Not sure why this was moved from JCL to DFSORT without first establishing the sort product being used.

Because the solution for sort related questions may vary from product to product, please ensure that you state clearly which sort product you are using.

If you are not sure, then by running a simple sort step shown below, you will be able to find out for yourself.

If the messages start with ICE then your product is DFSORT. Please also post the output of the complete line which has a message code ICE201I, as this will enable our DFSORT experts to determine which release of DFSORT that you have installed. This may also affect the solution offered.

If the messages start with WER or SYT then the product is SYNCSORT and the topic will be moved into the JCL forum by one of the moderators. Please also post the information telling which version of SYNCSORT is installed, as this may also affect the solution offered.

Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Jun 23, 2010 3:20 pm    Post subject: Reply to: Splitting File To 'N' Files.
Reply with quote

You will have to make a pass through the data and determine how many different COMPANY CODE's it contains. You will have to then build a set of matching SORT control parameters and the matching DD statements. These will all have to be used in a subsequent job to actually perform the split.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 23, 2010 3:44 pm    Post subject:
Reply with quote

this question has only been asked and answered about 10 times on this board.

I am as lazy as the TS and will not bother to search.

and using 'dynamic allocation' as keywords in a search for sort
is dumber than mud.

since the TS has not bothered to provide enough info for a 'custom' solution,
he/she should look at DFSORT Tricks
look for Split a file to n output files dynamically.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 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


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