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
 

 

Data Overwritten when creating a new member in PDS

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

New User


Joined: 10 Feb 2012
Posts: 7
Location: INDIA

PostPosted: Fri Apr 27, 2012 8:05 am    Post subject: Data Overwritten when creating a new member in PDS
Reply with quote

My REXX program is to create a member along with a PDS and if the PDS is already existing, it is creating just the member. And if both are existing it is directly writing into the member.

The issue is when a new member is created , the data is written into the newly created member along with the 1st member in that PDS.

CREATE_MEMBER:
"LMINIT DATASET("PDSNAME") DATAID(DIDO) ENQ(EXCLU)"
"LMOPEN DATAID("DIDO") OPTION(OUTPUT)"
"LMPUT DATAID("DIDO")MODE(INVAR),DATALOC(OUTLINE)DATALEN(80)"
"LMMADD DATAID("DIDO") MEMBER("MEMNAME")"

WRITE_DATA:

DATA.1 = ".."
DATA.2 = ".."

ADDRESS TSO
"ALLOC DDN(DDN1) DA ("PDSNAME"(MEMBERNAME")) SHR"
"EXECIO * DISKW DDN1 (STEM DATA."
"FREE DDN(DDN1)"
ADDRESS ISPEXEC
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1754
Location: Bloomington, IL

PostPosted: Fri Apr 27, 2012 2:32 pm    Post subject:
Reply with quote

Your problem is obscure. Do you mean to say that if the PDS or the member do not already exist, no data should be written?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1017
Location: Oostende, Belgium

PostPosted: Fri Apr 27, 2012 3:11 pm    Post subject:
Reply with quote

Do not mix LMPUT and execio!
Back to top
View user's profile Send private message
mjadwani2785

New User


Joined: 28 Apr 2009
Posts: 89
Location: Noida , Dublin

PostPosted: Fri Apr 27, 2012 4:58 pm    Post subject:
Reply with quote

Hi ,

What I have understood from your scenario TSO/E external function SYSDSN may be this can be your interest . Check for already available member , if not its ok , if its there try different unique member.

Regards,
Manoj K Jadwani
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Apr 27, 2012 9:57 pm    Post subject: Reply to: Data Overwritten when creating a new member in PDS
Reply with quote

Quote:
Do not mix LMPUT and execio!


To expand on Prino's recommendation: Do not mix any LM* services with execio!

You do not have to create an empty/dummy member before using EXECIO. EXECIO will create the member if it does not exist.

Quote:
it is directly writing into the member

I know this is just a nuance in your choice of words... but it is tricky to write into an existing member. For a PDS, the new member will occupy a different part of the dataset; the old member will become wasted space that will be reclaimed by compressing the PDS.

PDSE's work better with regard to wasting space, but you still cannot 'directly write into the member'.
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 member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm


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