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
 
splitting ODD and EVEN records using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: splitting ODD and EVEN records using SYNCSORT
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    Post subject: Re: splitting ODD and EVEN records using DFSORT
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    Post subject:
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 Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Mon May 07, 2007 8:33 pm    Post subject:
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    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 Merging records, but not all the time prino DFSORT/ICETOOL 3 Sat Feb 17, 2018 4:20 pm
No new posts Need all records with high key kalidasvs SYNCSORT 13 Fri Feb 09, 2018 10:38 pm
No new posts Why is SORT rearranging records that ... cschablow DFSORT/ICETOOL 4 Wed Jan 24, 2018 10:14 pm
No new posts Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm

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