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

How to get Odd/Even # record from a flat file using SORT?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Jul 04, 2006 3:35 pm
Reply with quote

Hi,

Assuming we have flat file with 100 records......

My requirement is to copy records positioned in odd # (like 1,3, etc...) into one file and even positioned records into another file using SORT tool.

Please note, no column/variable in the record has these values.

Thanks in advance!!!!

Regards,
Murali Mohan K
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue Jul 04, 2006 4:30 pm
Reply with quote

check out the following jcl.....

Code:

//S1    EXEC  PGM=ICEMAN                 
//SYSOUT    DD  SYSOUT=*                 
//SORTIN DD DSN=... input file                             
//ODD DD DSN=...  output file1 (odd records)                         
//EVEN DD DSN=...  output file2 (even records)                       
//SYSIN DD *                             
  SORT FIELDS=COPY                       
  OUTFIL FNAMES=(ODD,EVEN),SPLIT         
/*     


Hope this helps......

Regards,
jai
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Jul 04, 2006 5:02 pm
Reply with quote

Thanks for your help!!!!
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
Search our Forums:

Back to Top