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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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