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

Hi,

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)
Thanks
pulcinella
 
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.

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//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
//SYSIN DD *
   OUTFIL SPLIT1R=1000,
      FNAMES=(OUT001,OUT002,OUT003,OUT004,OUT005,OUT006,
           OUT007,OUT008,OUT009,OUT010,OUT011,OUT012)
/*
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
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
    Replies
    Views
    Last post