View previous topic :: View next topic
|
Author |
Message |
pkg23
New User
Joined: 06 Dec 2007 Posts: 7 Location: India
|
|
|
|
I trying verify if the dataset is Archive or not using below rexx.
For this i am issing SYSDSN as below and to avoid the messages i am also setting MSG("OFF") but when i run the Rexx it gives me the messages like "DMS2987 CA DISK HAS ARCHIVED
DMS2971 DO YOU WANT TO RESTORE THE DATA SET? (Y/N) "
/*rexx*/
DATASET = "userid.test.input"
MSGSTAT = MSG("OFF")
IF SYSDSN(DATASET) = "DATASET NOT FOUND" THEN DO
SAY "DATASET NOT FOUND"
END |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
someone else will be able to provide the exact line, but to turn messages off in a REXX script I remember something like:
ADDRESS TSO CONTROL MSGNO ...................................
but, this may be something that can not be turned off - don't know. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Looks as though it may be because the dataset that you are trying to interrogate is 'Archived'. It is a message issued by the ILM software and not REXX.
To avoid this, I usually use LISTDSI instead of SYSDSN because it has a NORECALL parameter.
Code: |
/*REXX*/
SAY "HLQ PLEASE"
PARSE PULL HLQ
A = "'"STRIP(HLQ)"'"
Q = LISTDSI(A NORECALL)
SAY "RC = "Q ",REASON = "SYSREASON
|
LISTDSI is well documented, but unfortunately I just for the life of me can not remember where |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
if you are trying to see if the dataset is migrated or not, I would use the LISTDSI command like LISTDSI 'filename' DIRECTORY NORECALL,
and use the SYSREASON variable to determine the dataset availability.
SYSDN will recall the dataset.
Gerry |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Expat,
I can't type quick enough.
Gerry |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
gcicchet wrote: |
Hi Expat,
I can't type quick enough.
Gerry |
I won't ask why that is |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
I was born at an early age
Gerry |
|
Back to top |
|
|
pkg23
New User
Joined: 06 Dec 2007 Posts: 7 Location: India
|
|
|
|
Great the RECALL option worked. But when i run the rexx, it waits till i press "ENTER". Any idea how we can avoid this.
X = LISTDSI(DATASET DIRECTORY NORECALL)
SAY SYSREASON
Thanks
Prashant |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
Please check the manual TSO/E CLISTs (SA22-7781-04) |
Actually, I think you want to read about LISTDSI in the TSO/E Rexx Reference manual.
Quote: |
it waits till i press "ENTER". Any idea how we can avoid this. |
When you use the SAY instruction, the system waits for the user to read and dismiss your text. If the system did not wait for the user, it would be so fast the user would not have time to read it.
Seems like you are doing this in ISPF, try something like this:
Code: |
zerrsm = "not found"
zerrlm = DATASET "was not found"
zerrhm = '*'
zerralrm = 'YES'
Address ISPEXEC "SETMSG MSG(ISRZ002)" |
|
|
Back to top |
|
|
|