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 Comparing 2 Files using Current time arunsoods DFSORT/ICETOOL 3 Fri Sep 22, 2017 6:00 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm

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