MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any option other than INCLUDE

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Dip
Beginner


Joined: 24 Mar 2006
Posts: 27
Topics: 14

PostPosted: Thu Apr 26, 2007 12:50 am    Post subject: Any option other than INCLUDE Reply with quote

Input file:

Key field value
000000000000000011
001000000000000111
002000000000000211
003000000000000311
---------------------------------
---------------------------------
999000000000099911
000000000000100011
001000000000100111
---------------------------------
---------------------------------
999000000000199911


i want to
1. Sort / Split the file into 50 files based on the first 3 digit from the left
2. 000--> 019 (FIle1) 020-->039 (File2)
Back to top
View user's profile Send private message Yahoo Messenger
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Apr 26, 2007 1:38 am    Post subject: Re: Any option other than INCLUDE Reply with quote

You can see the ways of splitting a file in the below smart DFSORT tricks link.
http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/

e.g from the above link:

You can split the file based on STARTREC and ENDREC as shown in the example below if you don't want to use INCLUDE.


Code:
//RANGE EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Y897797.INPUT2,DISP=OLD
//FRONT DD DSN=Y897797.RANGE1,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//MIDDLE DD DSN=Y897797.RANGE2,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//BACK DD DSN=Y897797.RANGE3,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//SYSIN DD *
  OPTION COPY
  OUTFIL FNAMES=FRONT,ENDREC=500
  OUTFIL FNAMES=MIDDLE,STARTREC=511,ENDREC=2205
  OUTFIL FNAMES=BACK,STARTREC=2206


Last edited by vkphani on Thu Apr 26, 2007 1:46 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Thu Apr 26, 2007 1:41 am    Post subject: Reply with quote

If you want an EZT solution, check Kolusu's reply in the below link.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2666&highlight=split+file+output+files
Back to top
View user's profile Send private message Send e-mail
sreedhar_k
Beginner


Joined: 24 May 2006
Posts: 6
Topics: 1

PostPosted: Thu Apr 26, 2007 5:22 am    Post subject: Reply with quote

Good EZT solution. Thanks for the link.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group