Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to append to a file using rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
krishna_mf

New User


Joined: 31 Jan 2007
Posts: 56
Location: banglore

PostPosted: Fri Jun 12, 2009 12:03 am    Post subject: how to append to a file using rexx
Reply with quote

hi,

I want to append the data to file which already exists using rexx.
please help me in how to do that in rexx using execio diskw
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10291
Location: italy

PostPosted: Fri Jun 12, 2009 12:19 am    Post subject: Reply to: how to append to a file using rexx
Reply with quote

not recommended, but You can use DISP=MOD in the dd/allocate_command for the dataset
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2068
Location: Silicon Valley

PostPosted: Fri Jun 12, 2009 12:41 am    Post subject: Reply to: how to append to a file using rexx
Reply with quote

Enrico, can you elaborate on your 'not recommended' statement. I think that is the best recommendation to append data at end of a dataset.

btw, I do not think it will work for a member of a PDS.[/quote]
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10291
Location: italy

PostPosted: Fri Jun 12, 2009 3:17 am    Post subject: Reply to: how to append to a file using rexx
Reply with quote

if something happens while writing, the dataset will be clobbered icon_biggrin.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2068
Location: Silicon Valley

PostPosted: Fri Jun 12, 2009 4:51 am    Post subject: Reply to: how to append to a file using rexx
Reply with quote

That applies to any method used to append data.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Fri Jun 12, 2009 7:40 am    Post subject:
Reply with quote

Quote:

That applies to any method used to append data.
Yup, so one should surely make a backup copy before appending to something that already exists. . . icon_cool.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Jun 12, 2009 2:58 pm    Post subject:
Reply with quote

I am not sure what was in Enrico's mind when he made his statement,
but,
I would suggest IEBGENER/ICEGENER to concatenate the original and the output (DSN=another-name,DISP=NEW) of the REXX.

1. don't need to backup the original.
2. even if iebgener/icegener (concatenation) step blows, original files are intact.
3. relative experience of the TS

again don't know the reason for the TS's request,
but why use REXX to mod a file created by another process?
There are many REXX Script requests to accomplish which
could/should be accomplished through existing Utilities (with a little thought). - REXX is slower than almost anything else.

If the TS is adding something to the DS that is generated by passing the file,
Father-Son processing would be safer.
If the TS is just adding something that is not based on the contents of the file,
why risk a mod?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10291
Location: italy

PostPosted: Fri Jun 12, 2009 3:20 pm    Post subject: Reply to: how to append to a file using rexx
Reply with quote

I was in a moment of lazy mood ...
not wanting to ask the details of the whole process,
I just gave a technically correct even if debatable answer icon_biggrin.gif
( the TS had already decided the tool and the process logic )

Yes, appending data / DISP=MOD is not recommended, whatever is the tool/program used
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
No new posts Multiple VSAM files single output fil... Mohan Kothakota DFSORT/ICETOOL 11 Wed Aug 09, 2017 7:57 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Default Message in Rexx cvnlynn CLIST & REXX 9 Wed Aug 02, 2017 12:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us