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

How to copy the first 10 lines of a file of LRECL = 80 ???


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

New User


Joined: 28 Nov 2007
Posts: 63
Location: Chennai

PostPosted: Wed Feb 11, 2009 1:38 pm
Reply with quote

Hi,

I need to copy the First 10 lines of a file which contains 100 records.

Can anyone please suggest hw to achieve this ?
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Feb 11, 2009 1:40 pm
Reply with quote

Quote:

Can anyone please suggest hw to achieve this ?

you can do it using sort utility.... icon_smile.gif
Back to top
View user's profile Send private message
Niki

Active User


Joined: 20 Sep 2008
Posts: 106
Location: Bangalore

PostPosted: Wed Feb 11, 2009 2:23 pm
Reply with quote

Hi,

Can i have some sample sort card which can do the task.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Feb 11, 2009 2:25 pm
Reply with quote

Niki wrote:
Hi,
Can i have some sample sort card which can do the task.

Search the forum, discussed quite a few times.
Also try to read the manual - clue - STOPAFT
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed Feb 11, 2009 2:27 pm
Reply with quote

You can use REPRO COMMAND of IDCAMS with COUNT option.
Back to top
View user's profile Send private message
siva102

New User


Joined: 28 Nov 2007
Posts: 63
Location: Chennai

PostPosted: Wed Feb 11, 2009 3:26 pm
Reply with quote

Hi Expat,

Thanks for the Clue.

It worked.

Code:

//SYSIN DD *           
     SORT FIELDS=COPY, 
     STOPAFT=5         
/*                     
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 Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts WER247A SORTOUT HAS INCOMPATIBLE LRECL SYNCSORT 7
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top