Re: Best method
And if you want to use PIPELINE, look at the PIPESERV package from the IBM Downloads website. I have created Service Virtual Machines from both of these packages. They both work very well, you just have to pick your style of doing things. /Tom Kern /U.S. Dept of Energy /301-903-2211 Kris Buelens wrote: To all readers thinking they'd nee to intercept the message of an arriving spool file: it leaves a hole: reader files sitting there before WAKEUP/PIPE/xxx were active remain in the reader until another RDR file arrives. WAKEUP hasn't that problem. And, you can save yourself a lot a work by looking at my RxServer package: it handles reader fies etc, built around WAKEUP, with built-in security etc.
Re: Best method
Sure, Fran, not a problem. Here ya go Happy 4th, too. Fran Hensler wrote: Dave - I would like to snag a copy. Thanks, /Fran Francis J. Hensler, CCP Yes, Virginia, there is a Slippery Rock Software Support Specialist mailto:[EMAIL PROTECTED] Administrative Info Systems Tech http://zvm.sru.edu/~fjh Slippery Rock University of PA http://www.sru.edu 200 Maltby Center; 1 Morrow Way Voice: +1.724.738.2153 Slippery Rock, PA 16057-1313 USAFAX: +1.724.738.4483 --- On Thu, 3 Jul 2008 11:30:18 -0500 Dave Jones said: Folks, if anyone is interested, I now have the VMSERVE documentation formated as an IBM BookReader *.boo file. Youn should be able to read it using any of the current Bookreader products (z/OS, z/VM, Windows, etc.). If anyone would like a copy, drop me a note (off list, please) -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
Thanks Dave But does the script file need another product like DCF(?) to format it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Wednesday, July 02, 2008 9:16 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Jim, the documentation on how to use the vmserve package is included in the vmarc file. Look for the VMSERVE SCRIPT file. Dodds, Jim wrote: Is there any documentation on how to use this or must we spend time trying to figure out what it does and how it does it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -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 -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
You can use B2H to convert a Script file to HTML. B2H lives on VM's download lib 2008/7/3 Dave Jones [EMAIL PROTECTED]: Hi, Jim. Yes, it doesbut you're in luck.I have DCF here, and I will format the SCRIPT file and send you a copy. What output format do you prefer: LISTING or LIST3820? Hm..I might be able to convert it to PDF as well. Dodds, Jim wrote: Thanks Dave But does the script file need another product like DCF(?) to format it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Wednesday, July 02, 2008 9:16 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Jim, the documentation on how to use the vmserve package is included in the vmarc file. Look for the VMSERVE SCRIPT file. Dodds, Jim wrote: Is there any documentation on how to use this or must we spend time trying to figure out what it does and how it does it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -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 -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com -- Kris Buelens, IBM Belgium, VM customer support
Re: Best method
Folks, if anyone is interested, I now have the VMSERVE documentation formated as an IBM BookReader *.boo file. Youn should be able to read it using any of the current Bookreader products (z/OS, z/VM, Windows, etc.). If anyone would like a copy, drop me a note (off list, please) Dodds, Jim wrote: Thanks Dave But does the script file need another product like DCF(?) to format it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Wednesday, July 02, 2008 9:16 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Jim, the documentation on how to use the vmserve package is included in the vmarc file. Look for the VMSERVE SCRIPT file. Dodds, Jim wrote: Is there any documentation on how to use this or must we spend time trying to figure out what it does and how it does it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -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 -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
Listing or PDF which ever is easiest for you. Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Thursday, July 03, 2008 10:42 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Hi, Jim. Yes, it doesbut you're in luck.I have DCF here, and I will format the SCRIPT file and send you a copy. What output format do you prefer: LISTING or LIST3820? Hm..I might be able to convert it to PDF as well. Dodds, Jim wrote: Thanks Dave But does the script file need another product like DCF(?) to format it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Wednesday, July 02, 2008 9:16 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Jim, the documentation on how to use the vmserve package is included in the vmarc file. Look for the VMSERVE SCRIPT file. Dodds, Jim wrote: Is there any documentation on how to use this or must we spend time trying to figure out what it does and how it does it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -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 -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
I've sent the *.boo format for the VMSERVE applicationdo you still need a listing or PDF format version as well? Dodds, Jim wrote: Listing or PDF which ever is easiest for you. Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Thursday, July 03, 2008 10:42 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Hi, Jim. Yes, it doesbut you're in luck.I have DCF here, and I will format the SCRIPT file and send you a copy. What output format do you prefer: LISTING or LIST3820? Hm..I might be able to convert it to PDF as well. Dodds, Jim wrote: Thanks Dave But does the script file need another product like DCF(?) to format it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Dave Jones Sent: Wednesday, July 02, 2008 9:16 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Jim, the documentation on how to use the vmserve package is included in the vmarc file. Look for the VMSERVE SCRIPT file. Dodds, Jim wrote: Is there any documentation on how to use this or must we spend time trying to figure out what it does and how it does it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -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 -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
Dave - I would like to snag a copy. Thanks, /Fran Francis J. Hensler, CCP Yes, Virginia, there is a Slippery Rock Software Support Specialist mailto:[EMAIL PROTECTED] Administrative Info Systems Tech http://zvm.sru.edu/~fjh Slippery Rock University of PA http://www.sru.edu 200 Maltby Center; 1 Morrow Way Voice: +1.724.738.2153 Slippery Rock, PA 16057-1313 USAFAX: +1.724.738.4483 --- On Thu, 3 Jul 2008 11:30:18 -0500 Dave Jones said: Folks, if anyone is interested, I now have the VMSERVE documentation formated as an IBM BookReader *.boo file. Youn should be able to read it using any of the current Bookreader products (z/OS, z/VM, Windows, etc.). If anyone would like a copy, drop me a note (off list, please)
Re: Best method
Yep, I agree. I just haven't had time (yet) to pretty it up. Perhaps this morning I'll get to it. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Kris Buelens Sent: Wednesday, July 02, 2008 12:35 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method 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.
Re: Best method
On: Tue, Jul 01, 2008 at 09:03:45AM -0700,Wakser, David Wrote: } Is there a method of also trapping the message that shows when } a file is sent to the VM reader? I need it to issue the RECEIVE } properly. In the HELP WAKEUP it seems that setting the various message } types to IUCV should work, but it doesn't seem to do that, Are you starting WAKEUP with the IUCVMSG parm? Whichever one (the file or the message) that WAKEUP fields first will be the one it will signal to you. To get the other, you have to go back into WAKEUP to field the other one. It MAY be easier to ignore the message and get the info you need from a QUERY RDR. -- Rich Greenberg N Ft Myers, FL, USA richgr atsign panix.com + 1 239 543 1353 Eastern time. N6LRT I speak for myself my dogs only.VM'er since CP-67 Canines:Val, Red, Shasta Casey (RIP), Red Zero, Siberians Owner:Chinook-L Retired at the beach Asst Owner:Sibernet-L
Re: Best method
On: Tue, Jul 01, 2008 at 03:37:19PM -0500,Huegel, Thomas Wrote: } It all depends on what you want to do. } In some cases you may not want to wait forever for a file that may never arrive. } So you put the timer in. } If on the other hand the vm is totally driven by the arrival of a RDR file, then there would be no reason to have a timer value. WAKEUP has (or used to have) a problem with midnight, so my wakeup execs usually had: 'WAKEUP 23:59:57 (..' if rc = timer pop then 'CP SLEEP 5 SECS' loop back to wakeup -- Rich Greenberg N Ft Myers, FL, USA richgr atsign panix.com + 1 239 543 1353 Eastern time. N6LRT I speak for myself my dogs only.VM'er since CP-67 Canines:Val, Red, Shasta Casey (RIP), Red Zero, Siberians Owner:Chinook-L Retired at the beach Asst Owner:Sibernet-L
Re: Best method
This is only required/useful when using WAKEUP in combination with a WAKEUP file. And, the exec using WAKEUP must be celver enough to use CP SLEEP or alike to effectively pass midnight. Here's what I wrote about the problem in our RxServer HTML documentation. *Midnight Processing*|-- Precautions must be taken to make WAKEUP safely pass midnight. This section explains why the WAKEUP-file contains 2 times the command *MIDNIGHT*. How does WAKEUP use its event file ?|-- WAKEUP can only use one timer for all time bound events. So, before it can set the next wake-up time, it must check all events and select the first one to come. Then it calculates how long it can go to sleep to reach that time, and sets the timer accordingly. Each time our server executes the *WAKEUP*command, the file is read again to find the next event. In following example, all events run only once a day to ease the explanation. Remark as well that there is no need to have the records sorted on the time field. ALL 00:01:00 08/30/01 MIDNIGHT ALL 23:59:01 08/28/01 MIDNIGHT ALL 06:00:00 08/30/01 SCANMSGLOG ALL 20:00:00 08/29/01 EXEC VCMAINT CPYREXX The first three fields are important in this explanation. - Field 1, in this case, tells that all events must be executed every day. - Field 2 tells at what time of day it must be triggered. - Field 3 is updated by WAKEUP and indicates when it the event was triggered the last time. By checking this field, WAKEUP knows whether the event was already triggered today or still needs to be executed. For records that have to executed once a day, WAKEUP looks at fields 2 and 3: 1. If it is now later than the time of field 2: - if the date in field 3 is equal to today, then the event has already been executed. - if the field indicates an earlier day, then the event is triggered immediately to clear the backlog. 2. If the current time is earlier than the one in field 2, the event becomes a candidate for selection. This leads to one important aspect and some side effects. - WAKEUP will not detect the first event planned for next day, and if the last event for today has been executed, there is nothing anymore that will set the timer. Our server will thus only be woken up by other events than a timer interrupt. WAKEUP is very likely to miss the first event of the next day. Therefore, all servers using a WAKEUP file must have an event triggered closely to midnight, whereby the server can then enter a *CP SLEEP* to let midnight pass by. WAKEUP will then detect the records again, as a new day has arrived. For this reason, the server kernel has the function *MIDNIGHT*. When the server starts up, it checks whether this function is defined in the file, and insert the record if it is missing: ALL 23:59:01 08/28/01 MIDNIGHT 2008/7/2 Rich Greenberg [EMAIL PROTECTED]: On: Tue, Jul 01, 2008 at 03:37:19PM -0500,Huegel, Thomas Wrote: } It all depends on what you want to do. } In some cases you may not want to wait forever for a file that may never arrive. } So you put the timer in. } If on the other hand the vm is totally driven by the arrival of a RDR file, then there would be no reason to have a timer value. WAKEUP has (or used to have) a problem with midnight, so my wakeup execs usually had: 'WAKEUP 23:59:57 (..' if rc = timer pop then 'CP SLEEP 5 SECS' loop back to wakeup -- Rich Greenberg N Ft Myers, FL, USA richgr atsign panix.com + 1 239 543 1353 Eastern time. N6LRT I speak for myself my dogs only.VM'er since CP-67 Canines:Val, Red, Shasta Casey (RIP), Red Zero, Siberians Owner:Chinook-L Retired at the beach Asst Owner:Sibernet-L -- Kris Buelens, IBM Belgium, VM customer support
Re: Best method
David, FWIW, here is a skeleton Exec that I use to setup a VM service machine to wait for incoming reader files and process them. The Exec als o supports invoking commands from authorized users that send it SMSGs. The user issuing the SMSG command must be authorized to do so and the Exec supports up to three levels of authorization checking. Level 1, you are authorized to run anything supported by the Exec on the service machine. Level 2, you are authorized to run anything on the service machine. Leve l 3, you are authorized to run the specified command. The Exec expects to use the MSGNOH command to send replys, so the service machine running it needs the privilege class required for MSGNOH, (IBM Class B). :RDRWAIT EXEC: /**/ /*RDRWAIT EXEC*/ /* Skeleton Exec for Service Machine to Wait for Reader Files or */ /* Special Messages, (SMSGs). Must be customized for each Service */ /* Machine that runs it. */ /**/ RDRWAIT: Address COMMAND Parse Source . ctype ename etype emode . adminid = 'xxx' /* ID to Receive Console Bad Rdr Fil es */ qfiles = 'QUERY FILES * ALL AVAIL' qryrdr = 'QUERY READER * ALL AVAIL ISODATE DIST' myuid = Userid() Say LOGMSG('Begin' ename etype'...') Say ' ' 'CP SPOOL READER CLASS *' 'WAKEUP +0 (QUIET IUCVMSG' /* Setup to Receive MSGs */ 'CP SET MSG ON' 'CP SET SMSG IUCV' /* Trap SMSGs Only */ 'MAKEBUF' bufnum = rc stkcnt = Queued() Do Forever Say LOGMSG('Waiting for Reader Files...') 'WAKEUP (QUIET CONS RDR IUCVMSG' src = rc Select /* src */ When src = 4 Then Call DORDR /* Incoming RDR File */ When src = 5 Then Call DOSMSG /* Incoming SMSG */ When src = 6 Then Call EXIT src /* Enter Key */ Otherwise Call EXIT src End /* Select src */ End /* Do Forever */ Call EXIT 99 /**/ /* At least 1 Reader file has arrived, process all Reader files found.*/ /**/ DORDR: Parse Value Diag(08,qfiles) With . numrdr . Do While numrdr \= 'NO' 'PIPE CP' qryrdr'|DROP 1|STEM RDRFILES.' If rc \= 0 Then Leave Do n = 1 to rdrfiles.0 Parse Var rdrfiles.n origin fileid class type recs copy, hold date time spfn spft spdist . Say ' ' Say LOGMSG('Processing' spfn spft 'for' origin'...') Select /* process */ When spfn = '' Then Call PROCESS_ When spfn = '' Then Call PROCESS_ Otherwise 'CP TRANSFER READER' fileid 'TO' adminid 'READER' End /* Select process */ End n Parse Value Diag(08,qfiles) With . numrdr . End
Re: Best method
Thanks, Dale. This was helpful. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 11:00 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method David, FWIW, here is a skeleton Exec that I use to setup a VM service =
Re: Best method
Is there any documentation on how to use this or must we spend time trying to figure out what it does and how it does it? Jim Dodds Systems Programmer Kentucky State University 400 East Main Street Frankfort, Ky 40601 502 597 6114 -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
Re: Best method
Checkout WAKEUP. It does that and more. Jim Hughes 603-271-5586 Its kind of fun to do the impossible. (Walt Disney) =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Wakser, David =Sent: Tuesday, July 01, 2008 10:10 AM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Best method = =All: = = What is the best method to code, for a SVM, a wait for a file to =arrive in its reader? = = I have a (very old) EXEC that has a do forever loop with a =EXECIO * CP (STEM aa. STRING CP Q RDR * ALL command followed by a =SLEEP when no files are found. Is there a better method of waking up =an EXEC when a RDR file arrives? = = Thanks, in advance. = =David Wakser
Re: Best method
Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details Bob Bates Enterprise Hosting Services - Enterprise Virtualization - z/VM and z/Linux w. (469)892-6660 c. (214) 907-5071 This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:10 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Best method All: What is the best method to code, for a SVM, a wait for a file to arrive in its reader? I have a (very old) EXEC that has a do forever loop with a EXECIO * CP (STEM aa. STRING CP Q RDR * ALL command followed by a SLEEP when no files are found. Is there a better method of waking up an EXEC when a RDR file arrives? Thanks, in advance. David Wakser
Re: Best method
Thanks, Bob. I haven't used WAKEUP for many years, so I'll try it. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 10:21 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details
Re: Best method
Bob: Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Thanks, in advance. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 10:21 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details
Re: Best method
If you have CA products available, check out KWAKEUP. It handles everything that WAKEUP does and does it better. For example, it gives you an option to put the information about the event causing the interrupt into REXX variables. There is no need to clear the stack of wakeup entries that did not cause the interrupt. It also does not have any necessity of having an artificial pre-midnight wakeup. An interval can be started on one day and not trigger the interrupt until some future date. It is WAKEUP compatible should you choose to go that route. Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 7:24 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Thanks, Bob. I haven't used WAKEUP for many years, so I'll try it. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 10:21 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details
Re: Best method
You would probably need to SET CPCONIO IUCV. Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:04 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Bob: Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Thanks, in advance. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 10:21 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details
Re: Best method
I don't have access to that product, and I prefer to remain plain vanilla with this. But it's good to know, and thanks for the information. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Schuh, Richard Sent: Tuesday, July 01, 2008 12:07 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method If you have CA products available, check out KWAKEUP. It handles everything that WAKEUP does and does it better. For example, it gives you an option to put the information about the event causing the interrupt into REXX variables. There is no need to clear the stack of wakeup entries that did not cause the interrupt. It also does not have any necessity of having an artificial pre-midnight wakeup. An interval can be started on one day and not trigger the interrupt until some future date. It is WAKEUP compatible should you choose to go that route.
Re: Best method
Did that - it didn't help. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Schuh, Richard Sent: Tuesday, July 01, 2008 12:09 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method You would probably need to SET CPCONIO IUCV. Regards, Richard Schuh
Re: Best method
I believe you could do a 'CP SET IMSG IUCV' and trap that message as well off the WAKEUP. Could Piping a CP Q R or CP Q RDR ALL into a variable get you the information you need so you don't have to handle both interupts? Bob Bates Enterprise Hosting Services - Enterprise Virtualization - z/VM and z/Linux w. (469)892-6660 c. (214) 907-5071 This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 11:04 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Bob: Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Thanks, in advance. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 10:21 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details
Re: Best method
Not many comments to explain the code but here is an example. WAKEUP RESET CP SET IMSG IUCV CP SET MSG IUCV . . . . . DATEOK: FLDATE = RIGHT(DATE(S,TDATE,U),6) SET CMSTYPE HT TELL OPERATOR AT NODEID GET LOG FLDATE WAKEUP '+00:00:15 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . IF FIND(RESPONSE,'DMSDSK002E') ¬=0 THEN SIGNAL ERREXT1 WAKEUP '+00:00:15 (RDR ' IF RC = 2 THEN SIGNAL ERREXT3 DO FOREVER SPNO = FIND(RESPONSE,'RDR FILE') IF SPNO ¬= 0 THEN DO SPNO = SPNO + 2 SIGNAL PEEKIT END WAKEUP '+00:00:10 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . END PEEKIT: DESBUF SPNO = WORD(RESPONSE,SPNO) QUEUE COMMAND SET RESERVED 1 HI SEELOG NODEID TDATE QUEUE COMMAND SET PF15 FFILE NODEID FLDATE PEEK SPNO '(FOR * PROFILE PROFDISZ' PURGE RDR SPNO EXIT: WAKEUP RESET SET MSG ON SET IMSG ON EXIT -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:10 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Best method All: What is the best method to code, for a SVM, a wait for a file to arrive in its reader? I have a (very old) EXEC that has a do forever loop with a EXECIO * CP (STEM aa. STRING CP Q RDR * ALL command followed by a SLEEP when no files are found. Is there a better method of waking up an EXEC when a RDR file arrives? Thanks, in advance. David Wakser
Re: Best method
Yes, I can try that - it just seemed that WAKEUP would handle the message also. The SET IMSG didn't help. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 12:14 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method I believe you could do a 'CP SET IMSG IUCV' and trap that message as well off the WAKEUP. Could Piping a CP Q R or CP Q RDR ALL into a variable get you the information you need so you don't have to handle both interupts? Bob Bates Enterprise Hosting Services - Enterprise Virtualization - z/VM and z/Linux w. (469)892-6660 c. (214) 907-5071 This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 11:04 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Bob: Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Thanks, in advance. David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Bob Bates Sent: Tuesday, July 01, 2008 10:21 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely, Use the WAKEUP module. I have a program that waits for reader files and messages. The waiting part looks like: do forever 'WAKEUP +30 (RDR IUCVMSG' saverc = rc select when saverc = 4 then process reader file when saverc = 5 then process a message You might want to change the +30 if all it does is wait for reader files. See HELP WAKEUP for details
Re: Best method
You did tell WAKEUP to trigger on IUCV messages, I presume. That has to be explicitly specified. Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:11 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Did that - it didn't help. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Schuh, Richard Sent: Tuesday, July 01, 2008 12:09 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method You would probably need to SET CPCONIO IUCV. Regards, Richard Schuh
Re: Best method
Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Well ... everyone was saying use WAKEUP and that's good advice, but I prefer to start with Pipelines. Pipes would catch all those messages you're interested in. Your EXEC would look something like ... /* REXX */ 'CP SET IMSG IUCV' 'PIPE STARMSG | REXX MYTHING' And then MYTHING REXX might begin as ... /* REXX */ Do Forever 'PEEKTO RECORD' /* examine the record, but do not consume it */ If rc ^= 0 Then Leave /* parse the variable record and figger things out */ 'READTO' /* now consume that record and loop to get another */ End You can do all of this with WAKEUP. The calling semantics are different. -- R;
Re: Best method
Querying the rdr and processing the responses is a better approach than asking WAKEUP to stack the reader arrived messages. As long as reader files exist in your reader, WAKEUP gets a single interrupt, not an interrupt for each file. I pipe the query rdr responses into a pipeline and hit the ground running. Are you familiar with using PIPES? I can supply a little example of using WAKEUP followed by a PIPE command. Good Luck. Jim Hughes 603-271-5586 Its kind of fun to do the impossible. (Walt Disney) =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Wakser, David =Sent: Tuesday, July 01, 2008 12:19 PM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =Yes, I can try that - it just seemed that WAKEUP would handle the =message also. The SET IMSG didn't help. = =David Wakser = =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Bob Bates =Sent: Tuesday, July 01, 2008 12:14 PM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =I believe you could do a 'CP SET IMSG IUCV' and trap that message as =well off the WAKEUP. Could Piping a CP Q R or CP Q RDR ALL into a =variable get you the information you need so you don't have to handle =both interupts? = = =Bob Bates =Enterprise Hosting Services - Enterprise Virtualization - z/VM and =z/Linux = =w. (469)892-6660 =c. (214) 907-5071 = =This message may contain confidential and/or privileged information. =If you are not the addressee or authorized to receive this for the =addressee, you must not use, copy, disclose, or take any action based on =this message or any information herein. If you have received this =message in error, please advise the sender immediately by reply e-mail =and delete this message. Thank you for your cooperation. = = = =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Wakser, David =Sent: Tuesday, July 01, 2008 11:04 AM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =Bob: = = Is there a method of also trapping the message that shows when =a file is sent to the VM reader? I need it to issue the RECEIVE =properly. In the HELP WAKEUP it seems that setting the various message =types to IUCV should work, but it doesn't seem to do that, = = Thanks, in advance. = =David Wakser = =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Bob Bates =Sent: Tuesday, July 01, 2008 10:21 AM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =Absolutely, = Use the WAKEUP module. = = I have a program that waits for reader files and messages. The =waiting part looks like: = = = do forever = 'WAKEUP +30 (RDR IUCVMSG' = saverc = rc = select = when saverc = 4 then = process reader file = when saverc = 5 then = process a message = =You might want to change the +30 if all it does is wait for reader =files. See HELP WAKEUP for details
Re: Best method
Jim: Thanks. Yes, I am somewhat comfortable with PIPES. Perhaps I'll just revert back to how I did it 20 years ago - except I'll spruce it up with PIPES! David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Hughes, Jim Sent: Tuesday, July 01, 2008 12:23 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Querying the rdr and processing the responses is a better approach than asking WAKEUP to stack the reader arrived messages. As long as reader files exist in your reader, WAKEUP gets a single interrupt, not an interrupt for each file. I pipe the query rdr responses into a pipeline and hit the ground running. Are you familiar with using PIPES? I can supply a little example of using WAKEUP followed by a PIPE command. Good Luck. Jim Hughes 603-271-5586 Its kind of fun to do the impossible. (Walt Disney) =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Wakser, David =Sent: Tuesday, July 01, 2008 12:19 PM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =Yes, I can try that - it just seemed that WAKEUP would handle the =message also. The SET IMSG didn't help. = =David Wakser = =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Bob Bates =Sent: Tuesday, July 01, 2008 12:14 PM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =I believe you could do a 'CP SET IMSG IUCV' and trap that message as =well off the WAKEUP. Could Piping a CP Q R or CP Q RDR ALL into a =variable get you the information you need so you don't have to handle =both interupts? = = =Bob Bates =Enterprise Hosting Services - Enterprise Virtualization - z/VM and =z/Linux = =w. (469)892-6660 =c. (214) 907-5071 = =This message may contain confidential and/or privileged information. =If you are not the addressee or authorized to receive this for the =addressee, you must not use, copy, disclose, or take any action based on =this message or any information herein. If you have received this =message in error, please advise the sender immediately by reply e-mail =and delete this message. Thank you for your cooperation. = = = =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Wakser, David =Sent: Tuesday, July 01, 2008 11:04 AM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =Bob: = = Is there a method of also trapping the message that shows when =a file is sent to the VM reader? I need it to issue the RECEIVE =properly. In the HELP WAKEUP it seems that setting the various message =types to IUCV should work, but it doesn't seem to do that, = = Thanks, in advance. = =David Wakser = =-Original Message- =From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On =Behalf Of Bob Bates =Sent: Tuesday, July 01, 2008 10:21 AM =To: IBMVM@LISTSERV.UARK.EDU =Subject: Re: Best method = =Absolutely, = Use the WAKEUP module. = = I have a program that waits for reader files and messages. The =waiting part looks like: = = = do forever = 'WAKEUP +30 (RDR IUCVMSG' = saverc = rc = select = when saverc = 4 then = process reader file = when saverc = 5 then = process a message = =You might want to change the +30 if all it does is wait for reader =files. See HELP WAKEUP for details
Re: Best method
How would the STARMSG pipeline detect someone typing a message at the console and hitting the ENTER key? Would it require another concurrent pipe running? I like WAKEUP because I can set timer interrupts, reader interrupts, message interrupts, and console interrupts. ___ Jim Hughes 603-271-5586 Its kind of fun to do the impossible. (Walt Disney) From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Richard Troth Sent: Tuesday, July 01, 2008 12:12 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Well ... everyone was saying use WAKEUP and that's good advice, but I prefer to start with Pipelines. Pipes would catch all those messages you're interested in. Your EXEC would look something like ... /* REXX */ 'CP SET IMSG IUCV' 'PIPE STARMSG | REXX MYTHING' And then MYTHING REXX might begin as ... /* REXX */ Do Forever 'PEEKTO RECORD' /* examine the record, but do not consume it */ If rc ^= 0 Then Leave /* parse the variable record and figger things out */ 'READTO' /* now consume that record and loop to get another */ End You can do all of this with WAKEUP. The calling semantics are different. -- R;
Re: Best method
Jim Hughes asked: How would the STARMSG pipeline detect someone typing a message at the console and hitting the ENTER key? Would it require another concurrent pipe running? Concurrent, yes. For console input, I would simply fan-in a CONSOLE stage. You can even fan-in TCP connections, if you like. (trickier) What I typically do is attach the stages from within the gem (eg: MYTHING REXX). Something like ... /* REXX */ ... other stuff ... 'ADDPIPE (END !) STARMSG | FI: FANINANY | *.INPUT:' , 'CONSOLE ASYNC | SPEC /CONSOLE / | FI:' ... main body and the peekto/readto loop ... In this example, STARMSG prefixes each record with a message type, so I also prefix CONSOLE to each record of terminal input. -- R;
Re: Best method
Ugh, such ugly code. Have a look at the TCVM1 package to learn some REXX coding techniques. It is an HTML selfstudy. 2008/7/1 Huegel, Thomas [EMAIL PROTECTED]: Not many comments to explain the code but here is an example. WAKEUP RESET CP SET IMSG IUCV CP SET MSG IUCV . . . . . DATEOK: FLDATE = RIGHT(DATE(S,TDATE,U),6) SET CMSTYPE HT TELL OPERATOR AT NODEID GET LOG FLDATE WAKEUP '+00:00:15 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . IF FIND(RESPONSE,'DMSDSK002E') ¬=0 THEN SIGNAL ERREXT1 WAKEUP '+00:00:15 (RDR ' IF RC = 2 THEN SIGNAL ERREXT3 DO FOREVER SPNO = FIND(RESPONSE,'RDR FILE') IF SPNO ¬= 0 THEN DO SPNO = SPNO + 2 SIGNAL PEEKIT END WAKEUP '+00:00:10 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . END PEEKIT: DESBUF SPNO = WORD(RESPONSE,SPNO) QUEUE COMMAND SET RESERVED 1 HI SEELOG NODEID TDATE QUEUE COMMAND SET PF15 FFILE NODEID FLDATE PEEK SPNO '(FOR * PROFILE PROFDISZ' PURGE RDR SPNO EXIT: WAKEUP RESET SET MSG ON SET IMSG ON EXIT -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:10 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Best method All: What is the best method to code, for a SVM, a wait for a file to arrive in its reader? I have a (very old) EXEC that has a do forever loop with a EXECIO * CP (STEM aa. STRING CP Q RDR * ALL command followed by a SLEEP when no files are found. Is there a better method of waking up an EXEC when a RDR file arrives? Thanks, in advance. David Wakser -- Kris Buelens, IBM Belgium, VM customer support
Re: Best method
Kris: Be nice, please - he was kind enough to send me the code to see a living example! :) David Wakser From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Kris Buelens Sent: Tuesday, July 01, 2008 12:57 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method To all readers thinking they'd nee to intercept the message of an arriving spool file: it leaves a hole: reader files sitting there before WAKEUP/PIPE/xxx were active remain in the reader until another RDR file arrives. WAKEUP hasn't that problem. And, you can save yourself a lot a work by looking at my RxServer package: it handles reader fies etc, built around WAKEUP, with built-in security etc. 2008/7/1 Hughes, Jim [EMAIL PROTECTED]: How would the STARMSG pipeline detect someone typing a message at the console and hitting the ENTER key? Would it require another concurrent pipe running? I like WAKEUP because I can set timer interrupts, reader interrupts, message interrupts, and console interrupts. ___ Jim Hughes 603-271-5586 Its kind of fun to do the impossible. (Walt Disney) From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Richard Troth Sent: Tuesday, July 01, 2008 12:12 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Is there a method of also trapping the message that shows when a file is sent to the VM reader? I need it to issue the RECEIVE properly. In the HELP WAKEUP it seems that setting the various message types to IUCV should work, but it doesn't seem to do that, Well ... everyone was saying use WAKEUP and that's good advice, but I prefer to start with Pipelines. Pipes would catch all those messages you're interested in. Your EXEC would look something like ... /* REXX */ 'CP SET IMSG IUCV' 'PIPE STARMSG | REXX MYTHING' And then MYTHING REXX might begin as ... /* REXX */ Do Forever 'PEEKTO RECORD' /* examine the record, but do not consume it */ If rc ^= 0 Then Leave /* parse the variable record and figger things out */ 'READTO' /* now consume that record and loop to get another */ End You can do all of this with WAKEUP. The calling semantics are different. -- R; -- Kris Buelens, IBM Belgium, VM customer support
Re: Best method
Not pretty, but it has worked for a very long time. Sort of like an old horse she may not look like much, but she still plows the field. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Kris Buelens Sent: Tuesday, July 01, 2008 11:59 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Ugh, such ugly code. Have a look at the TCVM1 package to learn some REXX coding techniques. It is an HTML selfstudy. 2008/7/1 Huegel, Thomas [EMAIL PROTECTED]: Not many comments to explain the code but here is an example. WAKEUP RESET CP SET IMSG IUCV CP SET MSG IUCV . . . . . DATEOK: FLDATE = RIGHT(DATE(S,TDATE,U),6) SET CMSTYPE HT TELL OPERATOR AT NODEID GET LOG FLDATE WAKEUP '+00:00:15 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . IF FIND(RESPONSE,'DMSDSK002E') ¬=0 THEN SIGNAL ERREXT1 WAKEUP '+00:00:15 (RDR ' IF RC = 2 THEN SIGNAL ERREXT3 DO FOREVER SPNO = FIND(RESPONSE,'RDR FILE') IF SPNO ¬= 0 THEN DO SPNO = SPNO + 2 SIGNAL PEEKIT END WAKEUP '+00:00:10 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . END PEEKIT: DESBUF SPNO = WORD(RESPONSE,SPNO) QUEUE COMMAND SET RESERVED 1 HI SEELOG NODEID TDATE QUEUE COMMAND SET PF15 FFILE NODEID FLDATE PEEK SPNO '(FOR * PROFILE PROFDISZ' PURGE RDR SPNO EXIT: WAKEUP RESET SET MSG ON SET IMSG ON EXIT -Original Message- From: The IBM z/VM Operating System [mailto: [EMAIL PROTECTED] Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:10 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Best method All: What is the best method to code, for a SVM, a wait for a file to arrive in its reader? I have a (very old) EXEC that has a do forever loop with a EXECIO * CP (STEM aa. STRING CP Q RDR * ALL command followed by a SLEEP when no files are found. Is there a better method of waking up an EXEC when a RDR file arrives? Thanks, in advance. David Wakser -- Kris Buelens, IBM Belgium, VM customer support
Re: Best method
Looks okay to me. I have a lot of stuff like that. It's a tool, not a piece of art! On Tue, Jul 1, 2008 at 1:07 PM, Huegel, Thomas [EMAIL PROTECTED] wrote: Not pretty, but it has worked for a very long time. Sort of like an old horse she may not look like much, but she still plows the field. -Original Message- *From:* The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of *Kris Buelens *Sent:* Tuesday, July 01, 2008 11:59 AM *To:* IBMVM@LISTSERV.UARK.EDU *Subject:* Re: Best method Ugh, such ugly code. Have a look at the TCVM1 package to learn some REXX coding techniques. It is an HTML selfstudy. 2008/7/1 Huegel, Thomas [EMAIL PROTECTED]: Not many comments to explain the code but here is an example. WAKEUP RESET CP SET IMSG IUCV CP SET MSG IUCV . . . . . DATEOK: FLDATE = RIGHT(DATE(S,TDATE,U),6) SET CMSTYPE HT TELL OPERATOR AT NODEID GET LOG FLDATE WAKEUP '+00:00:15 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . IF FIND(RESPONSE,'DMSDSK002E') ¬=0 THEN SIGNAL ERREXT1 WAKEUP '+00:00:15 (RDR ' IF RC = 2 THEN SIGNAL ERREXT3 DO FOREVER SPNO = FIND(RESPONSE,'RDR FILE') IF SPNO ¬= 0 THEN DO SPNO = SPNO + 2 SIGNAL PEEKIT END WAKEUP '+00:00:10 (IUCVMSG' IF RC = 2 THEN SIGNAL ERREXT3 PULL RESPONSE PARSE VAR RESPONSE MTYPE . MNO . SPNO . END PEEKIT: DESBUF SPNO = WORD(RESPONSE,SPNO) QUEUE COMMAND SET RESERVED 1 HI SEELOG NODEID TDATE QUEUE COMMAND SET PF15 FFILE NODEID FLDATE PEEK SPNO '(FOR * PROFILE PROFDISZ' PURGE RDR SPNO EXIT: WAKEUP RESET SET MSG ON SET IMSG ON EXIT -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 9:10 AM To: IBMVM@LISTSERV.UARK.EDU Subject: Best method All: What is the best method to code, for a SVM, a wait for a file to arrive in its reader? I have a (very old) EXEC that has a do forever loop with a EXECIO * CP (STEM aa. STRING CP Q RDR * ALL command followed by a SLEEP when no files are found. Is there a better method of waking up an EXEC when a RDR file arrives? Thanks, in advance. David Wakser -- Kris Buelens, IBM Belgium, VM customer support -- Mark Pace Mainline Information Systems
Re: Best method
On Tue, Jul 1, 2008 at 7:07 PM, Huegel, Thomas [EMAIL PROTECTED] wrote: Not pretty, but it has worked for a very long time. Sort of like an old horse she may not look like much, but she still plows the field. My belly button does what I need it to do, but I don't show it to others ;-) I would obviously go for the Pipes version and avoid the mentioned risk of missing files while you were not looking. -Rob
Re: Best method
And definitely not at SHARE! :) Rob van der Heij wrote: My belly button does what I need it to do, but I don't show it to others ;-) -- Rich Smrcina VM Assist, Inc. Phone: 414-491-6001 Ans Service: 360-715-2467 rich.smrcina at vmassist.com http://www.linkedin.com/in/richsmrcina Catch the WAVV! http://www.wavv.org WAVV 2009 - Orlando, FL - May 15-19, 2009
Re: Best method
And to further muddy the waters here a bit, there is the RXWAIT package, available here: http://uvvm.uvic.ca/~freeware/ can do what WAKEUP does and much more as well. Both excellent documentation and the source code is provided. I can, however, understand David's desire to use only plain vanilla tools, that are guaranteed to be available on any z/VM system. Makes installing and running his tool on multiple systems easier. Rob, all my belly button does is collect lintwhat does your's do for you? :-) Happy Forth of July, too, and Canada Day as well. Rich Smrcina wrote: And definitely not at SHARE! :) Rob van der Heij wrote: My belly button does what I need it to do, but I don't show it to others ;-) -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
Dave, Sounds like yours is doing what it is supposed to do. You probably still do not go around showing it off, do you? Regards, Richard Schuh Rob, all my belly button does is collect lintwhat does your's do for you? :-) Happy Forth of July, too, and Canada Day as well. Rich Smrcina wrote: And definitely not at SHARE! :) Rob van der Heij wrote: My belly button does what I need it to do, but I don't show it to others ;-) -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
2008/7/1 Huegel, Thomas [EMAIL PROTECTED]: That's one reason why we put a timer in WAKEUP so we can go recheck the RDR every so often. With WAKEUP (RDR, there is no need to add a timer interrupt too. WAKEUP will present RC=4 when a RDR file is available. -- Kris Buelens, IBM Belgium, VM customer support P.S. today at 16h15 I shut down my customer's last 2 VM systems and waived goodbye to the people I worked with the last years. For those who understand some French: for most of them it propably was an a Dieu, no an au revoir.
Re: Best method
Absolutely not! My wife simply forbids it, even at the beach:-) Schuh, Richard wrote: Dave, Sounds like yours is doing what it is supposed to do. You probably still do not go around showing it off, do you? Regards, Richard Schuh Rob, all my belly button does is collect lintwhat does your's do for you? :-) Happy Forth of July, too, and Canada Day as well. Rich Smrcina wrote: And definitely not at SHARE! :) Rob van der Heij wrote: My belly button does what I need it to do, but I don't show it to others ;-) -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
I know a girl that has a diamond in hers she always shows it at the beach. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Dave Jones Sent: Tuesday, July 01, 2008 3:18 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Absolutely not! My wife simply forbids it, even at the beach:-) Schuh, Richard wrote: Dave, Sounds like yours is doing what it is supposed to do. You probably still do not go around showing it off, do you? Regards, Richard Schuh Rob, all my belly button does is collect lintwhat does your's do for you? :-) Happy Forth of July, too, and Canada Day as well. Rich Smrcina wrote: And definitely not at SHARE! :) Rob van der Heij wrote: My belly button does what I need it to do, but I don't show it to others ;-) -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com -- DJ V/Soft z/VM and mainframe Linux expertise, training, consulting, and software development www.vsoft-software.com
Re: Best method
And if you leave that RDR file in the queue without holding it, it will give you another interrupt immediately. Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Kris Buelens Sent: Tuesday, July 01, 2008 12:40 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method 2008/7/1 Huegel, Thomas [EMAIL PROTECTED]: That's one reason why we put a timer in WAKEUP so we can go recheck the RDR every so often. With WAKEUP (RDR, there is no need to add a timer interrupt too. WAKEUP will present RC=4 when a RDR file is available. -- Kris Buelens, IBM Belgium, VM customer support P.S. today at 16h15 I shut down my customer's last 2 VM systems and waived goodbye to the people I worked with the last years. For those who understand some French: for most of them it propably was an a Dieu, no an au revoir.
Re: Best method
See, folks, this is the part where I come across like I'm all humor-deficient... I'm pretty sure that piercings and belly-button lint aren't terribly relevant to the stated topic of the list. It's all about the signal-to-noise ratio, kids. Please resist the urge to push this one back up the hill again. Your humble moderator, -dan.
Re: Best method
It all depends on what you want to do. In some cases you may not want to wait forever for a file that may never arrive. So you put the timer in. If on the other hand the vm is totally driven by the arrival of a RDR file, then there would be no reason to have a timer value. -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Schuh, Richard Sent: Tuesday, July 01, 2008 3:25 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method And if you leave that RDR file in the queue without holding it, it will give you another interrupt immediately. Regards, Richard Schuh -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Kris Buelens Sent: Tuesday, July 01, 2008 12:40 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method 2008/7/1 Huegel, Thomas [EMAIL PROTECTED]: That's one reason why we put a timer in WAKEUP so we can go recheck the RDR every so often. With WAKEUP (RDR, there is no need to add a timer interrupt too. WAKEUP will present RC=4 when a RDR file is available. -- Kris Buelens, IBM Belgium, VM customer support P.S. today at 16h15 I shut down my customer's last 2 VM systems and waived goodbye to the people I worked with the last years. For those who understand some French: for most of them it propably was an a Dieu, no an au revoir.
Re: Best method
Rob, all my belly button does is collect lintwhat does your's do for you? :-) That is way, *way* too much information.
Re: Best method
Lambasting another person's code when they were simply trying to help by sharing it didn't seem too relevant to the stated topic either, yet no one intervened THEN. This tells me we tolerate blatant rudeness, but not humor interjected to defuse tension caused by the rudeness. Guess it's all a matter of what our values are. The humor did get a bit over the top. But not nearly to the degree that good manners were disregarded. Cathy McBride Manager, Z-Series, I-Series, P-Series Support Kable News Company, Inc -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Daniel P. Martin Sent: Tuesday, July 01, 2008 3:27 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method See, folks, this is the part where I come across like I'm all humor-deficient... I'm pretty sure that piercings and belly-button lint aren't terribly relevant to the stated topic of the list. It's all about the signal-to-noise ratio, kids. Please resist the urge to push this one back up the hill again. Your humble moderator, -dan.
Re: Best method
Cathy: I absolutely did say something at the time! I commented that it was rude to criticize the code of someone who was helpful enough to present a working example. Perhaps you missed that one! David Wakser -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of McBride, Catherine Sent: Tuesday, July 01, 2008 5:25 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Lambasting another person's code when they were simply trying to help by sharing it didn't seem too relevant to the stated topic either, yet no one intervened THEN. This tells me we tolerate blatant rudeness, but not humor interjected to defuse tension caused by the rudeness. Guess it's all a matter of what our values are. The humor did get a bit over the top. But not nearly to the degree that good manners were disregarded. Cathy McBride Manager, Z-Series, I-Series, P-Series Support Kable News Company, Inc -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Daniel P. Martin Sent: Tuesday, July 01, 2008 3:27 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method See, folks, this is the part where I come across like I'm all humor-deficient... I'm pretty sure that piercings and belly-button lint aren't terribly relevant to the stated topic of the list. It's all about the signal-to-noise ratio, kids. Please resist the urge to push this one back up the hill again. Your humble moderator, -dan.
Re: Best method
Yes, you did (bless you!) I should have said, 'intervened in any official capacity'. Kind regards, McB -Original Message- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] Behalf Of Wakser, David Sent: Tuesday, July 01, 2008 4:30 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: Best method Cathy: I absolutely did say something at the time!
Re: Best method
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
Re: Best method
On Wed, Jul 2, 2008 at 12:03 AM, Wakser, David [EMAIL PROTECTED] wrote: WAKEUP +2 (RDR IUCVMSG QUIET /* Check for files every 2 minutes */ For what I understand of WAKEUP, this is still overkill. If you just want to wait for RDR files, you don't need to wakeup each time to check. When a RDR file arrives you will wake up immediately. As long as you initialize WAKEUP properly and don't reset it, you should not even lose RDR file triggers (so WAKEUP will return immediately when there's another interrupt waiting). The mix of time and event is for when you *also* need to do things based on time schedule (eg close spool files every hour or so). -Rob (and I apologize for distracting the thread earlier)
Re: Best method
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