View previous topic :: View next topic
|
Author |
Message |
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
How is OPEN I-O possible on empty VSAM file as we have to read once before writing in I-O mode and as we know we cannot do a read on an empty VSAM file. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Then you have answered your own question.
This has been discussed before, open in write mode, write dummy record, close, open I-O mode delete dummy record. The file is then initialised.
Why, oh why, most sites do not impose a key '00'X header and key 'FF'X trailer rule when a file is set up I will never know. |
|
Back to top |
|
|
niks_jude Warnings : 1 Active User
Joined: 01 Dec 2006 Posts: 144 Location: Mumbai
|
|
|
|
Hi Expat,
I just read that you can open an empty VSAM file in I-O mode, when the access mentioned is random or dynamic. If we do a READ in I-O mode, would not it fail? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Have you coded as Expat suggested?
Quote: |
open in write mode, write dummy record, close, open I-O mode delete dummy record. The file is then initialised. |
Did it work?
Did you try to issue a read without writing the "dummy record"? What happened? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
expat wrote: |
Why, oh why, most sites do not impose a key '00'X header and key 'FF'X trailer rule when a file is set up I will never know. |
Every site I've ever worked at did/does. |
|
Back to top |
|
|
|