View previous topic :: View next topic
|
Author |
Message |
kbmkris
Active User
Joined: 24 Jun 2006 Posts: 101
|
|
|
|
hi,
In the below code, the VSAM file is initially opened in the output mode and then it is closed in the next line itself. after that it is again opened in the i-o mode. Please let me know why the vsam file is opened like this?
Code: |
OPEN OUTPUT FE-VSAM-FILE.
CLOSE FE-VSAM-FILE.
OPEN I-O FE-VSAM-FILE. |
Can anyone tell me how to look for the documents in this forum? I need some document to understand the VSAM file handling in COBOL.
Thanks,
Bala |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
The initial open/close is to prevent a possible error when the file is opened i-o.
If you click on the "Manuals" link at the top of the page, you will see a list of links to the current IBM product manuals. There is a VSAM services manual and several COBOL manuals. Coding info is in the COBOL manuals. |
|
Back to top |
|
|
kbmkris
Active User
Joined: 24 Jun 2006 Posts: 101
|
|
|
|
dick,
Could you tell me what you are referring as a possible error?
Thanks for the manual information.
Thanks,
Bala |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome
When a "new" vsam file is opened without being "initialized" an error is raised (don't recall exactly which one just now, but i believe it is mentioned in some other topics). Opening/closing the file as output prevents the i-o open from being confused. |
|
Back to top |
|
|
kbmkris
Active User
Joined: 24 Jun 2006 Posts: 101
|
|
|
|
Thanks dick:-) I will refer the manual and come back if i am not able to get clear. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Someone will be here |
|
Back to top |
|
|
|