Page 1 of 1

Appending data to a PDS using REXX

Posted: Sat Feb 25, 2012 12:24 am
by spidiracer
I'm new to REXX and I've done a lot of research but I cannot seem to find a solution to this. I have read that I cannot use the MOD command on a PDS member, yet I do have some code (posted below) that works using that without giving me any errors. It will not append data.

"ALLOC MOD SRH FILE(output) DATASET('"output"') REUSE"

Just about anything else I try will give me errors. Here is more code:

...
member = STRIP(job.i)
output = '***.***.***' || '(' || member || ')'
"ALLOC MOD SRH FILE(output) DATASET('"output"') REUSE"
out.1 = date.i job.i start.i
"EXECIO 1 DISKW output (STEM out. FINIS"
...

Any idea's? I really appreciate the help! As I said, the way I have it above actually works other than it will not append.

Thank you!

Posted: Sat Feb 25, 2012 8:22 am
by MrSpock
I don't really know what you expect for an answer. Yes, you cannot append data to a member of a PDS, at least outside of editing it. That's always been the case. I'm not sure why you'd want to.

The only way has always been to read and store all of the contents, add the new information to the end, and then re-write the member from the top down. That's essentially what an editor is doing, albeit more efficiently.

Posted: Mon Feb 27, 2012 7:54 am
by spidiracer
Is there no way to append data into a PDS member using REXX? I was just hoping for an easy solution.

I will have to try another route I suppose. Thanks for your help. If anyone has any other suggestions please let me know I would appreciate it. :D

Posted: Mon Feb 27, 2012 8:10 am
by dbzTHEdinosauer
spidiracer,

you are now wasting our time,
MrSpock has provided you with the answer.

i suggest you start reading the manuals.

this topic locked to prevent any further silly comments by you,