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

How can VSAM file be opened in I-O mode?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Fri Feb 08, 2008 12:22 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 08, 2008 12:59 pm
Reply with quote

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
View user's profile Send private message
niks_jude
Warnings : 1

Active User


Joined: 01 Dec 2006
Posts: 144
Location: Mumbai

PostPosted: Fri Feb 08, 2008 1:06 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Feb 08, 2008 8:22 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Feb 08, 2008 8:34 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
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 HILITE on Browse mode? TSO/ISPF 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top