Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us