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

Read/Write 10 records alternately


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

New User


Joined: 09 Jan 2008
Posts: 1
Location: bangalore

PostPosted: Sat Jan 26, 2008 12:19 pm
Reply with quote

I need to read first 10 records, then store it into new file, likewise next ten records store into new file.
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: Sat Jan 26, 2008 11:21 pm
Reply with quote

You can use a DFSORT job like this to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
...
//OUTn DD DSN=...  output filen
//SYSIN    DD    *
  OUTFIL SPLIT1R=10,
    FNAMES=(OUT11,OUT2,...,OUTn)
/*


For more information on various ways to split input files with DFSORT, see the "Split a file to n output files dynamically" and "Five ways to split a data set" Smart DFSORT Tricks at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Error to read log with rexx CLIST & REXX 11
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
Search our Forums:

Back to Top