View previous topic :: View next topic
|
Author |
Message |
abc.dilip
New User
Joined: 10 Jun 2009 Posts: 1 Location: Bangalore
|
|
|
|
I have 500 records in PS file, So i want to read the records from 200 to 300 and write it into a ouput file via COBOL program? So how to implement this logic? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
what have You thought about ??
post and we' ll be glad to discuss Your solution |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Don't know why you don't use sort to do this, far easier and quicker. |
|
Back to top |
|
|
Jag
New User
Joined: 07 Dec 2005 Posts: 30 Location: India
|
|
|
|
Yeah..as above friend said Sort is efficient solution for getting this job done..If you definetly want to use the Cobol.
Read the file using Perform until by incremanting the value of the varible and compare if the value reaches ther 200..If its below 200 do continue and read next record..If its more than 200 and below 300..process the record...You can change the value '200' and '300' by passing it from JCL. |
|
Back to top |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
As suggested by expat use sort. easier and quicker..
use:
SKIPREC=n
STOPAFT=n |
|
Back to top |
|
|
|