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

Copy some lines of a file to another


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gabriel.ryoga

New User


Joined: 07 Jun 2007
Posts: 31
Location: Spain

PostPosted: Thu Feb 28, 2008 2:35 pm
Reply with quote

I need to know how can I copy some lines of one really big file to another.

The original file has millions of lines and I need to copy from one line to the last. (around 1000 lines)

I need something to copy from one line to another.
Back to top
View user's profile Send private message
SCARCEBOYZ

New User


Joined: 16 May 2005
Posts: 32
Location: Millenium Business Park, Mumbai

PostPosted: Thu Feb 28, 2008 3:08 pm
Reply with quote

Whats a big deal in this.You can use IDCAMS Utility and you can give the number of records to copy or skip.
Back to top
View user's profile Send private message
gabriel.ryoga

New User


Joined: 07 Jun 2007
Posts: 31
Location: Spain

PostPosted: Thu Feb 28, 2008 3:29 pm
Reply with quote

How can I make that??, can you post the job card??
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 28, 2008 3:32 pm
Reply with quote

Look at IDCAMS REPRO and all will be revealed.
Back to top
View user's profile Send private message
gabriel.ryoga

New User


Joined: 07 Jun 2007
Posts: 31
Location: Spain

PostPosted: Thu Feb 28, 2008 3:36 pm
Reply with quote

Ok, thankyou very much,

I've found that I can skip a number of files and then copy just the number that I want.

REPRO -
SKIP(99) -
COUNT(500)


Thanks for the help!
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu Feb 28, 2008 8:45 pm
Reply with quote

Any sort can do the same.....
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: Thu Feb 28, 2008 10:08 pm
Reply with quote

You can use a DFSORT job like the following:

Code:

//S1 EXEC PGM=ICEMAN                       
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD DSN=...  input file
//SORTOUT DD DSN=...  output file             
//SYSIN    DD *                           
  OPTION COPY,SKIPREC=99,STOPAFT=500       


SORTOUT would have lines 100 to 599.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Feb 28, 2008 11:02 pm
Reply with quote

Hi,

You can use file-aid as well, command is TSO MYCOPY. Use "T" in 'Selection criteria usage' (Temporary) and then follow the instruction on screen.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top