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 Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 6 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am

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