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: 1753
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: 1002
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: 2033
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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