We have several REXX execs that issue HSM commands and then interrogate the 
output.  We do this using our automation product, OPS/MVS.  The following is an 
example of the command used to issue a "QUERY ACTIVE WAITING" command.

"OPSCMD COMMAND('F "hsmid",QUERY ACTIVE" cdsparm "WAITING')",     
  "SYSTEM("cpuid") STOPEND(NO) CMDRESP(REXX) PREFIX(LINE)",       
  "STOPMSG(""ARC0101I QUERY WAITING COMMAND COMPLETED"") LOG(OFF)"
if rc ¬= 0 then say 'OPSCMD RC='rc 'from' cpuid'.'                

This method or using the REXX CONSOLE host command environment are the best 
ways to issue the HSEND command and get the results back into your REXX 
program.  Both of these options requires the proper RACF authority.

There is a macro that can be called to issue an HSEND command from a program, 
but it does not look like it provides a way to get the output from the command 
back into the calling program.  This macro is documented in the "DFSMShsm 
Managing Your Own Data Sets" manual 
(http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2U340/3.1.11?SHELF=EZ2ZO10G&DT=20050710181029).


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Rob 
Scott
Sent: Tuesday, December 12, 2006 7:11 AM
To: [email protected]
Subject: Re: Trying to catch output from HSEND command

Yes - we have been here before - and unfortunately there is NO elegant
solution to getting HSM information into an easy to digest format.

Even if you manage to get the HSM information back into either a dataset
or EMCS console - you still have the issue of parsing output meant for
the human eye rather than a program. IBM have also changed formats of
messages quite drastically between releases of software or with PTFs
(for example the format of the MQ series "DISPLAY USAGE" command.

I raised a share request for a supported API into HSM information many
years ago - but I believe this died a death due to lack of interest from
anyone but me. 

For what is is worth you can get this information by using cross-memory
services but this opens a Pandora's Box of possible OCO control blocks,
non-GUPI code and offset and length changes between releases ( and I
*do* have the scars for this....). 


Rob Scott
Rocket Software, Inc
275 Grove Street
Newton, MA 02466
617-614-2305
[EMAIL PROTECTED]
http://www.rs.com/portfolio/mxi_g2

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to