View previous topic :: View next topic |
Author |
Message |
betrexx Beginner
Joined: 04 May 2007 Posts: 3 Topics: 1 Location: Chesterfield Virginia
|
Posted: Fri May 04, 2007 3:18 pm Post subject: Using SYSDSN to check for existance of a PDS member |
|
|
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 |
|
 |
BarneyBadass Beginner
Joined: 09 Apr 2007 Posts: 10 Topics: 1
|
Posted: Fri May 04, 2007 3:57 pm Post subject: |
|
|
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 |
|
 |
acevedo Beginner

Joined: 03 Dec 2002 Posts: 127 Topics: 0 Location: Europe
|
Posted: Fri May 04, 2007 4:19 pm Post subject: |
|
|
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 |
|
 |
BarneyBadass Beginner
Joined: 09 Apr 2007 Posts: 10 Topics: 1
|
Posted: Sat May 05, 2007 6:27 am Post subject: |
|
|
but I also said it had been a long time since I've used that function.... |
|
Back to top |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Sun May 06, 2007 12:43 am Post subject: |
|
|
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 |
|
 |
betrexx Beginner
Joined: 04 May 2007 Posts: 3 Topics: 1 Location: Chesterfield Virginia
|
Posted: Mon May 07, 2007 8:59 am Post subject: |
|
|
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 |
|
 |
betrexx Beginner
Joined: 04 May 2007 Posts: 3 Topics: 1 Location: Chesterfield Virginia
|
Posted: Mon May 07, 2007 9:05 am Post subject: |
|
|
Closing notification. _________________ Bert |
|
Back to top |
|
 |
|
|