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 Splitting one row into multiple Rows ... Rajan Moorthy DFSORT/ICETOOL 9 Mon May 14, 2018 10:58 pm
No new posts MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm

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