How Can I Separate one file in others files

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How Can I Separate one file in others files

Postby pulcinella » Wed Dec 26, 2007 1:36 pm


I need separate one file in other files. The 1.000 first records write in the first file, the 1.000 next in the two file. I don't know which are the record's of my file

File1: 1....... 9.000 records

fileOutput: 1... 1.000
fileOutput2: 1.001 .... 2.000 ...
FileOutputX : 8.001 .... 9.000 (or end the file)
Posts: 114
Joined: Mon Dec 10, 2007 10:18 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How Can I Separate one file in others files

Postby Frank Yaeger » Thu Dec 27, 2007 1:10 am

Here's an example of a DFSORT job that will split the input file to 12 output files. You can change the job to use as many output files as you need.

//SORTIN DD DSN=...  input file
//OUT001 DD DSN=...  output file 1
//OUT002 DD DSN=...  output file 2
//OUT003 DD DSN=...  output file 3
//OUT004 DD DSN=...  output file 4
//OUT005 DD DSN=...   output file 5
//OUT006 DD DSN=...  output file 6
//OUT007 DD DSN=...  output file 7
//OUT008 DD DSN=...  output file 8
//OUT009 DD DSN=...  output file 9
//OUT010 DD DSN=...  output file 10
//OUT011 DD DSN=...   output file 11
//OUT012 DD DSN=...  output file 12
Frank Yaeger - DFSORT Development Team (IBM) -
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at
User avatar
Frank Yaeger
Global moderator
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Return to JCL


  • Related topics
    Last post