IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Naming a newly opened screen using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ben12345

New User


Joined: 17 Apr 2020
Posts: 2
Location: USA

PostPosted: Fri Apr 17, 2020 5:48 am
Reply with quote

Hi All,

I am new to this forum. I have a question on using SCRNAME in REXX code.

I use the below rexx code to open a pds:

ADDRESS ISPEXEC
"LMINIT DATAID(DID) DATASET('"pds.name"') ENQ(SHRW)"
"LMOPEN DATAID("DID")"
"MEMLIST DATAID("DID") CONFIRM(YES)"
"LMFREE DATAID("DID")"

PDS is opening the way I want (showing all members and giving me the option to do edit/browse/view).

I wish to know if there is a way to incorporate SCRNAME (like 'TESTPDS') in the above REXX code, so as to avoid explicitly giving SCRNAME TESTPDS in command line of the opened pds.

Thanks in advance.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Fri Apr 17, 2020 9:41 am
Reply with quote

Try this

Code:
Address ISPEXEC
ZSCRNAME  = 'TESTPDS'
"VPUT (ZSCRNAME) SHARED"


FYI. Search 'Dialog Developer's Guide and Reference' for SCRNAME
Back to top
View user's profile Send private message
Ben12345

New User


Joined: 17 Apr 2020
Posts: 2
Location: USA

PostPosted: Fri Apr 17, 2020 10:23 am
Reply with quote

Yes it worked! I added those two lines in between and got the desired result:

ADDRESS ISPEXEC
ZSCRNAME = 'TESTJCL'
"VPUT (ZSCRNAME) SHARED"

"LMINIT DATAID(DID) DATASET('"pds.name"') ENQ(SHRW)"
"LMOPEN DATAID("DID")"
"MEMLIST DATAID("DID") CONFIRM(YES)"
"LMFREE DATAID("DID")"

Thanks for sharing. icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 1
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
No new posts REXX/CMS How to place command console... CLIST & REXX 4
Search our Forums:

Back to Top