Thanks for the EXEC. I am going to look up a bit on using what we have now (VM:Operator) to see if it can do the equivalent. I was hoping to find a way without resorting to issuing a SMSG to RSCS and looking for the response.
Mike -----Original Message----- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Schuh, Richard Sent: December 8, 2006 3:58 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: How to find tag info for a spool file not your own Perhaps even better - use an EXEC that sends the command to RSCS and uses the Command Response Interface to receive the result. Here is one that I have been using for years: ************************************************************************************* GETRSCS EXEC ************************************************************************************* /* This exec issues a command to an RSCS machine and returns the response to the caller in a stem variable. GETRSCS may be called in one of the following ways: 1. 'EXEC GETRSCS parms' 2. call getrscs parms 3. var = getrscs(parms) In all cases, the caller must be an exec which can receive its response in an array. The possible parameters are: Parameter Description STEM var specifies the name of the stem variable into which the reply is to be placed. If no stem is specified, then "STEM REPLY." will be assumed. Upon return, var0 will contain the number of lines in the reply and the reply will occupy var1 through varn (var0 = n). TEST specifies that the command is to be issued to a test RSCS mmachine. If omitted, RSCS will be the target VM. filters specifies whether headings and messages are to be filtered out or returned with the reply. The possible filter values are "H", indicating that headings are to be included, and "M", indicating that messages are to be included. If neither H nor M is specified, then only the command reply is returned. Order of specification (if both are included) is unimportant. command is the command to be issued to the RSCS machine. Order of parameters: "STEM var" and "TEST", if specified must preceed "filters" and "command". Order between these two is arbitrary. "filters", if specified, must immediately preceed "command" which must always be last. Written: 10/06/98 by Richard Schuh Revised: 12/09/98 by rns - PIPE was not ending if GETRSCS was executed from ISPF environment */ address command /* Issue CMS and CP commands directly */ signal on novalue /* Trap possible use of uninitialized variables */ signal on syntax /* Trap possible REXX syntax errors */ arg stuff rscsid = 'RSCS' array = 'reply.' le = '15'x /* line-end */ wait = '10' stg = '' /* initialize some stuff */ hdgs = 0 msgs = 0 do forever parse var stuff tst stuff select; when tst = 'TEST' then rscsid = 'RSCST' when tst = 'STEM' then parse var stuff array stuff when tst = 'H' then hdgs = 1 /* headings wanted */ when tst = 'M' then msgs = 1 /* messages wanted */ otherwise do /* done */ cmd = tst stuff leave end end /* select; */ end /* do forever */ select; when ¬msgs & ¬hdgs then stg = 'nfind M| nfind H' /* if neither headings nor messages, filter them out of response */ when ¬msgs then stg = 'nfind M' /* if messages not wanted, ... */ when ¬hdgs then stg = 'nfind H' /* if headings not wanted ... */ otherwise stg = 'locate 1' /* both wanted - put in a nop type stage */ end /* select; */ mid = strip(left(userid(),6)) /* for rscs cri interface */ cmd = '(ML.'mid')' cmd /* build the complete command */ parse value diag(8,'Q SET') with 'MSG' msgset . ',' . 'PIPE (end \)', ' literal +'wait , /* wait no longer than 5 seconds */ '| delay', /* wait */ '| fia: faninany', '| take 1', '| pipestop', /* hold here */ '\ starmsg CP SET MSG IUCV'le'CP SMSG' rscsid cmd, '| eof: nlocate /'left(mid,6) 'M1L End of command response/', '| specs 17-* 1' , /* get rid of the what kind and who from stuff */ '| sort 11-14', /* ensure properly sorted by line number */ '| specs 32-* 1', /* get rid of header stuff */ '| 'stg ||, /* eliminate messages/trailers */ '| spec 5-* 1', /* eliminate the "B1L" */ '| stem' array '1', /* put in caller's array */ '\ eof:', /* headers and trailers to here */ '| fia:' 'CP SET MSG' msgset /* cleanup and back to normal */ return 0 ************************************************************************************************ GETRSCS HELPCMS ************************************************************************************************ .cm .cm This HELP Menu documwents the GETRSCS EXEC. .cm .cm Author: Richard Schuh .cm GETRSCS, which must be called by a REXX program, issues an RSCS command and returns the response to the caller in a stem variable. Command Format: ;- STEM REPLY. -; >>-- GETRSCS -;---------------;-;--------;-;-----;- cmd ->< '-- STEM var --' '- TEST -' ;|<--|; ;- H -; '- M -' Where: STEM var - specifies the name of the stem variable into which the command response is to be returned. The stem of a REXX variable that part of the variable name that preceeds the last period. The response will be returned in the variables var.1 var.2 ... var.n and var.0 will be set to equal the number of lines in the response. If omitted, the stem will default to "reply.". TEST - requests that the command be sent to the test RSCS machine. H - requests that response headings be returned in addition to the text of the response. Normally, only the text is returned. M - requests that response messages be returned in addition to the text of the response. cmd - is the RSCS command to be issued. GETRSCS can be invoked in any of the following ways from within a REXX program: 'EXEC GETRSCS parms' call getrscs parms retcode = getrscs(parms) -----Original Message----- From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On Behalf Of Rich Greenberg Sent: Friday, December 08, 2006 12:41 PM To: IBMVM@LISTSERV.UARK.EDU Subject: Re: How to find tag info for a spool file not your own On: Fri, Dec 08, 2006 at 02:16:28PM -0500,Horlick, Michael Wrote: } I would like to know if there is a way to find out the tag information } for a spool file in another user's (in my case, user RSCS) reader. I have done this many times. If you know the spoolid of the file in the RSCS reader and you can either make yourself a SECUSER of RSCS (or be able to observe its console via VM:Operator or some other means) then CP SEND rscsid CP Q TAG FI nnnn and watch the results on the rscs console. -- 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