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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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