Re: using bpxwunix with tsocmd to run XMIT
In d3571c7d425590479eb3adb197bfc47b03932...@m4ukex02.intranet.macro4.com, on 03/17/2015 at 09:45 AM, Steve Austin steve.aus...@macro4.com said: any quotes I put around the dsn are ignored Presumably the command operand of bpxwunix is subject to shell parsing, for which quotes and apostrophes have special semantics. I suspect that you need to escape the apostrophes. Neither have I been able to set NOPREFIX Can you issue two TSO commands separated by semicolon? -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
using bpxwunix with tsocmd to run XMIT
I'm using bpxwunix with tsocmd to run an XMIT (see below). This works, but I've been unable to prevent the TSO PREFIX, being added to dataset name; any quotes I put around the dsn are ignored. Neither have I been able to set NOPREFIX. Is there a way to prevent the suffix being added? Thanks Steve lines.0 = 0 env.0 = 0 cmd=/bin/tsocmd XMIT target 'DS(dsn)' xrc = bpxwunix(cmd,lines.,out.,var.,env.) This e-mail message has been scanned and cleared by Postini / Google Message Security and the UNICOM Global security systems. This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
Steve Austin wrote: I'm using bpxwunix with tsocmd to run an XMIT (see below). This works, but I've been unable to prevent the TSO PREFIX, being added to dataset name; any quotes I put around the dsn are ignored. Neither have I been able to set NOPREFIX. Is there a way to prevent the suffix being added? Old trap for anyone trying string parsing... I sometimes fall in that trap too. ;-) And you can't do a TRACE to see how lines are parsed and resolved... ouch... cmd=/bin/tsocmd XMIT target 'DS(dsn)' Try this (adding a single quote character to the right of ( and to the left of ) ): cmd=/bin/tsocmd XMIT target 'DS('dsn')' Note: This is DS, then (, then single quote character, then double quote character, then variablename dsn, then double quote, single quote and then ). This is so that the datasetname have single quote chars to the left and right, all inside the parenthesis. Something like this after parsing and resolving var names: cmd=/bin/tsocmd XMIT xyz 'DS('hlq.mlq.lq')' (Double quote outside string and only single quote inside the string.) A$$uming of course, as you write, the characters from D to ) are both inside double and single quote characters. Geez, I hope I got it right... ;-) HTH! Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
On Tue, Mar 17, 2015 at 7:06 AM, Steve Austin steve.aus...@macro4.com wrote: Thanks Elardus, but however many quotes I insert they are appear to be ignored. I've tried the command from OMVS and get the same result (see below). Steve Example output from an actual UNIX command line prompt (not BPXWUNIX) LIH1:TSH009:/home/tsh009$ tsocmd xmit lih1.tsh009 ds('sys1.ppoption') xmit lih1.tsh009 ds('sys1.ppoption') INMX000I 0 message and 8 data records sent as 113 records to LIH1.TSH009 INMX001I Transmission occurred on 03/17/2015 at 07:43:04. LIH1:TSH009:/home/tsh009$ Example REXX code, run from a UNIX prompt, which uses tsocmd to run XMIT LIH1:TSH009:/home/tsh009$ cat ~/bin/do_xmit.rexx /* REXX */ command=/bin/tsocmd xmit lih1.tsh009 ds('sys1.ppoption') say command call bpxwunix command LIH1:TSH009:/home/tsh009$ The running of the above LIH1:TSH009:/home/tsh009$ do_xmit.rexx /bin/tsocmd xmit lih1.tsh009 ds('sys1.ppoption') xmit lih1.tsh009 ds('sys1.ppoption') INMX000I 0 message and 8 data records sent as 113 records to LIH1.TSH009 INMX001I Transmission occurred on 03/17/2015 at 07:54:23. LIH1:TSH009:/home/tsh009$ -- If you sent twitter messages while exploring, are you on a textpedition? He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
Thanks Elardus, but however many quotes I insert they are appear to be ignored. I've tried the command from OMVS and get the same result (see below). Steve /bin/tsocmd XMIT ZOS113.SA 'DS('SA2.DMXPORT.F5') £ /bin/tsocmd XMIT ZOS113.SA 'DS('SA2.DMXPORT.F5')' XMIT ZOS113.SA DS(SA2.DMXPORT.F5) INMX060I TRANSMIT command terminated. Input dataset unusable + INMX061I Allocation failed for dataset 'SA2.SA2.DMXPORT.F5' + IKJ56228I DATA SET SA2.SA2.DMXPORT.F5 NOT IN CATALOG OR CATALOG CAN NOT BE ACCES SED £ -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: 17 March 2015 10:40 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: using bpxwunix with tsocmd to run XMIT Steve Austin wrote: I'm using bpxwunix with tsocmd to run an XMIT (see below). This works, but I've been unable to prevent the TSO PREFIX, being added to dataset name; any quotes I put around the dsn are ignored. Neither have I been able to set NOPREFIX. Is there a way to prevent the suffix being added? Old trap for anyone trying string parsing... I sometimes fall in that trap too. ;-) And you can't do a TRACE to see how lines are parsed and resolved... ouch... cmd=/bin/tsocmd XMIT target 'DS(dsn)' Try this (adding a single quote character to the right of ( and to the left of ) ): cmd=/bin/tsocmd XMIT target 'DS('dsn')' Note: This is DS, then (, then single quote character, then double quote character, then variablename dsn, then double quote, single quote and then ). This is so that the datasetname have single quote chars to the left and right, all inside the parenthesis. Something like this after parsing and resolving var names: cmd=/bin/tsocmd XMIT xyz 'DS('hlq.mlq.lq')' (Double quote outside string and only single quote inside the string.) A$$uming of course, as you write, the characters from D to ) are both inside double and single quote characters. Geez, I hope I got it right... ;-) HTH! Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN This e-mail message has been scanned and cleared by Postini / Google Message Security and the UNICOM Global security systems. This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
On Tue, 17 Mar 2015 05:39:49 -0500, Elardus Engelbrecht wrote: Old trap for anyone trying string parsing... I sometimes fall in that trap too. ;-) I did, several times, trying to find a solution. And you can't do a TRACE to see how lines are parsed and resolved... ouch... trace R helps for Rexx, but not entirely' set -x works for shell. cmd=/bin/tsocmd XMIT target 'DS(dsn)' Try this (adding a single quote character to the right of ( and to the left of ) ): cmd=/bin/tsocmd XMIT target 'DS('dsn')' It's even worse. I got it to work with: trace R lines.0 = 0 cmd = set -x; /bin/tsocmd XMIT target DS('dsn') xrc = bpxwunix(cmd, 'lines.', /* out. */, /* err. */, /* env., login, batch, */ ) (I defaulted most of the arguments in order to see the trace immediately.) The hard one is RECEIVE -- one needs to QUEUE the reply to the prompt. That's not always possible. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
Steve Austin wrote: Thanks Elardus, but however many quotes I insert they are appear to be ignored. I've tried the command from OMVS and get the same result (see below). So I see after that IKJ message. I assume you do it interactively. Replace /bin/tsocmd XMIT ZOS113.SA 'DS('SA2.DMXPORT.F5')' with /bin/tsocmd XMIT ZOS113.SA DS('SA2.DMXPORT.F5') so, no quotes on DS and its keyword (only quote around datasetname)? Alternatively: What if you try DDNAME instead of DSNAME? If no one can help you on IBM-MAIN, I believe you may encountered a rare parsing problem. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
Paul Gilmartin wrote: And you can't do a TRACE to see how lines are parsed and resolved... ouch... trace R helps for Rexx, but not entirely' set -x works for shell. Thanks. So I found out the hard way... It's even worse. I got it to work with: cmd = set -x; /bin/tsocmd XMIT target DS('dsn') xrc = bpxwunix(cmd, 'lines.', /* out. */, /* err. */, /* env., login, batch, */ ) More, but different types of quotes. Ok, next time I will quote you! ;-) I believe Steve will use your example successfully. Thanks Paul for kindly helping out. Much appreciated! You can of course quote me on this. The hard one is RECEIVE -- one needs to QUEUE the reply to the prompt. That's not always possible. Of course. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
/bin/tsocmd XMIT ZOS113.SA DS('SA2.DMXPORT.F5') Gives; £ /bin/tsocmd XMIT ZOS113.SA DS('SA2.DMXPORT.F5') FSUM7332 syntax error: got (, expecting Newline £ DDNAME is not an option, as ultimately I want this to work using bpwxunix and the dataset will not be allocated in the address spaces in which xmit runs. Regards Steve -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: 17 March 2015 12:26 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: using bpxwunix with tsocmd to run XMIT Steve Austin wrote: Thanks Elardus, but however many quotes I insert they are appear to be ignored. I've tried the command from OMVS and get the same result (see below). So I see after that IKJ message. I assume you do it interactively. Replace /bin/tsocmd XMIT ZOS113.SA 'DS('SA2.DMXPORT.F5')' with /bin/tsocmd XMIT ZOS113.SA DS('SA2.DMXPORT.F5') so, no quotes on DS and its keyword (only quote around datasetname)? Alternatively: What if you try DDNAME instead of DSNAME? If no one can help you on IBM-MAIN, I believe you may encountered a rare parsing problem. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN This e-mail message has been scanned and cleared by Postini / Google Message Security and the UNICOM Global security systems. This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
Don't quote me, but I now have it working as described. Thanks for your help! Steve -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Elardus Engelbrecht Sent: 17 March 2015 12:37 To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: using bpxwunix with tsocmd to run XMIT Paul Gilmartin wrote: And you can't do a TRACE to see how lines are parsed and resolved... ouch... trace R helps for Rexx, but not entirely' set -x works for shell. Thanks. So I found out the hard way... It's even worse. I got it to work with: cmd = set -x; /bin/tsocmd XMIT target DS('dsn') xrc = bpxwunix(cmd, 'lines.', /* out. */, /* err. */, /* env., login, batch, */ ) More, but different types of quotes. Ok, next time I will quote you! ;-) I believe Steve will use your example successfully. Thanks Paul for kindly helping out. Much appreciated! You can of course quote me on this. The hard one is RECEIVE -- one needs to QUEUE the reply to the prompt. That's not always possible. Of course. Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN This e-mail message has been scanned and cleared by Postini / Google Message Security and the UNICOM Global security systems. This message is for the named person's use only. If you receive this message in error, please delete it and notify the sender. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
Steve Austin wrote: Don't quote me, but I now have it working as described. Thanks for your help! You're most welcome, but I believe Paul should get the credits for helping out. About quotes, it reminds me of this old school joke: Teacher: 'Hey, Pete, why are all your answers in quotes?' Pete: 'Sir, they're not mine, they're coming from my pal next to me.' Groete / Greetings Elardus Engelbrecht -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
In 2128103613061808.wa.paulgboulderaim@listserv.ua.edu, on 03/17/2015 at 07:19 AM, Paul Gilmartin 000433f07816-dmarc-requ...@listserv.ua.edu said: cmd = set -x; /bin/tsocmd XMIT target DS('dsn') I see it now; your original code had the apostrophes around DS(foo) instead of just around the dsn. -- Shmuel (Seymour J.) Metz, SysProg and JOAT ISO position; see http://patriot.net/~shmuel/resume/brief.html We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: using bpxwunix with tsocmd to run XMIT
On Tue, 17 Mar 2015 09:27:53 -0400, Shmuel Metz (Seymour J.) wrote: on 03/17/2015 at 07:19 AM, Paul Gilmartin said: cmd = set -x; /bin/tsocmd XMIT target DS('dsn') I see it now; your original code had the apostrophes around DS(foo) instead of just around the dsn. And the parentheses need to be protected from the shell, and if dsn mentions a PDS member more parentheses need to be protected. I sometimes post Rexx examples untested (with apologia). This one I tested. One might wonder, Why was OP doing it this (Byzantine) way? One plausible answer: This is the simplest (only?) form that works in all of: o TSO TMP o shell o IRXJCL I keep a UNIX directory in my SYSEXEC. Unsupported; IBM told me so when I submitted an ETR. But it mostly works except for a few program checks, always when a command successfully completes, and never more than once per ISPF session. I endure those, rather than replicate EXECs in PDS and UNIX directories. Substance for a SER here, perhaps. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN