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 some lines of a file to another

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copy some lines of a file to another
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Feb 28, 2008 3:32 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

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

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

Senior Member


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

PostPosted: Thu Feb 28, 2008 11:02 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Split file based on comparsion to 2 f... Div Grad DFSORT/ICETOOL 3 Thu Jul 27, 2017 9:16 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm


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