RC 4 in GETMSG create CONSOLE



IBM's Command List programming language & Restructured Extended Executor

RC=4 in GETMSG

Postby v1gnesh » Sun Aug 12, 2012 7:26 am

Hi,

That is present. :)
boyo
v1gnesh
 
Posts: 72
Joined: Wed Sep 28, 2011 8:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: rc 4 in GETMSG

Postby dick scherrer » Sun Aug 12, 2012 7:32 am

Hello,

What else might not have been posted . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: rc 4 in GETMSG

Postby Pedro » Sun Aug 12, 2012 10:40 am

This works for me... (extracted from larger exec):
Address TSO             
"CONSPROF SOLDISPLAY(NO)"
"CONSOLE ACTIVATE NAME(TSTCHANG)" 
Address CONSOLE   
"CART TSTCHADD"             
"d u,dasd,online,000,9999"   
xx = getmsg('TSTCHADD.','sol','TSTCHADD',,59)
vollist = ''                                 
do z1 = 3 to TSTCHADD.0                     
  parse var TSTCHADD.z1 . . . vol .         
  vollist = vollist vol                     
End
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: rc 4 in GETMSG

Postby v1gnesh » Sun Aug 12, 2012 12:10 pm

dick scherrer wrote:Hello,

What else might not have been posted . . .


This is the whole package.
I'll try Pedro's suggestion and report back.

EDIT: Thank you, Pedro. This works for me. I would still like to find out what was wrong with the one I coded..

v1gnesh
boyo
v1gnesh
 
Posts: 72
Joined: Wed Sep 28, 2011 8:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: rc 4 in GETMSG

Postby v1gnesh » Sun Aug 12, 2012 1:06 pm

I'm trying to do this so that I can issue commands to EMC's started task(EMCRDF) and read its output. The command I'll be using finally is there as a comment in the code I had pasted in the first post. The task takes a few seconds to send a return the result and hence I need a wait time of about 10-20 seconds.

Pedro's code works, but when I change SOLDISPLAY to YES, I end up getting the rc 4.
boyo
v1gnesh
 
Posts: 72
Joined: Wed Sep 28, 2011 8:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: rc 4 in GETMSG

Postby Pedro » Mon Aug 13, 2012 9:39 pm

I would still like to find out what was wrong with the one I coded..

I am not sure how you missed it when you read the manual.

From TSO/E System Programming Command Reference, SA22-7793-04, referring to CONSPROF:
SOLDISPLAY(YES | NO)
...
NO ... If NO is specified, solicited messages are stored ... where you can retrieve them using GETMSG.


It is not explicitly stated, but probably specifying SOLDISPLAY(YES) prevent the GETMSG from working.

And from the Rexx Reference:
To use GETMSG, you must:
* Have solicited or unsolicited messages stored rather than displayed at
the terminal during a console session. ...
You can also use the TSO/E CONSPROF command to specify that solicited
or unsolicited messages should not be displayed during a console
session.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: rc 4 in GETMSG

Postby v1gnesh » Tue Aug 14, 2012 9:07 am

OK.. my bad. Thanks again!
v1gnesh wrote:I'm trying to do this so that I can issue commands to EMC's started task(EMCRDF) and read its output. The command I'll be using finally is there as a comment in the code I had pasted in the first post. The task takes a few seconds to send a return the result and hence I need a wait time of about 10-20 seconds.
I'm unable to obtain the responses in the array even after quoting a delay.
boyo
v1gnesh
 
Posts: 72
Joined: Wed Sep 28, 2011 8:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: rc 4 in GETMSG

Postby NicC » Tue Aug 14, 2012 10:55 am

Did you have SOLDISPLAY(NO) specified?
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: rc 4 in GETMSG

Postby v1gnesh » Tue Aug 14, 2012 4:00 pm

NicC wrote:Did you have SOLDISPLAY(NO) specified?


Yep.
boyo
v1gnesh
 
Posts: 72
Joined: Wed Sep 28, 2011 8:24 pm
Has thanked: 1 time
Been thanked: 0 time

Re: rc 4 in GETMSG

Postby enrico-sorichetti » Tue Aug 14, 2012 4:53 pm

my working snippet ...
****** ***************************** Top of Data ******************************
000001 /*REXX - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000002 /*                                                                   */
000003 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000004 Trace "O"
000005 Parse Source _sys _how _cmd .
000006 args = "d grs,enq,contention"
000007 cart = "OPER0001"
000008 _msg = msg("OFF")
000009 zrc = $tsoex("CONSOLE DEACTIVATE ")
000010 zrc = $tsoex("CONSPROF SOLDISP(NO) SOLNUM(9999)" )
000011 zrc = $tsoex("CONSOLE ACTIVATE")
000012 if zrc = 0 then do
000013    zrc = $tsoex("CONSOLE SYSCMD("args") CART("cart") ")
000014    if zrc = 0 then do
000015       zrc = getmsg("consrepl.",,cart,,120)
000016    end
000017    zrc = $tsoex("CONSOLE DEACTIVATE ")
000018 end
000019 do i = 1 to consrepl.0
000020    say i consrepl.i
000021 end
000022 _msg = msg(_msg)
000023 exit
000024
000025 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000026 $tsoex:
000027    tso_0tr = trace("O")
000028    Address TSO arg(1)
000029    tso_0rc = rc
000030    trace value(tso_0tr)
000031    return tso_0rc
000032
000033 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000034 $ispex:
000035    isp_tr = trace("O")
000036    Address ISPEXEC arg(1)
000037    isp_rc = rc
000038    trace value(isp_tr)
000039    return isp_rc
000040 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
000041 $isred:
000042    isr_tr = trace("O")
000043    Address ISREDIT arg(1)
000044    isr_rc = rc
000045    trace value(isr_tr)
000046    return isr_rc
000047
****** **************************** Bottom of Data ****************************
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

PreviousNext

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post