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: 4649
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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