What if someone sends a vicious PROFILE EXEC to your server?  you
should check who sent something before blindly receiving it.  Or check
what was sent and only receive

The do-loop checking rdr files can be made much simpler too:

Check_Receive:
'EXECIO * CP (STEM AA. Q RDR * ALL NOHOLD'
do i=2 to aa.0
 parse var aa.i sender filenum ....
 if wordpos(sender,validsenders)=0 then 'CP CH R' filenum 'HOLD'
 else do
  'EXEC RECEIVE ....
  'EXEC FT22POW ...
  'ERASE ...
 end
end

And, as Rob points out: this do-loop handles all RDR files, no need
for the +2 in WAKEUP.

2008/7/2 Wakser, David <[EMAIL PROTECTED]>:
> Thanks, Cal. Others have already suggested that. But it is really overkill. 
> My entire EXEC consists of the following. And we have tested it thoroughly 
> today, and it seems to do exactly what we want. The "+2" is only because 
> files will not be coming in very often, but when they do we want to process 
> them quickly. The CHECK_OUT_FILE paragraph is only to retrieve the incoming 
> rdr file number, file name, and file type for subsequent commands. The 
> FTP2POW program does some manipulation and FTPs some files from VM to VSE.
>
> David Wakser
>
>
> /*   */
> do forever
>   "WAKEUP +2 (RDR IUCVMSG QUIET"  /* Check for files every 2 minutes */
>    saverc = rc
>    select
>     when saverc = 4 then  /*  we received a RDR file  */
>       do
>          call CHECK_OUT_FILE
>          if flag = "Z" then  /* If it is a valid file ... */
>          do
>              "RECEIVE" filenum "(REP KEEPCC"
>              "EXEC FTP2POW" fn ft "A"
>              "ERASE" fn ft "A"
>          end
>       end   /*  end of DO for saverc = 4  */
>     otherwise nop
>  end   /* end of SELECT  */
> end
>
> exit
>
> CHECK_OUT_FILE:
>
> "EXECIO * CP (STEM" aa. "STRING CP Q RDR * ALL"
> flag = "X"                       /* set flag for exiting loop         */
> i = 1                            /* point to first record             */
>
>  do while flag = "X"             /* see if there is a file to process */
>   parse var aa.i w1 filenum w3 w4 w5 w6 disp w8 w9 fn ft w12 .
>   if (w1 = "NO" & filenum = "RDR" & w3 = "FILES" ) | w1 = "" then return
>   else if w1 = "ORIGINID" & filenum = "FILE" then  /* if HEADER line */
>         i = i + 1                              /* get next rec   */
>   else if disp ¬= "NONE" then                  /* if held file   */
>         i = i + 1                              /* get next rec   */
>   else flag = "Z"
>  end     /* end of DO when flag = "X"     */
>
> return
>
> -----Original Message-----
> From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of 
> Cal Fisher
> Sent: Tuesday, July 01, 2008 5:55 PM
> To: IBMVM@LISTSERV.UARK.EDU
> Subject: Re: Best method
>
> Hi David
> Go to the VM download site http://www.vm.ibm.com/download/ and get the 
> vmserve package. It uses wakeup and will do just about anything you will ever 
> want your service machine to do. I have used this for years and I am very 
> happy with it.
>
> Cal Fisher
> My tour in the Navy
> The MVMUA website
>



-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to