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
 

 

Copy first 1000 records into output file

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

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Fri Dec 29, 2006 1:16 am    Post subject: Copy first 1000 records into output file
Reply with quote

Hi,
I need to copy first 1000 records from a sequential file - FileA to File B,
then I have to copy 2000 to 3000 records to file C.
I did this few yrs back using IEBGENER, but completely washed out from my mind now...can anyone help me plsss...

Any utitility is fine icon_biggrin.gif

Viji
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Dec 29, 2006 1:34 am    Post subject:
Reply with quote

DFSMS/MVS V1R5 Utilities
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/dgt1u104/CCONTENTS
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Fri Dec 29, 2006 1:47 am    Post subject: Re: Copy first 1000 records into output file
Reply with quote

I tried going thru the link even before posting my question but couldnot nail down exactly.
Any guidance to the utility or the control statement will be of great help.
Thanks,
Viji
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Dec 29, 2006 2:00 am    Post subject: Re: Copy first 1000 records into output file
Reply with quote

I don't know where in IEBGENER you can select records based on a count. Usually, most folks use SORT (see many examples in the DFSORT Forum) or IDCAMS (the COUNT parameter of REPRO).
Back to top
View user's profile Send private message
vijikesavan

Active User


Joined: 04 Oct 2006
Posts: 118
Location: NJ, USA

PostPosted: Fri Dec 29, 2006 2:24 am    Post subject: Re: Copy first 1000 records into output file
Reply with quote

IDCAMS worked.
Thanks for your time Superk and William Thompson
-Viji
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: Fri Dec 29, 2006 5:18 am    Post subject:
Reply with quote

You can put the first 1000 records in one output file and the rest of the records in another output file using this DFSORT job:

Code:

//S1 EXEC PGM=ICEMAN
//SYSOUT    DD SYSOUT=*
//SORTIN DD DSN=...  input file
//OUT1 DD DSN=...    output file1 (first 1000 records)
//OUT2 DD DSN=...    output file2 (rest of records)
//SYSIN  DD  *
   OPTION COPY
   OUTFIL FNAMES=OUT1,ENDREC=1000
   OUTFIL FNAMES=OUT2,SAVE
/*

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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am


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