IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copy first 1000 records into output file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 3156
Location: Tucson AZ

PostPosted: Fri Dec 29, 2006 1:34 am
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
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

Global Moderator


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

PostPosted: Fri Dec 29, 2006 2:00 am
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
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 Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 29, 2006 5:18 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top