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

search for a field in a sequential file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 16, 2007 4:44 am
Reply with quote

Hello Chitra,

Quote:
The search string is in the 3rd record


If the needed record is in the 3rd input record, it should take only a few seconds - if the read/search was terminated on the first "hit". How many records are in the file? I believe most of the time is looking thru the "rest of the file".
Back to top
View user's profile Send private message
gchitra

New User


Joined: 08 Jun 2005
Posts: 36
Location: Burtonsville, MD

PostPosted: Sat Nov 17, 2007 12:29 am
Reply with quote

Thanks Gerry & Dick. I don't think we have a FILEAID utility, but we do have FILEAID option in the ISPF menu panel.

Dick, you are right. Most of the time is spent in looking thru the rest of the file. I manipulated the input file so that first and second record has the search string, only to check if the output is as expected. But as the search starts from byte 125 and moves one byte at a time and the string appears somewhere after byte 450, the job after running for almost 3hrs, finally abended with S322.

I can not think of anything that could better the performance. I would appreciate, if any of you can suggest a better logic.

Thanks
Chitra
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Nov 17, 2007 1:55 am
Reply with quote

Hello Chitra,

I may have missed the answer to this, but how many records will be in the file?

When you say 3 hours, i suspect that is wall-time. How much cpu was used?

Which sort product is used on your system?
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
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
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top