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
 
Copying particular records to new PS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Balram Akade
Currently Banned

New User


Joined: 17 Mar 2007
Posts: 4
Location: Pune

PostPosted: Tue Mar 20, 2007 11:37 pm    Post subject: Copying particular records to new PS
Reply with quote

Lets suppose i have 7 records in a PS. I want to copy first 2 records to a new PS, next 2 records to another PS & remaining records in a third PS.
Plz can anybody tell me the JCL code to do this task?
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: Tue Mar 20, 2007 11:47 pm    Post subject:
Reply with quote

If you have the April, 2006 DFSORT PTF you can do it like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//OUT3 DD DSN=...  output file3
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=(OUT1,OUT2,OUT3),SPLIT1R=2
/*


If you don't have the April, 2006 DFSORT PTF, you can do it like this:

Code:

//S2    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file
//OUT1 DD DSN=...  output file1
//OUT2 DD DSN=...  output file2
//OUT3 DD DSN=...  output file3
//SYSIN    DD    *
  OPTION COPY
  OUTFIL FNAMES=OUT1,ENDREC=2
  OUTFIL FNAMES=OUT2,STARTREC=3,ENDREC=5
  OUTFIL FNAMES=OUT3,SAVE
/*


If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top
View user's profile Send private message
Balram Akade
Currently Banned

New User


Joined: 17 Mar 2007
Posts: 4
Location: Pune

PostPosted: Wed Mar 21, 2007 12:21 am    Post subject: Re: Copying particular records to new PS
Reply with quote

Thanks Frank,


i think this code will definately help me.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts String after '.' (period) is not copy... balaji81_k SYNCSORT 6 Wed Aug 23, 2017 9:35 pm
No new posts copying data without knowing location Arun Raj DFSORT/ICETOOL 12 Thu Jul 20, 2017 1:03 pm
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am

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