Re: CP FOR through vmcp?

2020-08-22 Thread Michael MacIsaac
Hi,

Thanks for all the replies. However, what I take away is

> vmcp would need enhancements to  ...


Most of the code I write is driven from Linux, so it can issue CP commands
but cannot run CMS commands, thus any REXX EXEC.

Have any of the vmcp developers heard this requirement before?

-Mike M


On Sat, Aug 22, 2020 at 8:15 PM Donald Russell 
wrote:

> Does CPFOR have to be the first stage? I’d like to pass the userid as an
> argument and have it read commands from primary input and write responses
> to primary output, and the return code from each command to secondary
> output if connected.
>
> Similar to the CO and COMMAND stages.
>
>
>
> On Sat, Aug 22, 2020 at 13:23 Rob van der Heij  wrote:
>
>> I'm not going to try with vmcp, but I can do it with CMS Pipelines. Enjoy
>> (make sure to uppercase the relevant part of the CP command it issue).
>>
>> PIPE (END \) cpfor rvdh Q V 191 | insert ,> , | cons
>> > DASD 0191 3390 M01U01 R/W250 CYL ON DASD  1206 SUBCHANNEL = 
>> Ready; T=0.01/0.01 16:22:19
>> id
>> RVDHEIJ  AT RMHVMY   VIA *08/22/20 16:22:24 EDT  SATURDAY
>> Ready; T=0.01/0.01 16:22:24
>>
>>
>> https://gist.githubusercontent.com/rvdheij/293d9cb197c138598142d5349afbd112
>> 
>>
>> On Sat, 22 Aug 2020 at 17:29, Donald Russell 
>> wrote:
>>
>>> I’m saying if the vmcp commend in Linux is to handle the response from
>>> CP FOR, it’s not as simple as “use diag 8 to put the response in a buffer”.
>>> That’s what vmcp does now and then writes the buffer to STDOUT. vmcp would
>>> need enhancements to catch the asynchronous response and write *that*
>>> to STDOUT.
>>>
>>> On Sat, Aug 22, 2020 at 08:18 John P. Hartmann 
>>> wrote:
>>>
 On 8/22/20 15:46, Donald Russell wrote:

 > diag 8 may not do what you want (depends on what you want) when using
 CP

 > FOR... the response is asynchronous. When I use CP FOR in an
 exec/pipe I

 > have to set up  a *ASYNC pipeline if I want the exec to handle the

 > response.



 So something in CP generates what looks like a MSGNOH response.

 Presumably that also means that CP FOR and pipes STARMSG don't
 interoperate?


>>>
>>>
>>
>>

-- 
 -Mike MacIsaac

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390


CP FOR through vmcp?

2020-08-22 Thread Michael MacIsaac
Hello lists,

I can use CP FOR to run a command on another user ID and I get back the
output in a normal CMS session:

  for engzs01 cmd q cplevel
  ENGZS01  : z/VM Version 6 Release 4.0, service level 1802 (64-bit)
  ENGZS01  : Generated at 03/11/20 13:28:04 EDT
  ENGZS01  : IPL at 03/11/20 14:20:57 EDT
  ENGZS01  : HCPFOR069I Command Complete.  CP return code = .

But when I try this from Linux:

  # sudo vmcp for engzs01 cmd q cplevel

I get no output.  Is there any way to persuade vmcp to do this?

(right now I'm spooling consoles, but the code is kludgy and slow).

Thanks.

--
 -Mike MacIsaac

--
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www2.marist.edu/htbin/wlvindex?LINUX-390