MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to append a record in an existing file ?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Thu Feb 24, 2005 2:40 am    Post subject: How to append a record in an existing file ? Reply with quote

I use the following code to append record,

filename = 'data3'
"ALLOC F(DATAOUT) DA('CuserID.TEST.rexx("filename")') mod reuse"
"NEWSTACK"
new_str. = ''
new_str.1 = 'aaa1'
"EXECIO 1 DISKW DATAOUT (stem new_str. "

but not working.

Can someone tell me why or show me a way?

Thank you
_________________
cheers,
Andy
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Feb 24, 2005 3:41 am    Post subject: Reply with quote

add
new_str.0=1
Back to top
View user's profile Send private message Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Thu Feb 24, 2005 9:43 pm    Post subject: Reply with quote

Thanks for reply. But I do not think that is the point.
_________________
cheers,
Andy
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu Feb 24, 2005 10:13 pm    Post subject: Reply with quote

Did you try it?
Back to top
View user's profile Send private message Visit poster's website
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Feb 24, 2005 10:40 pm    Post subject: Reply with quote

You can't do what you are attempting. From the "z/OS TSO/E REXX Reference" manual on the EXECIO command:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A350/10.3?DT=20040623084642

Quote:

Notes:

3. Do not use the MOD attribute when allocating a member of a PDS to which you want to append information. You can use MOD only when appending information to a sequential data set. To append information to a member of a PDS, rewrite the member with the additional records added.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu Feb 24, 2005 10:44 pm    Post subject: Reply with quote

Can't say I've ever seen anyone attempt to MOD to a member of a PDS. Seems like a rather dangerous undertaking.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Feb 25, 2005 12:04 am    Post subject: Reply with quote

I missed that. The EXECIO would not have worked anyway because it was called incorrectly, but it is true. You can't use a PDS DISP=MOD. Unfortunately, ANDY only said it doesn't work and never gave an error message or any indication of what wasn't working, so I just pointed out the first obvious thing I saw & missed the other obvious thing. So Andy, you were right... my suggestion wasn't the only cause of the problem.
Back to top
View user's profile Send private message Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Sun Feb 27, 2005 10:47 pm    Post subject: Reply with quote

Thank you guys. The problem look like EXECIO can only append records to sequential data set. Can not do for a member of PDS.

Superk, Why do you think it is a dangerous undertaking? We can create and update a member of PDS. Why only append is dangerous? Could you give me some ideas?

Thank you.
_________________
cheers,
Andy
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sun Feb 27, 2005 11:42 pm    Post subject: Reply with quote

You can't do it because of the way a PDS is stored. A pds is really a sequential file with the 1st part as the directory. The directory entries point into other parts of the file. Members actually sit next to each other on disk so there is no place to append to (the member sections are not chained together). PDSEs are stored differently (as part of VSAM files I think) so that restriction could be lifted in theory, but it is not as far as I know.
Back to top
View user's profile Send private message Visit poster's website
ANDY
Beginner


Joined: 07 Feb 2004
Posts: 127
Topics: 67

PostPosted: Wed Mar 02, 2005 12:03 am    Post subject: Reply with quote

Semiqeezer,

Thank you. It make me clear.
_________________
cheers,
Andy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group