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

splitting ODD and EVEN records using SYNCSORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
raam_kumar

New User


Joined: 25 Apr 2007
Posts: 44
Location: chennai, India

PostPosted: Mon May 07, 2007 1:55 pm
Reply with quote

Hi
I have the following requirement. I have to sort a file and split it into two output files as given below. Could any one please help me

Input:

000001abc0126d
000002abc0126d
000003abc0126d
000004abc0126d

output: (file-1)
000001abc0126d
000003abc0126d

(file-2)
000002abc0126d
000004abc0126d
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Mon May 07, 2007 2:10 pm
Reply with quote

Raam Kumar.R

What field do you want to sort and do you mean you want to create a file with pair records and an other file with impairs ?

Alain
Back to top
View user's profile Send private message
raam_kumar

New User


Joined: 25 Apr 2007
Posts: 44
Location: chennai, India

PostPosted: Mon May 07, 2007 2:12 pm
Reply with quote

Hi
After posting this i tried and found a way to do this. Here is the code which i used

Code:

//ICETOOL  EXEC PGM=ICETOOL   
//TOOLMSG  DD SYSOUT=*       
//DFSMSG   DD SYSOUT=*       
//TOOLIN   DD *               
  COPY FROM(INPUT) USING(SPUB)
//INPUT    DD DISP=SHR,DSN=<input dataset name>
//OUT1     DD  DSN=<output dataset name>
//             DISP=(,CATLG,DELETE),                               
//             SPACE=(CYL,(500,50),RLSE)
//OUT2     DD  DSN=<output dataset name>
//             DISP=(,CATLG,DELETE),                             
//             SPACE=(CYL,(500,50),RLSE)
//SYSOUT   DD SYSOUT=*           
//SPUBCNTL DD *                   
   OUTFIL FNAMES=(OUT1,OUT2),SPLIT


Please if some one knows any other method let me know
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: Mon May 07, 2007 8:33 pm
Reply with quote

Quote:
Please if some one knows any other method let me know


Why - what's wrong with that method? What are you trying to accomplish that it doesn't?

Note that you could use DFSORT directly for this rather than ICETOOL, but it would accomplish the same thing.
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 -> JCL & VSAM

 


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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top