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

writing to different files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijayk_hr

New User


Joined: 05 Jul 2005
Posts: 3

PostPosted: Tue Jul 05, 2005 9:57 pm
Reply with quote

I have an input file with 100,000 records. I need to write the first 10000 records to one file, the second 10000 to another, and so on.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 05, 2005 11:19 pm
Reply with quote

1 LAC is 100000 ... right? So that means you need 10 output files with 10000 contiguous records in each. Here's a simple way to do that with DFSORT:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//X1 DD DSN=...  output file1
//X2 DD DSN=...  output file2
//X3 DD DSN=...  output file3
//X4 DD DSN=...  output file4
//X5 DD DSN=...  output file5
//X6 DD DSN=...  output file6
//X7 DD DSN=...  output file7
//X8 DD DSN=...  output file8
//X9 DD DSN=...  output file9
//X10 DD DSN=...  output file10
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=(X1,X2,X3,X4,X5,X6,X7,X8,X9,X10),
    SPLITBY=10000
/*
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
Search our Forums:

Back to Top