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: 1746
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

Active Member


Joined: 07 Feb 2009
Posts: 989
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: 2025
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


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