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: 4650
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: 6968
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 Match two files using multiple keys a... santoshks1987 SYNCSORT 10 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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