Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GETMSG 1

Status
Not open for further replies.

JoseAngel

Technical User
Nov 24, 2006
4
ES
Hello all.
I'm running a JES command from a REXX ($D N,ALL) and I want to collect all output from it, but I'm only getting the first item. My REXX code is the follow:

COMANDO = '$D N,ALL'
"CONSOLE DEACTIVATE"
"CONSPROF SOLDISP(NO) SOLNUM(5) UNSOLDISPLAY(NO)"
"CONSOLE ACTIVATE"
ADDRESS CONSOLE
"CART JES20001"
INTERPRET '"'COMANDO'"'
CR = GETMSG('MENSA.','SOL','JES20001',,60)
ADDRESS TSO
IF CR = 0 THEN
DO I = 1 TO MENSA.0
SAY '***' MENSA.I
END
ELSE SAY '****** ERROR EN EL COMANDO'
"CONSOLE DEACTIVATE"

Please, could anybody help me?
Thanks in advance.
 
The $D N,ALL returns multiple multi-line responses ($HASP890 messages). A single getmsg will only get the first response message.

If you code:

CR = GETMSG('MENSA.1.','SOL','JES20001',,60)
CR = GETMSG('MENSA.2.','SOL','JES20001')
CR = GETMSG('MENSA.3.','SOL','JES20001')

You'll get the first three responses. One in each MENSA.x.

You either need to code numerous getmsg commands or use a loop. You will need a ballpark figure on the number of responses you expect. Also, if you exceed the CONDEF DISPMAX value the display ends with a $HASP003 message followed by a $HASP646 message (it does on my JES2 system anyway).

Hope this helps.





 
Thanks for your reply. But, how can I get the CONDEF DISPMAX value in a REXX?
 
Use getmsg to issue $D CONDEF (JES2 command), it will display the current values of CONDEF.
$T CONDEF may be used to change the values, however, CONDEF is for all consoles and you should really check into the init and tunning guide for JES2 first. (You don't want your console buffers to fill).
You can GOOGLE CONDEF DISPMAX for more info.
 
What are you trying to achive using the $D N,ALL command?

At many shops that command will yield thousands on lines.

What are you actually wanting to do? Tie a jobname to a jobnumber? Invariably there will be a better way of doing this.
 
JoseAngel,

If you want the full set you will have to stack into the JES or RSCS queue then pull from the queue with a loop.

YMR
 
Really, I want to get all the jobs ended and not purged in the held output queue.
 
This has left REXX and gone into JES2. (You may want to check a JES site, if there is one)

You might want to check out either of these two commands:
$D O J with the OUTDISP=HOLD parameter
this only shows hold q, but many lines each
$D J with the TYPE=JOB parameter
not as many lines, but shows all jobs
(The J is actually a range, J200-500, J1-*, J9567)
You can find the commands in the JES2 Commands manual.

Be advised, these will still return a lot of messages.

Good Luck.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top