Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1777
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: 1060
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: 2086
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 10 Tue Sep 05, 2017 4:24 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us