The CP SEND should work, and, if SQLPROD has a secondary user defined,
a VM READ should remain a VM READ.  Only without a secondary user a VM
READ posted by a disconnected user becomes a CP READ.
(my former customer used similar CP sends to manage DB2 servers)
Maybe a short SLEEP after the SET SECUSER?

P.S. you can also code CP SLEEP 8 MIN instead of 8 times 60 SEC

Oh yes, I just remember something: when the secondary user itself is
disconnected, the primary user acts as if it didn't have a secondary
user.  Unless the secondary user has an active path to IUCV *MSG.  So,
insert
   'WAKEUP +0 (IUCVMSG'
before the SET SECUSER, and
   'WAKEUP RESET'
when done.
But, as you start using WAKEUP, your REXX code could even analyze the
messages sent by SQLPROD and act accordingly, replacing the fixed CP
SLEEP wait times.   Do do so, code a loop:
  'WAKEUP +nn (IUCVMSG'
  if rc=6 then ... user pressed enter... maybe leave
  if rc=2 then ... no message from anyone in the last nn minutes
  if rc=5 then ... you got a message, use PARSE PULL to get it.


2009/5/31 Ed Zell <ewz...@illinoismutual.com>:
> I run a series of commands from a CMS user with priv class A
> to automate my DB/2 for VM database archives.  Here is the EXEC:
>
> 'CP ATT A91 SQLPROD 181'
> 'CP SET SECUSER SQLPROD *'
> 'CP SEND SQLPROD ARCHIVE'
> 'CP SLEEP 10 SEC'
> 'CP SEND SQLPROD 181'
> 'CP SLEEP 60 SEC'
> 'CP SLEEP 60 SEC'
> 'CP SLEEP 60 SEC'
> 'CP SLEEP 60 SEC'
> 'CP SLEEP 60 SEC'
> 'CP SLEEP 60 SEC'
> 'CP SLEEP 60 SEC'
> 'CP DET A91 SQLPROD'
> 'CP SET SECUSER SQLPROD OFF'
>
>
> SQLPROD is running disconnected, and once the ARCHIVE command is
> processed, it goes into a VM READ waiting for the operator to
> enter the CUU for the tape drive.
>
> As long as the user running this is logged on, it works fine.
>
> However, if the user is running disconnected, SQLPROD interpets
> the ARCHIVE command correctly, but then seems to be in a CP read
> instead of a VM read, and it gives an error on the 181 response.
>
> The SQL console log is posted at the end.  Once I log on to SQLPROD
> and press enter, it give me the ARI message and re-prompts me to
> enter the CUU of the tape drive, which I then key in and it works
> fine.
>
> Is this the way SECUSER and SEND is supposed to work, or should it
> be the same regardless of whether or not the user issuing the
> commands is connected?
>
> Thanks.
>
> Ed Zell
> Illinois Mutual Life
> (309) 636-0107
>
>
>
> TAPE 0A93 ATTACHED TO SQLPROD 0181
> HCPCFX6768I Your SECUSER set to EONBKUP by EONBKUP.
> ARI0065I Operator command processing is complete.
> ARI2008I Archive is about to be started.
> ARI0293I Archive is starting.
> ARI0239I External labeling of this archive is:
>             Type:      database  archive
>             Timestamp: 05-30-09  16:13:51
> ARI0299A Ready archive output volume. Enter the CUU.
> HCPCMD001E Unknown CP command: 181
> z/VM Version 4 Release 4.0, Service Level 0501 (32-bit),
> built on IBM Virtualization Technology
> There is no logmsg data
> FILES:   NO RDR, 0001 PRT,   NO PUN
> RECONNECTED AT 16:16:34 CDT SATURDAY 05/30/09
>
> ARI0297A Response to archive prompt is not valid.
> ARI0239I External labeling of this archive is:
>             Type:      database  archive
>             Timestamp: 05-30-09  16:13:51
> ARI0299A Ready archive output volume. Enter the CUU.
> 181
> ARI0292I Archive is completed.
> HCPCFX6768I Your SECUSER set to SQLCONS by EONBKUP.
> .
>
>
> CONFIDENTIALITY: This e-mail (including any attachments) may contain 
> confidential, proprietary and privileged information, and unauthorized 
> disclosure or use is prohibited.  If you receive this e-mail in error, notify 
> the sender and delete this e-mail from your system.
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to