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
 

 

Need a logic on COBOL file handling concept...

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
abc.dilip

New User


Joined: 10 Jun 2009
Posts: 1
Location: Bangalore

PostPosted: Tue Nov 17, 2009 6:32 pm    Post subject: Need a logic on COBOL file handling concept...
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Nov 17, 2009 6:36 pm    Post subject: Reply to: Need a logic on COBOL file handling concept...
Reply with quote

what have You thought about ??
post and we' ll be glad to discuss Your solution
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: Tue Nov 17, 2009 6:37 pm    Post subject:
Reply with quote

Don't know why you don't use sort to do this, far easier and quicker.
Back to top
View user's profile Send private message
Jag

New User


Joined: 07 Dec 2005
Posts: 30
Location: India

PostPosted: Wed Nov 18, 2009 4:47 pm    Post subject:
Reply with quote

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
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Wed Nov 18, 2009 6:54 pm    Post subject:
Reply with quote

As suggested by expat use sort. easier and quicker..


use:
SKIPREC=n
STOPAFT=n
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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