IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to break one file into multiple file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
navs81

New User


Joined: 21 Jun 2005
Posts: 3
Location: delhi

PostPosted: Fri Apr 06, 2007 11:39 am
Reply with quote

I have one file which needs to be broken into 13 different files on the basis of some value.
The value is contained by original file in the form of rows.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Apr 06, 2007 1:02 pm
Reply with quote

Navindra,

DFSORT can be used for this. Here is the sample JCL what you wanted -

Assumption: Your condition starts at column 1, length 10.

Code:
//STEPNAME EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=YOUR.INFILE,DISP=SHR
//*
//COND1 DD DSN=YOUR.FIRST.CONDFILE,DISP=....
//   LRECL=....,SPACE=.....
//*
//COND2 DD DSN=YOUR.SECOND.CONDFILE,DISP=....
//   LRECL=....,SPACE=.....
//*
//COND3 DD DSN=YOUR.THIRD.CONDFILE,DISP=....
//   LRECL=....,SPACE=.....
//*
//SYSIN DD *
  SORT FIELDS=COPY
**
  OUTFIL FNAMES=COND1,
  INCLUDE=(1,10,CH,EQ,C'FIRST COND')
**
  OUTFIL FNAMES=COND2,
  INCLUDE=(1,10,CH,EQ,C'SECND COND')
**
  OUTFIL FNAMES=COND3,
  INCLUDE=(1,10,CH,EQ,C'THRD COND')
/*
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top