Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to escape and pass quoted parameters in zowex #978

Closed
dkelosky opened this issue Mar 15, 2021 · 12 comments
Closed

unable to escape and pass quoted parameters in zowex #978

dkelosky opened this issue Mar 15, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@dkelosky
Copy link
Contributor

OK got that up and running, thx.
Got an issue with zowex now see hereafter, do I open new issue or continue in this one?

With zowe:
fbeyl@pvslt03 ~ $ iplrest=$(zowe zos-tso send address-space $sko --data "ex (panel) 'PARM'")
fbeyl@pvslt03 ~ $ echo $iplrest
[ { "DSNAME":"VENDOR.PARMLIB" , "SEQ":"1" , "VOLSER":"VPMVSD" , "BLKSIZE":"6160" , "EXTENT":"1" , "SMS":"NO" , "LRECL":"80" , "DSORG":"PO" , "RECFM":"FB" , "CRDATE":"2003.119" , "REFDATE":"2021.071" , "SYSNAME":"S0W1" , "SYSLEVEL":"z/OS 02.03.00 HBB77B0" } , { "DSNAME":"SVTSC.PARMLIB" , "SEQ":"2" , "VOLSER":"VTMVSG" , "BLKSIZE":"6160" , "EXTENT":"1" , "SMS":"NO" , "LRECL":"80" , "DSORG":"PO" , "RECFM":"FB" , "CRDATE":"1997.118" , "REFDATE":"2017.300" , "SYSNAME":"S0W1" , "SYSLEVEL":"z/OS 02.03.00 HBB77B0" } , { "DSNAME":"LVL0.PARMLIB" , "SEQ":"3" , "VOLSER":"VTLVL0" , "BLKSIZE":"6160" , "EXTENT":"7" , "SMS":"NO" , "LRECL":"80" , "DSORG":"PO" , "RECFM":"FB" , "CRDATE":"2007.025" , "REFDATE":"2021.035" , "SYSNAME":"S0W1" , "SYSLEVEL":"z/OS 02.03.00 HBB77B0" } , { "DSNAME":"SYS1.PARMLIB" , "SEQ":"4" , "VOLSER":"VIMVSB" , "BLKSIZE":"27920" , "EXTENT":"1" , "SMS":"NO" , "LRECL":"80" , "DSORG":"PO" , "RECFM":"FB" , "CRDATE":"2017.116" , "REFDATE":"2021.035" , "SYSNAME":"S0W1" , "SYSLEVEL":"z/OS 02.03.00 HBB77B0" } ] READY

With zowex:
fbeyl@pvslt03 ~ $ iplrest=$(zowex zos-tso send address-space $sko --data "ex (panel) 'PARM'")
Command Error:
Onbekende argumenten: (panel), 'PARM'
Command failed due to improper syntax
Command entered: "zowe zos-tso send address-space Z40275-137-aackaaah --data ex (panel) 'PARM' --dcd /home/fbeyl/"
Available commands are "address-space".
Use "zowe zos-tso send --help" to view groups, commands, and options.
Error Details:
Onbekende argumenten: (panel), 'PARM'

Tried escaping but till now no luck.

Zowex should leave " in the command because it has to be sent to tso session.

Originally posted by @fbeyl in #974 (comment)

@dkelosky
Copy link
Contributor Author

dkelosky commented Mar 15, 2021

Possible workaround: use variable to pass --data unfortunately this does not work when the command is passed in node exec child_process.

fbeyl@pvslt03 ~ $ cmd=""ex (panel) 'PARM'" "fbeyl@pvslt03 ~ $ zowex zos-tso send address-space $sko --data $cmd
[
{
"DSNAME":"VENDOR.PARMLIB"
,
"SEQ":"1"
,
"VOLSER":"VPMVSD"
,
"BLKSIZE":"6160"

Originally posted by @fbeyl in #974 (comment)

@dkelosky
Copy link
Contributor Author

I think this is a bug - I was able to reproduce this problem.

@dkelosky dkelosky added the bug Something isn't working label Mar 15, 2021
@dkelosky
Copy link
Contributor Author

dkelosky commented Mar 16, 2021

hi @fbeyl - how did you escape? if i have a clist (IBMUSER.CLIST(HELLO) that takes a positional:

PROC 1 NAME          
WRITE HELLO &NAME    
END                  

It runs with: ex 'IBMUSER.CLIST(HELLO)' 'WORLD'.

On zowe cli, I can run it without escaping:

$ zowe tso issue command "ex 'ibmuser.clist(hello)' 'world'"
IKJ56455I IBMUSER LOGON IN PROGRESS AT 12:31:35 ON MARCH 16, 2021
IKJ56951I NO BROADCAST MESSAGES
READY

HELLO WORLD
READY

On zowex with git bash, I can escape:

$ zowex tso issue command "\"ex 'ibmuser.clist(hello)' 'world'\""
IKJ56455I IBMUSER LOGON IN PROGRESS AT 12:32:11 ON MARCH 16, 2021
IKJ56951I NO BROADCAST MESSAGES
READY

HELLO WORLD
READY

In windows command prompt I escape this way C:\dev>zowex tso issue command \"ibmuser.clist(hello) 'world'\"

I know neither escape is desirable, I'm just trying to determine if I'm debugging the same error or not and if one of these escape approaches "works" for you in the meantime.

@fbeyl
Copy link

fbeyl commented Mar 16, 2021

I don't know what I have been doing ... escaping works fine ... Sorry for the inconvenience.
This deamon is great idea, I made me a small node http server that serves a browser sdsf interface communicating with tso/rexx/sdsf thru zowe cli so I don't need 3270 emulator, works even faster now! Most z/OS products have rexx environment they can all be accessed this way without anything needed on z only z/OSMF rest !

fbeyl@pvslt03 ~ $ zowex tso issue command ""ex 'Z40275.CLIST(PANEL)' 'PARM'""
IKJ56455I Z40275 LOGON IN PROGRESS AT 13:05:21 ON MARCH 16, 2021
IKJ56951I NO BROADCAST MESSAGES
READY

[
{
"DSNAME":"VENDOR.PARMLIB"
,
...

fbeyl@pvslt03 ~ $ sko=$(zowex zos-tso start address-space --zosmf-profile "tutosys" --sko);
fbeyl@pvslt03 ~ $ zowex zos-tso send address-space $sko --data ""ex 'Z40275.CLIST(PANEL)' 'PARM'""
[
{
"DSNAME":"VENDOR.PARMLIB"

...

@dkelosky
Copy link
Contributor Author

OK - hopefully we can make it work without the need to escape 😄

@dkelosky
Copy link
Contributor Author

hi @fbeyl - I'm not sure I'll bee able to easily get beyond the need to escape. Since we have a workaround, if it's ok with you, I'll close this and await more input. We can reopen if escaping is too problematic for most users. Is this ok?

@fbeyl
Copy link

fbeyl commented Mar 20, 2021

Yes please close the issue. Got it working:

sdsfServerS.mp4

@dkelosky
Copy link
Contributor Author

this is awesome - thank you for sharing the recording!

have you considered submitting what you've done as a blog on medium.com/zowe? it's a neat way to showcase what can be done with zowe and might spark other ideas

i'll close this in the meantime - take care

@fbeyl
Copy link

fbeyl commented Mar 23, 2021

@dkelosky Just put it on [https://frans-beyl.medium.com/] but don't know how to add it to medium.com/zowe

@dkelosky
Copy link
Contributor Author

cool 😄

@Joe-Winchester - is there a community resource that describes how to submit articles to medium.com/zowe

@Joe-Winchester
Copy link
Member

@Joe-Winchester - is there a community resource that describes how to submit articles to medium.com/zowe

The Zowe doc site has details on how to submit blogs, I always forget which chapter but everything is indexed and searchable so typing "Medium blog" in the bar brings up the link

image

to the page https://docs.zowe.org/stable/getting-started/zowe-resources.html#blogs
This points towards the publication instructions at
https://github.com/zowe/community/blob/master/blogging/blog_guidelines.md

You can also create an issue in the OMP repo and choose "Create a medium.com/zowe" blog

image

@fbeyl
Copy link

fbeyl commented Apr 2, 2021

Submitted to publication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants