Appending data to a PDS using REXX

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Locked
spidiracer
Member
Posts: 2
Joined: Sat Feb 25, 2012 12:16 am

Appending data to a PDS using REXX

Post by spidiracer » Sat Feb 25, 2012 12:24 am

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!

MrSpock
Active Member
Posts: 273
Joined: Wed Jun 27, 2007 5:37 pm

Post by MrSpock » Sat Feb 25, 2012 8:22 am

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.

spidiracer
Member
Posts: 2
Joined: Sat Feb 25, 2012 12:16 am

Post by spidiracer » Mon Feb 27, 2012 7:54 am

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

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Mon Feb 27, 2012 8:10 am

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,
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Locked

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others