MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using SYSDSN to check for existance of a PDS member

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
betrexx
Beginner


Joined: 04 May 2007
Posts: 3
Topics: 1
Location: Chesterfield Virginia

PostPosted: Fri May 04, 2007 3:18 pm    Post subject: Using SYSDSN to check for existance of a PDS member Reply with quote

When TSO PROF has PREXIF defined as NOPREFIX the following code works fine. When PREFIX is set, the following code does not work. I know it is a combinations of " and ' but I am driving myself crazy trying combinations (I this is my first attempt to help a programmer with REXX code). Can someone give me an example of how the following should be coded so it does not matter if PREFIX is defined or not:
Code:

/* REXX */                                                           
/*-----------------------------------------------------------------*/
SYSUID = SYSVAR("SYSUID")                                           
BEGIN:                                                               
"ISPEXEC DISPLAY PANEL(PRRPTS)"                                     
IF UCMD = ' ' THEN SIGNAL LEAVE                                     
/*                                                           */     
/* VERIFY JCL SKELETON IS IN USERS PDS FOR OPTION SELECTED   */     
/*                                                           */     
IF SYSDSN(SYSUID'.SOURCE.DATA(PRDU000'UCMD')') /= 'OK' THEN DO       
 SUBMSG = 'JOB PRDU000'UCMD ' IS NOT IN' SYSUID'.SOURCE.DATA'       

Of course the lines are not wrapped on my system.

Thanks,
_________________
Bert
Back to top
View user's profile Send private message
BarneyBadass
Beginner


Joined: 09 Apr 2007
Posts: 10
Topics: 1

PostPosted: Fri May 04, 2007 3:57 pm    Post subject: Reply with quote

you could do this:

Code:

/* REXX */
/*-----------------------------------------------------------------*/
SYSUID = SYSVAR("SYSUID")
BEGIN:
"ISPEXEC DISPLAY PANEL(PRRPTS)"
IF UCMD = ' ' THEN SIGNAL LEAVE
/* */
/* VERIFY JCL SKELETON IS IN USERS PDS FOR OPTION SELECTED */
/* */

[size=18]sdsn = "'"sysuid||'.source.data(prdu000'||ucmd||")'"[/size]

[size=18]IF SYSDSN("sdsn") /= 'OK' THEN DO[/size]
SUBMSG = 'JOB PRDU000'UCMD ' IS NOT IN' SYSUID'.SOURCE.DATA'


but off the cuff of my shirt I'm not sure that sysdsn will let you test for a specific member of a PDS.. it's been a really long time since I've used that.
Back to top
View user's profile Send private message
acevedo
Beginner


Joined: 03 Dec 2002
Posts: 127
Topics: 0
Location: Europe

PostPosted: Fri May 04, 2007 4:19 pm    Post subject: Reply with quote

BarneyBadass wrote:
I'm not sure that sysdsn will let you test for a specific member of a PDS..


yes, it does.
Back to top
View user's profile Send private message
BarneyBadass
Beginner


Joined: 09 Apr 2007
Posts: 10
Topics: 1

PostPosted: Sat May 05, 2007 6:27 am    Post subject: Reply with quote

but I also said it had been a long time since I've used that function....
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Sun May 06, 2007 12:43 am    Post subject: Reply with quote

You can also "ADDRESS ISPEXEC VGET ZPREFIX" to see TSO's prefix.

O.
________
medical marijuana


Last edited by ofer71 on Sat Feb 05, 2011 12:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
betrexx
Beginner


Joined: 04 May 2007
Posts: 3
Topics: 1
Location: Chesterfield Virginia

PostPosted: Mon May 07, 2007 8:59 am    Post subject: Reply with quote

I appreciate both replies, BarneyBadass & ofer71. But Barney got me on the right track. With a little modification and additional testing, IT WORKS with or without PREFIX being defined. Here is the final code:
Code:

SDSN = "'"SYSUID||'.SOURCE.DATA(PRDU000'||UCMD||')'"'"       
IF SYSDSN(SDSN) /= 'OK' THEN DO                             
 SUBMSG = 'JOB PRDU000'UCMD ' IS NOT IN' SYSUID'.SOURCE.DATA'

Thanks again,
_________________
Bert
Back to top
View user's profile Send private message
betrexx
Beginner


Joined: 04 May 2007
Posts: 3
Topics: 1
Location: Chesterfield Virginia

PostPosted: Mon May 07, 2007 9:05 am    Post subject: Reply with quote

Closing notification.
_________________
Bert
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group