Smart questions
Smart answers
Smart people
Join Tek-Tips Forums
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

JoseAngel (TechnicalUser) (OP)
24 Nov 06 6:09
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.
Helpful Member!  rxpgmr (IS/IT--Management)
28 Nov 06 16:14
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.  





JoseAngel (TechnicalUser) (OP)
29 Nov 06 6:00
Thanks for your reply. But, how can I get the CONDEF DISPMAX value in a REXX?
rxpgmr (IS/IT--Management)
29 Nov 06 10:36
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.
kevinf2349 (TechnicalUser)
29 Nov 06 14:33
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.
YoungManRiver (IS/IT--Management)
29 Nov 06 16:11
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
JoseAngel (TechnicalUser) (OP)
30 Nov 06 2:55
Really, I want to get all the jobs ended and not purged in the held output queue.
rxpgmr (IS/IT--Management)
1 Dec 06 16:07
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.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close