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
 

 

writing to different files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: writing to different files
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 Moderator


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

PostPosted: Tue Jul 05, 2005 11:19 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm


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