147 Wrong Open Mode or Access Mode for Read/start
INTELLIGENT Work FORUMS
FOR Computer PROFESSIONALS
Contact US
Thanks. We have received your request and volition respond promptly.
Log In
Come up Join Us!
Are you a
Computer / IT professional person?
Bring together Tek-Tips Forums!
- Talk With Other Members
- Be Notified Of Responses
To Your Posts - Keyword Search
- I-Click Access To Your
Favorite Forums - Automated Signatures
On Your Posts - Best Of All, It's Free!
*Tek-Tips's functionality depends on members receiving due east-post. Past joining you are opting in to receive e-mail.
Posting Guidelines
Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Students Click Here
Write ErrorWrite Error(OP) Hi my name is Cinthia , i am in my beginning semester of COBOL and in chpt 2 of the Shelly Cashman book Structures COBOL Programming. I am trying to run a report and i go the mistake message "wrong open way or access way for write [error 148]. I have compiled and there are no syntax errors , but when i press run i get that fault. Any suggestions? This is very very new to me Ruby-red Flag SubmittedGive thanks you lot for helping keep Tek-Tips Forums gratis from inappropriate posts. |
Join | Advertise
Copyright © 1998-2022 engineering.com, Inc. All rights reserved.
Unauthorized reproduction or linking forbidden without expressed written permission. Registration on or use of this site constitutes acceptance of our Privacy Policy.
Join Tek-Tips® Today!
Join your peers on the Internet's largest technical computer professional community.
It's easy to bring together and it's gratis.
Hither's Why Members Love Tek-Tips Forums:
-
Talk To Other Members - Notification Of Responses To Questions
- Favorite Forums One Click Access
- Keyword Search Of All Posts, And More...
Annals now while it's withal gratuitous!
Already a member? Shut this window and log in.
Join Us Close
Source: https://www.tek-tips.com/viewthread.cfm?qid=54160
RE: Write Error
Cinthia,
i don't know which compiler you use, or on which platform, merely finding out what that "Error 148" means is a practiced commencement.
Some possible causes: did you Open the file you are writing to before the get-go WRITE ? And if so, did y'all Open up for OUTPUT ?
RE: Write Error
(OP)
I am using Win 98. Dont you open by going to open for execution? Then i click RUN. Maybe i'1000 doing it all wrong and my instructer wont help at all.
RE: Write Mistake
Cinthia,
When y'all say 'Dont you open past going to open for execution?' it looks like you are refering to the actually running of the program and not where your problem is (ie. in your code).
You lot need to look at (i) the 'Select' argument(s) in your Environment Segmentation and make sure you have the correct file access mode (sequential, dynamic, whatever). Then (two)make sure the 'open' statement(s) for the file(south) are correct (eg. you don't desire to open for input when you are going to write to the file). Finally check (3) the file access statements (write, read, any) in your procedure sectionalization. It looks like yous have a mismatch betwixt (i), (2) and (three).
Good Luck
RE: Write Error
Cinthia,
just to add to what kfmason said:
is your program supposed to read from or write to a file?
If it's reading, and suppose your file is chosen INPUT-FILE (in the source), yous should find:
- in the INPUT-OUTPUT SECTION, something like
SELECT INPUT-FILE ASSIGN TO ... (i don't no what that is, but i'thou sure you lot exercise)
- in the FILE Section, somthing like
FD INPUT-FILE
...
01 INPUT-Record ...
...
- somewhere in the PROCEDURE Partition:
...
Open INPUT INPUT-FILE. (This is the Open argument i mentioned earlier)
...
READ INPUT-FILE.
...
Shut INPUT-FILE.
For output files, that is files you write to, it's basically the aforementioned, except the procedure division bit:
...
Open up OUTPUT OUTPUT-FILE.
...
WRITE OUTPUT-Record.
...
Shut OUTPUT-FILE.
...
So, in short: you take to employ the Open argument to really open the file for use within the program. If y'all don't, or not correctly, you'll become the mistake you mentioned.
Proficient luck !