View previous topic :: View next topic
|
Author |
Message |
krishna_mf
New User
Joined: 31 Jan 2007 Posts: 56 Location: banglore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
not recommended, but You can use DISP=MOD in the dd/allocate_command for the dataset |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if something happens while writing, the dataset will be clobbered |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
That applies to any method used to append data. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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. . . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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
( 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 |
|
|
|