Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Split files upto certain limit based ... bubbu75 DFSORT/ICETOOL 5 Tue Nov 14, 2017 11:11 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us