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

how to append to a file using rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 12, 2009 12:19 am
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

Global Moderator


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

PostPosted: Fri Jun 12, 2009 12:41 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 12, 2009 3:17 am
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

Global Moderator


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

PostPosted: Fri Jun 12, 2009 4:51 am
Reply with quote

That applies to any method used to append data.
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 Jun 12, 2009 7:40 am
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: 6966
Location: porcelain throne

PostPosted: Fri Jun 12, 2009 2:58 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 12, 2009 3:20 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
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
Search our Forums:

Back to Top