IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Rexx- SYSDSN - MSG(OFF) issue

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> CLIST & REXX
View previous topic :: View next topic  
Author Message
pkg23



Joined: 06 Dec 2007
Posts: 12
Location: India

Posted: Wed Aug 06, 2008 12:07 pm    Post subject: Rexx- SYSDSN - MSG(OFF) issue  

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



Joined: 20 Oct 2006
Posts: 1639
Location: germany

Posted: Wed Aug 06, 2008 1:08 pm    Post subject:  

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



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Wed Aug 06, 2008 1:48 pm    Post subject:  

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 :oops:
Back to top  
gcicchet



Joined: 28 Jul 2006
Posts: 664

Posted: Wed Aug 06, 2008 1:54 pm    Post subject:  

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



Joined: 28 Jul 2006
Posts: 664

Posted: Wed Aug 06, 2008 1:56 pm    Post subject:  

Hi Expat,

I can't type quick enough. :lol:


Gerry
Back to top  
premkrishnan



Joined: 07 Sep 2006
Posts: 63
Location: Mars

Posted: Wed Aug 06, 2008 1:58 pm    Post subject:  

Expat and PKG23,

Please check the manual TSO/E CLISTs (SA22-7781-04)

http://publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ikjb800/listdsi.htm

It has all the details about LISTDSI

Thanks,
Prem
Back to top  
expat



Joined: 14 Mar 2007
Posts: 3544
Location: Brussels once more ...

Posted: Wed Aug 06, 2008 2:40 pm    Post subject:  

gcicchet wrote: Hi Expat,
I can't type quick enough. :lol:
Gerry
I won't ask why that is :lol:
Back to top  
gcicchet



Joined: 28 Jul 2006
Posts: 664

Posted: Wed Aug 06, 2008 2:41 pm    Post subject:  

I was born at an early age :wink:


Gerry
Back to top  
pkg23



Joined: 06 Dec 2007
Posts: 12
Location: India

Posted: Wed Aug 06, 2008 2:45 pm    Post subject: Reply to: Rexx- SYSDSN - MSG(OFF) issue  

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



Joined: 01 Sep 2006
Posts: 536
Location: work

Posted: Wed Aug 06, 2008 11:01 pm    Post subject: Reply to: Rexx- SYSDSN - MSG(OFF) issue  

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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> CLIST & REXX
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM