×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Flat File contineuos read

Flat File contineuos read

Flat File contineuos read

(OP)
Hi,

I am hoping that some experts in the field would be able to point me in a direction. I have modified many cobol programmes by adjusting the logic or adding reads or writes to similar type files. I would not consider myself a cobol expert but I should be able to follow a cobol converstaion.

I have a site where a screen creates an ascii Flat File (sequiental) I have no control over the screen and cannot modify it. I need to read this flat file and produce an output file. The issue is I only want to read from the last record I have read. So as the records are read by the cobol the screen could be adding records so I need to remain at the last record until the next record is entered in the flat file. There is no key on the file.

Is it possible to read from the last record read and if there is another record process it if not trigger a read again.

I was wondering if this logic was possible within Cobol or if anybody had done something similar. The environment is a HP3000 operating mpe/ix.

thanks in advance.

Anne

RE: Flat File contineuos read

You dont mention how big this file is or how timely you need to be in reading the next record. For one thing you could simply read the file over and over, keeping track of the last record number read and then making sure you are reading past that record number for subsequent loops beyond the first pass. You could also possibly structure a script that copies the file, compares the file size to the last file size, then calls the program if it is bigger, otherwise it sleeps for a few minutes then repeats the process.  

RE: Flat File contineuos read

You can do this easily with a message file on MPE/iX.  Message file reads simply wait for another record to be written before returning control to the COBOL program.

You may want to pose your question on the HP3000-L newsgroup for further advice.

Regards,

Glenn

RE: Flat File contineuos read

(OP)
Hi

thanks to both of you for your reply. Glen, I cant change the output screen to make it write to a msg file but I will pose the question to the hp300 group to see if there is a way to make the system think it is a msg file. I can't see how but others out there might know.

thanks

Anne

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close