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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am


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