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 continuously write the output to PDS without overwrit

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

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Tue Jul 22, 2014 1:54 am    Post subject: How to continuously write the output to PDS without overwrit
Reply with quote

Hi ,

I got several rexx to QUEUE the ouput to the same member. The member will be overwirten each time i run the rexx. So i want to keep each record and don't want to overwite. I want to add new record in the same member each time when i run the rexx. How to do that ? Thanks

My code :
Code:
/* REXX */                                                           
JOBNAME=HAO                                                           
QUEUE ' THIS IS THE TEST '                                       
"ALLOC DA('TTAT.TSP.TU14.PANEL("||JOBNAME||")') F(MYOUTDD) SHR REUSE"
"EXECIO * DISKW MYOUTDD (FINIS"                                       
"FREE F(MYOUTDD)"     
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Tue Jul 22, 2014 2:08 am    Post subject:
Reply with quote

What you want to do cannot be done -- period. Write to different sequential data sets, or members of different PDS / PDSE data sets, or accept that your task cannot be accomplished and move on to something that can be done.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Tue Jul 22, 2014 6:17 am    Post subject: Reply to: How to continuously write the output to PDS withou
Reply with quote

Quote:
I want to add new record in the same member

Your requirement is not clear. It seems like you want to append new information at the end of the existing member. Please confirm.

Instead of SHR, try using MOD. But I do not think you can do MOD for a PDS member, so likely you will need to use a sequential data set with Disp=MOD.
Back to top
View user's profile Send private message
steve-myers

Active User


Joined: 30 Nov 2013
Posts: 462
Location: The Universe

PostPosted: Tue Jul 22, 2014 7:37 am    Post subject:
Reply with quote

Pedro and Mr. Sample are both correct.

It is possible to update a PDS member in place, but it requires specially written Assembler. I've never done it, but I think I could do it if I ever have to. As far as I know, the only applications that can update a member in place are IEBUPDTE and AMASPZAP.

As Pedro says, you cannot extend (e.g., add records) an existing PDS member, even if the member is known to be the last physical member in the data set.

When a program opens a partitioned data set for output, you are opening it to add one or members to the end of the data set. In other words, it is being opened as "MOD," regardless of the initial status implied by the DISP JCL parameter.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Tue Jul 22, 2014 12:02 pm    Post subject:
Reply with quote

read the member in a stem
add new record to the stem
write the stem to the member

This is of course a replace, not an append.
Back to top
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 106
Location: windsor

PostPosted: Tue Jul 22, 2014 6:12 pm    Post subject:
Reply with quote

Thanks all for your answer.

I have SHR to MOD and output to sequential data set , it works. icon_biggrin.gif

Thanks
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
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


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