Scott,

Try this:

/* REXX */

   address "COMMAND"

  "CP SET  MSG IUCV"

  "PIPE (ENDCHAR ?) STARMSG *MSG CP SMSG RSCS QUERY LINKS ",
     "| specs 17-* 1",           /* Drop the first 16 chars          */
     "| STEM REC.",
     "| LITERAL +5  | DELAY",
     "| PIPESTOP"

   say "HowMany" rec.0
  "CP SET  MSG ON "

   say rec.0
   say rec.1
   say rec.2
   say rec.3
   say rec.4

exit

Which yields:

HowMany 2653
2653
Link                         Line
Name     Status     Type     Addr LU Name  Logmode  Queueing
RSCS400  active     NJE      0400 ...      ...      FIFO
LINKY01  inactive   SNANJE   0000 LUNNY01  RSCSNJE0 FIFO

Jim
-----Original Message-----
From: The IBM z/VM Operating System [mailto:[email protected]] On Behalf 
Of Wandschneider, Scott
Sent: Monday, March 23, 2009 9:54 AM
To: [email protected]
Subject: RSCS Query

I would like to issue an RSCS QUERY LINKS and "queue" the results so I can spin 
through the response looking for information.  Here is a snippet from an 
experimental REXX EXEC.  The results from the query are displayed back at my 
terminal and the @HowMany variable is always zero.  Any ideas? 

Check_Links:                                   
'pipe cp smsg RSCS query links | stem @Rec. '  
@HowMany = @Rec.0                              
Say "HowMany" @HowMany                         
Do x = 1 to @HowMany                            
.
.
.
End /* DO */

Scott R Wandschneider

Senior Systems Programmer|| Infocrossing, a Wipro Company || 11707 Miracle 
Hills Drive, Omaha, NE, 68154-4457|| ': 402.963.8905 || Ë:847.849.7223  || :: 
[email protected] **Think Green  - Please print responsibly**


Confidentiality Note: This e-mail, including any attachment to it, may contain 
material that is confidential, proprietary, privileged and/or "Protected Health 
Information," within the meaning of the regulations under the Health Insurance 
Portability & Accountability Act as amended.  If it is not clear that you are 
the intended recipient, you are hereby notified that you have received this 
transmittal in error, and any review, dissemination, distribution or copying of 
this e-mail, including any attachment to it, is strictly prohibited. If you 
have received this e-mail in error, please immediately return it to the sender 
and delete it from your system. Thank you.

Reply via email to