Re: USS: su: User ID "SH" does not exist

2020-05-18 Thread Ed Jaffe

On 5/18/2020 10:56 AM, Jousma, David wrote:

My subsequent response was indeed that.  My point though is that "su" followed 
by some other commands do not appear to be executing as UID(0) authority.


Yes, that's normal and expected behavior.  You can see what's happening 
if you logon and issue the command interactively:


|    EDJX1:/u/edjx1: >whoami
|    EDJX1
|    EDJX1:/u/edjx1: >su;ps -ef
|    EDJX1:/u/edjx1: >whoami
|    BPXROOT
|    EDJX1:/u/edjx1: >exit
|         UID    PID   PPID  C    STIME TTY   TIME CMD
|       EDJX1   50463146   50463152  - 11:57:39 ttyp  0:00 ps -ef
|       EDJX1   50463152   67240408  - 11:55:20 ttyp  0:00 sh -L
|       EDJX1   67240408   50463193  - 11:55:20 ? 0:00 
/usr/sbin/sshd -f /etc/ssh/sshd_config -R

|    EDJX1:/u/edjx1: >whoami
|    EDJX1
|    EDJX1:/u/edjx1: >

--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-18 Thread Jousma, David
My subsequent response was indeed that.  My point though is that "su" followed 
by some other commands do not appear to be executing as UID(0) authority.

_
Dave Jousma
AVP | Manager, Systems Engineering  

Fifth Third Bank  |  1830 East Paris Ave, SE  |  MD RSCB2H  |  Grand Rapids, MI 
49546
616.653.8429  |  fax: 616.653.2717


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Ed 
Jaffe
Sent: Monday, May 18, 2020 1:41 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

**CAUTION EXTERNAL EMAIL**

**DO NOT open attachments or click on links from unknown senders or unexpected 
emails**

On 5/18/2020 9:37 AM, Jousma, David wrote:
> //OMVS EXEC PGM=BPXBATCH,REGION=128M
> //SYSPRINT DD   SYSOUT=*
> //SYSTSPRT DD   SYSOUT=*
> //SYSOUT   DD   SYSOUT=*
> //STDPARM  DD   *
> SH su;
> ps -ef
> /*


For that I would try: echo ps -ef | su


-- 
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
**CAUTION EXTERNAL EMAIL**

**DO NOT open attachments or click on links from unknown senders or unexpected 
emails**

This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-18 Thread Ed Jaffe

On 5/18/2020 9:37 AM, Jousma, David wrote:

//OMVS EXEC PGM=BPXBATCH,REGION=128M
//SYSPRINT DD   SYSOUT=*
//SYSTSPRT DD   SYSOUT=*
//SYSOUT   DD   SYSOUT=*
//STDPARM  DD   *
SH su;
ps -ef
/*



For that I would try: echo ps -ef | su


--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-18 Thread Jousma, David
SDSF?  I don’t think so.

If I run this way.

//STDPARM  DD   *   
SH echo 'ps -ef' | su   
/*  

Then I get the expected results...



_
Dave Jousma
AVP | Manager, Systems Engineering  

Fifth Third Bank  |  1830 East Paris Ave, SE  |  MD RSCB2H  |  Grand Rapids, MI 
49546
616.653.8429  |  fax: 616.653.2717


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Monday, May 18, 2020 1:14 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

**CAUTION EXTERNAL EMAIL**

**DO NOT open attachments or click on links from unknown senders or unexpected 
emails**

On Mon, 18 May 2020 16:37:09 +, Jousma, David wrote:  
>...
>Yet, I only see PID's associated my own UID instead of UID(0)
>...
It's a security feature, enforced mostly by IBM.  SDSF may allow finer-grained 
control.  From the Command Ref. for ps:
   ... However, these options can only show information for those processes
   the user has appropriate privileges to access.

-- gil
 

--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN **CAUTION EXTERNAL 
EMAIL**

**DO NOT open attachments or click on links from unknown senders or unexpected 
emails**

This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-18 Thread Paul Gilmartin
On Mon, 18 May 2020 16:37:09 +, Jousma, David wrote:  
>...
>Yet, I only see PID's associated my own UID instead of UID(0)
>...
It's a security feature, enforced mostly by IBM.  SDSF may allow
finer-grained control.  From the Command Ref. for ps:
   ... However, these options can only show information for those processes
   the user has appropriate privileges to access.

-- gil


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-18 Thread Jousma, David
Ed,

This has been a headscratcher to me for a long time.  I tried similar example:

//OMVS EXEC PGM=BPXBATCH,REGION=128M 
//SYSPRINT DD   SYSOUT=* 
//SYSTSPRT DD   SYSOUT=* 
//SYSOUT   DD   SYSOUT=* 
//STDPARM  DD   *
SH su;   
   ps -ef
/*   
//STDOUT  DDSYSOUT=* 
//STDERR  DDSYSOUT=* 

Yet, I only see PID's associated my own UID instead of UID(0)

 UIDPID   PPID  CSTIME TTY   TIME CMD   
 
 MYID   33685978 131596  - 12:32:53 ? 0:00 ps -ef   
  
 MYID 131596   84017677  - 12:32:53 ? 0:00 -sh -c su;   
  
 MYID   84017677  1  - 12:32:53 ? 0:01 BPXBATCH 
  


Did the same thing running command "id", which I though would show uid(0) but 
did not. 

So I am still scratching my balding head
_
Dave Jousma
AVP | Manager, Systems Engineering  

Fifth Third Bank  |  1830 East Paris Ave, SE  |  MD RSCB2H  |  Grand Rapids, MI 
49546
616.653.8429  |  fax: 616.653.2717


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Ed 
Jaffe
Sent: Friday, May 15, 2020 12:20 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

**CAUTION EXTERNAL EMAIL**

**DO NOT open attachments or click on links from unknown senders or unexpected 
emails**

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
> //STDPARM DD *
> SH su
> SH echo $PATH
> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
    echo $PATH;
    unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


-- 
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
**CAUTION EXTERNAL EMAIL**

**DO NOT open attachments or click on links from unknown senders or unexpected 
emails**


This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-16 Thread Seymour J Metz
> Semicolon is not a command separator in TSO;

That depends on whether you consider CLIST to be TSO.

At the READY prompt, ; ends the line - except when it doesn't.

> there is no facility to put more than one command on a line.

Are you a betting man?

> Semicolon does end the command,

Except when it doesn't.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Tony Harminc [t...@harminc.net]
Sent: Friday, May 15, 2020 3:15 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

On Fri, 15 May 2020 at 12:38, Seymour J Metz  wrote:
>
> I thought that you could turn off TSO recognition of semicolon with
PROFILE or TERMINAL but, no, you can't. I'm not sure what happens if CLIST
or REXX code passes a semicolon. OTOH, TSO will accept a semicolon in a
quoted string.

Semicolon is not a command separator in TSO; there is no facility to put
more than one command on a line. Semicolon does end the command, and
behaves a lot like a trailing /* does.
 READY
listd test.asm ; any old junk
 C702TOH.TEST.ASM
 --RECFM-LRECL-BLKSIZE-DSORG
   FB803120PO
 --VOLUMES--
   A3USR3
 READY
send 'Hello' user(*) ;  some stuff
 Hello C702TOH
 READY
send 'Hello' user(*) some stuff
 IKJ56712I INVALID KEYWORD, SOME
 IKJ56703A REENTER THIS OPERAND - (I hit enter here)
 IKJ56712I INVALID KEYWORD, STUFF
 IKJ56703A REENTER THIS OPERAND - (I hit enter here)
 Hello C702TOH
 READY

Of course ISPF has very different behaviours, and it doesn't help that so
many people think that ISPF *is* TSO.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Tony Harminc
On Fri, 15 May 2020 at 12:38, Seymour J Metz  wrote:
>
> I thought that you could turn off TSO recognition of semicolon with
PROFILE or TERMINAL but, no, you can't. I'm not sure what happens if CLIST
or REXX code passes a semicolon. OTOH, TSO will accept a semicolon in a
quoted string.

Semicolon is not a command separator in TSO; there is no facility to put
more than one command on a line. Semicolon does end the command, and
behaves a lot like a trailing /* does.
 READY
listd test.asm ; any old junk
 C702TOH.TEST.ASM
 --RECFM-LRECL-BLKSIZE-DSORG
   FB803120PO
 --VOLUMES--
   A3USR3
 READY
send 'Hello' user(*) ;  some stuff
 Hello C702TOH
 READY
send 'Hello' user(*) some stuff
 IKJ56712I INVALID KEYWORD, SOME
 IKJ56703A REENTER THIS OPERAND - (I hit enter here)
 IKJ56712I INVALID KEYWORD, STUFF
 IKJ56703A REENTER THIS OPERAND - (I hit enter here)
 Hello C702TOH
 READY

Of course ISPF has very different behaviours, and it doesn't help that so
many people think that ISPF *is* TSO.

Tony H.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
Or they have other fish to fry. I doubt that IBM is immune to the COVID-19 
chaos.

"Defending BPXBATCH is not in my job description."


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Friday, May 15, 2020 12:47 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

On Fri, 15 May 2020 16:38:04 +, Seymour J Metz wrote:

>I thought that you could turn off TSO recognition of semicolon with PROFILE or 
>TERMINAL but, no, you can't. I'm not sure what happens if CLIST or REXX code 
>passes a semicolon. OTOH, TSO will accept a semicolon in a quoted string.
>
I couldn't turn it off for ISPF.  I set it to '¾' and hope I never need it.

>The TSO command is OMVS and it is documented in z/OS UNIX System Services 
>Command Reference.
>
"TSO SH" causes TSO TMP to execute an "SH" command, and I can't
find documentation of the latter.

IBM representatives have been conspicuously silent on two
ongoing related threads.  Perhaps they recognize BPXBATCH
is indefensible.

>
>From: Paul Gilmartin
>Sent: Friday, May 15, 2020 12:22 PM (in whatever timezone)
>
>On Fri, 15 May 2020 14:02:25 +, Seymour J Metz wrote:
>
>>Semicolon is a separator for TSO SH as well, but you have to keep TSO from 
>>recognizing it.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 12:04:42 -0500, Kirk Wolf wrote:

>On Fri, May 15, 2020 at 11:44 AM Seymour J Metz wrote:
>
>Which documentations describes the SH concatenation for other than
>> instream? Also, where in the documentation does it say that it inserts
>> whitespace after each record?
>>
>You are right.  IBM doesn't really document what happens other than
>instream.   They do document how records are concatenated with a blank
>separator.
>
>https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.bpxa400/gfdstdparm.htm
>
>"For in-stream data sets: with the SH option, trailing blanks are not
>truncated. Records in in-stream data sets are concatenated with blanks as
>separator characters, and the string remaining after the SH token is passed
>as a single argument to a /bin/sh -c command. For the PGM option, the
>string is divided not only at line boundaries but also at blanks within a
>line."
>
>It's astounding that IBM implemented and partially documented STDPARM as an
>additional layer of suckage rather than just fixing BPXBATCH.Look only
>at how many problems that people have on mvs-oe and ibm-main as your
>evidence.
>
But then it would compete with AOPBATCH which is part of a separately
priced offering.

Nowadays, customers have the alternative of PARMDD, with very
similar deficiencies.

>I wonder: can you open an RFE and attach a complete 1000 line C program? :-)
>
Is someone giving one away?  Who'd maintain it?

IBM's OCC is uncomfortable with that sort of thing, for both IP and
consequential damage concerns.  They were probably fastidious with
Rocket.

>> The treatment of semicolons is bog standard, but it wouldn't hurt to spell 
>> it out.
>>
But then we couldn't have such entertaining discussions of it in these fora.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Kirk Wolf
On Fri, May 15, 2020 at 11:44 AM Seymour J Metz  wrote:

Which documentations describes the SH concatenation for other than
> instream? Also, where in the documentation does it say that it inserts
> whitespace after each record?
>
>
You are right.  IBM doesn't really document what happens other than
instream.   They do document how records are concatenated with a blank
separator.

https://www.ibm.com/support/knowledgecenter/SSLTBW_2.2.0/com.ibm.zos.v2r2.bpxa400/gfdstdparm.htm

"For in-stream data sets: with the SH option, trailing blanks are not
truncated. Records in in-stream data sets are concatenated with blanks as
separator characters, and the string remaining after the SH token is passed
as a single argument to a /bin/sh -c command. For the PGM option, the
string is divided not only at line boundaries but also at blanks within a
line."

It's astounding that IBM implemented and partially documented STDPARM as an
additional layer of suckage rather than just fixing BPXBATCH.Look only
at how many problems that people have on mvs-oe and ibm-main as your
evidence.

I wonder: can you open an RFE and attach a complete 1000 line C program? :-)



> The treatment of semicolons is bog standard, but it wouldn't hurt to spell
> it out.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf
> of Kirk Wolf [k...@wolf-associates.com]
> Sent: Friday, May 15, 2020 12:26 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: USS: su: User ID "SH" does not exist
>
> Jack,
> I would disagree with your explanation of why BPXBATCH works so poorly ;-)
>
> In the OP's example, DD STDPARM is used to construct a single PARM string
> that ends up getting passed to BPXBATCH.
> What BPXBATCH does is look at the leading "SH"  in it's PARM and then pass
> the rest of the string as the argument to "/bin/sh -c"
>
> STDPARM washes away the record boundaries (see the doc).  The semicolons
> are required at the end of DD:STDPARM records so that this single argument
> to "/bin/sh -c " can  be broken into multiple shell commands.   The whole
> thing is an ugly hack.
>
> FWIW, I've been using the shell in z/OS batch since 2007 with its stdin
> coming from //STDIN DD *.   And yes, I know what here documents are.   I
> just don't use  brain dead BPXBATCH.
>
> Kirk Wolf
> Dovetailed Technologies
>
> http://secure-web.cisco.com/1DDthcclBqpmyDPhXkwTl61-tucNWumiSPx4_aYKVPrVxNfeoPCrbBfnnG0alInEOrfKy2hfdhtNsJX0xkzozZbLNC4sEZpSyV8iB9cYm44BuNTg4l413TmpY-hPI9kvd9bEhJE2O6jUP5A07KotfYXVXevpgJ_SJXXF-ivOt8BCRRbAnRFKSl_4rgg_7hOFTJazOknkNLje7QaKMlvqf7E7qG_5YXdL3wCRLvPF8PHex1cN7yzYo6pXqmogp8RufthS8IOFnIsz65wS-psI3UhNQI_xzQ0aKGgrFpUuLajFp-EvfXZ8UbWHP5LBnVEyyyQl3wwS0Ra_SaX9fS8Fek9qIHRtyxDAucSxDCo7CMYDxe9GtsfU3rkuwNorljA-5qO6yGQZc049LnyIv0mtxe-i8CZBCpUkIUVTonlffsfncgtrSzuONGrpR4o_4dqy2/http%3A%2F%2Fdovetail.com
>
> https://secure-web.cisco.com/1aSsEzfhdxsxGQOHzXtwj9y0ebXkNUzDJfewjX3pR6Fd4beP-RSZu0r_mGMErxN1fXuGAvcy8_tUYdci2FYwScWxvvSyTJLYVKb-DV_oDBH2-KLpQSgikqVtTB9xoROwUk4zGJRud0IEaZIeY_lwCaoS5XDsiVmIRKS03PhsUX65ETWqCmSFkA7dSiEUflO1g9KWuIPd1y-9Kz5KbEC34bcnfj_UpmPG0YHigxjbdV_zpjabwBWBytj_W7dr4ugL8Q7IaD472bZgZbMsCOXuyhmohBE5nVKhOorv6XNDVWO0eFl1-Zp5gmpAuzntiQaWBUgvDD5B9WUpC0dDdBA3Xhih7kRaG6waWl_qVVkr4mzcFqRmivXDmYVYfLpZnuqVxSh4-9AC7bd9Icrn2fFTCoHzczsJPN8P-16n_BjxnRA72LkIQx7xIWw8qJv_hkPnR/https%3A%2F%2Fdovetail.com%2Fproducts%2Fcozbatch.html
>
> On Fri, May 15, 2020 at 10:12 AM Jack J. Woehr  wrote:
>
> > On 5/15/20 8:51 AM, Seymour J Metz wrote:
> > > I understand why they parse pgm and sh differently. What I don't
> > understand is why instream data should be treated differently from other
> > datasets.
> >
> > Because it's easier to present to the Unix System Services environment
> > that way?
> > Unix is stream oriented, not record oriented, and shell syntax is molded
> > to that.
> > There are shell features like "here documents" (google it) which you've
> > probably never used that would get broken if input to the USS shell got
> > arbitrarily broken into lines to suit the flavor of MVS/TSO/JES
> >
> > --
> > Jack J. Woehr # Science is more than a body of knowledge. It's a way
> of
> >
> http://secure-web.cisco.com/1gESWY33ldhCr_PLmzxOYS5kRZsH5Jydluqvcg3t9MPdfU6x1ydUzY2STwg49U53joXvW9MqU7qeVG1rzBwhnCuzzvAp06_kN0hg-HOY48DYj5sjsGbyf4Y4o1u16bdiQTQwbPH7w4NZAwoOlQT7Y6gPqz_nehnFJinPk_xF5VqBR8HOH2yWGGOdb81ML09T3VUzHm0dbK1UfatdI1MsMcX0zNOiUAHui4VwiwH2EraXz6ZBdNBjruuZ13Nm8jAFkKRFpphvG5odt_angEbyEh12MMa-

Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 16:38:04 +, Seymour J Metz wrote:

>I thought that you could turn off TSO recognition of semicolon with PROFILE or 
>TERMINAL but, no, you can't. I'm not sure what happens if CLIST or REXX code 
>passes a semicolon. OTOH, TSO will accept a semicolon in a quoted string.
>
I couldn't turn it off for ISPF.  I set it to '¾' and hope I never need it.

>The TSO command is OMVS and it is documented in z/OS UNIX System Services 
>Command Reference.
>
"TSO SH" causes TSO TMP to execute an "SH" command, and I can't
find documentation of the latter.

IBM representatives have been conspicuously silent on two
ongoing related threads.  Perhaps they recognize BPXBATCH
is indefensible.

>
>From: Paul Gilmartin
>Sent: Friday, May 15, 2020 12:22 PM (in whatever timezone)
>
>On Fri, 15 May 2020 14:02:25 +, Seymour J Metz wrote:
>
>>Semicolon is a separator for TSO SH as well, but you have to keep TSO from 
>>recognizing it.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Kirk Wolf
Gil,

Some people hate EBCDIC, others BPXBATCH :-)

On Fri, May 15, 2020 at 11:35 AM Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Fri, 15 May 2020 11:26:29 -0500, Kirk Wolf wrote:
> >
> >STDPARM washes away the record boundaries (see the doc).  The semicolons
> >
> What if you start each line with x'15'?
> ISPF Edit change all ';' x'15 1 1'?
>
> >are required at the end of DD:STDPARM records so that this single argument
> >to "/bin/sh -c " can  be broken into multiple shell commands.   The whole
> >thing is an ugly hack.
> >
> >FWIW, I've been using the shell in z/OS batch since 2007 with its stdin
> >coming from //STDIN DD *.   And yes, I know what here documents are.   I
> >just don't use  brain dead BPXBATCH.
> >
> How do you *really* feel about it?
>
> -- gil
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
Which documentations describes the SH concatenation for other than instream? 
Also, where in the documentation does it say that it inserts whitespace after 
each record?

The treatment of semicolons is bog standard, but it wouldn't hurt to spell it 
out.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Kirk Wolf [k...@wolf-associates.com]
Sent: Friday, May 15, 2020 12:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Jack,
I would disagree with your explanation of why BPXBATCH works so poorly ;-)

In the OP's example, DD STDPARM is used to construct a single PARM string
that ends up getting passed to BPXBATCH.
What BPXBATCH does is look at the leading "SH"  in it's PARM and then pass
the rest of the string as the argument to "/bin/sh -c"

STDPARM washes away the record boundaries (see the doc).  The semicolons
are required at the end of DD:STDPARM records so that this single argument
to "/bin/sh -c " can  be broken into multiple shell commands.   The whole
thing is an ugly hack.

FWIW, I've been using the shell in z/OS batch since 2007 with its stdin
coming from //STDIN DD *.   And yes, I know what here documents are.   I
just don't use  brain dead BPXBATCH.

Kirk Wolf
Dovetailed Technologies
http://secure-web.cisco.com/1DDthcclBqpmyDPhXkwTl61-tucNWumiSPx4_aYKVPrVxNfeoPCrbBfnnG0alInEOrfKy2hfdhtNsJX0xkzozZbLNC4sEZpSyV8iB9cYm44BuNTg4l413TmpY-hPI9kvd9bEhJE2O6jUP5A07KotfYXVXevpgJ_SJXXF-ivOt8BCRRbAnRFKSl_4rgg_7hOFTJazOknkNLje7QaKMlvqf7E7qG_5YXdL3wCRLvPF8PHex1cN7yzYo6pXqmogp8RufthS8IOFnIsz65wS-psI3UhNQI_xzQ0aKGgrFpUuLajFp-EvfXZ8UbWHP5LBnVEyyyQl3wwS0Ra_SaX9fS8Fek9qIHRtyxDAucSxDCo7CMYDxe9GtsfU3rkuwNorljA-5qO6yGQZc049LnyIv0mtxe-i8CZBCpUkIUVTonlffsfncgtrSzuONGrpR4o_4dqy2/http%3A%2F%2Fdovetail.com
https://secure-web.cisco.com/1aSsEzfhdxsxGQOHzXtwj9y0ebXkNUzDJfewjX3pR6Fd4beP-RSZu0r_mGMErxN1fXuGAvcy8_tUYdci2FYwScWxvvSyTJLYVKb-DV_oDBH2-KLpQSgikqVtTB9xoROwUk4zGJRud0IEaZIeY_lwCaoS5XDsiVmIRKS03PhsUX65ETWqCmSFkA7dSiEUflO1g9KWuIPd1y-9Kz5KbEC34bcnfj_UpmPG0YHigxjbdV_zpjabwBWBytj_W7dr4ugL8Q7IaD472bZgZbMsCOXuyhmohBE5nVKhOorv6XNDVWO0eFl1-Zp5gmpAuzntiQaWBUgvDD5B9WUpC0dDdBA3Xhih7kRaG6waWl_qVVkr4mzcFqRmivXDmYVYfLpZnuqVxSh4-9AC7bd9Icrn2fFTCoHzczsJPN8P-16n_BjxnRA72LkIQx7xIWw8qJv_hkPnR/https%3A%2F%2Fdovetail.com%2Fproducts%2Fcozbatch.html

On Fri, May 15, 2020 at 10:12 AM Jack J. Woehr  wrote:

> On 5/15/20 8:51 AM, Seymour J Metz wrote:
> > I understand why they parse pgm and sh differently. What I don't
> understand is why instream data should be treated differently from other
> datasets.
>
> Because it's easier to present to the Unix System Services environment
> that way?
> Unix is stream oriented, not record oriented, and shell syntax is molded
> to that.
> There are shell features like "here documents" (google it) which you've
> probably never used that would get broken if input to the USS shell got
> arbitrarily broken into lines to suit the flavor of MVS/TSO/JES
>
> --
> Jack J. Woehr # Science is more than a body of knowledge. It's a way of
> http://secure-web.cisco.com/1gESWY33ldhCr_PLmzxOYS5kRZsH5Jydluqvcg3t9MPdfU6x1ydUzY2STwg49U53joXvW9MqU7qeVG1rzBwhnCuzzvAp06_kN0hg-HOY48DYj5sjsGbyf4Y4o1u16bdiQTQwbPH7w4NZAwoOlQT7Y6gPqz_nehnFJinPk_xF5VqBR8HOH2yWGGOdb81ML09T3VUzHm0dbK1UfatdI1MsMcX0zNOiUAHui4VwiwH2EraXz6ZBdNBjruuZ13Nm8jAFkKRFpphvG5odt_angEbyEh12MMa-9JqD-YHvT_Ro1Y-A4SmvxKszGzOeN8DzrG6ifDRlGLu69L6FrN-LoH1-duTRNa4AlO-4AOOULkrGB2d-1kj5XLBR0npsMO3BZVSDwuP_HZoeoJZcgJ1O4NDZR91cSsyxuctt7pi9czx4a3KNLPnU8eQHIKBg8qFkmLjc0/http%3A%2F%2Fwww.well.com%2F%7Ejax
>  # thinking, a way of skeptically interrogating the
> universe
> http://secure-web.cisco.com/1c3bguWSr6vX_z9MzaC9qKeA90R2_IXvUWNYaxNOPZEwapHRxEeNZIP5t_lyYQlEm00CjAYwR5XIeVuxmpCFmaU1e08LVCXTddtN_aCrhbSIVtjDNsCoPYUdchbDTDgU8G8XiLSeh00_ZsYnxAffHN5MwnqwljzkoFgy1aBBOqhgwEOuwhrhlkK90h37VrmniazBwQ2Cr1FeHaHR5IWL2S04PUKukm7EHWnaAw7ZqMH9LTdB2Sh8_M9xG_JhtvcnezixRxoCQGMY4L2ERQ3-2mcds8hu6-uO2dd5-w0TdjjF8h13FF9wAv92ofsTX2y0yLzqEp6aM6B-fotmfvmRlg2djTqbrDKXl8I3IpEox8BzgNtqQWHQeLLutbcDbLHUp7HkRaMxhDiUQKdJAEvGaKqI7b9lFzHWvwrC6yqm8NzZr4yVYJ50ist5FATq0Vmey/http%3A%2F%2Fwww.softwoehr.com
>  # with a fine understanding of human fallibility. -
> Carl Sagan
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
I thought that you could turn off TSO recognition of semicolon with PROFILE or 
TERMINAL but, no, you can't. I'm not sure what happens if CLIST or REXX code 
passes a semicolon. OTOH, TSO will accept a semicolon in a quoted string.

The TSO command is OMVS and it is documented in z/OS UNIX System Services 
Command Reference.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Friday, May 15, 2020 12:22 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

On Fri, 15 May 2020 14:02:25 +, Seymour J Metz wrote:

>Semicolon is a separator for TSO SH as well, but you have to keep TSO from 
>recognizing it.
>
Can it be quoted or escaped?  What about on the ISPF command line?

Where is the "TSO SH" command described?  TSO Command Ref?  UNIX Command Ref?
Other (specify)?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 11:26:29 -0500, Kirk Wolf wrote:
>
>STDPARM washes away the record boundaries (see the doc).  The semicolons
>
What if you start each line with x'15'?
ISPF Edit change all ';' x'15 1 1'?

>are required at the end of DD:STDPARM records so that this single argument
>to "/bin/sh -c " can  be broken into multiple shell commands.   The whole
>thing is an ugly hack.
> 
>FWIW, I've been using the shell in z/OS batch since 2007 with its stdin
>coming from //STDIN DD *.   And yes, I know what here documents are.   I
>just don't use  brain dead BPXBATCH.
> 
How do you *really* feel about it?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Kirk Wolf
Jack,
I would disagree with your explanation of why BPXBATCH works so poorly ;-)

In the OP's example, DD STDPARM is used to construct a single PARM string
that ends up getting passed to BPXBATCH.
What BPXBATCH does is look at the leading "SH"  in it's PARM and then pass
the rest of the string as the argument to "/bin/sh -c"

STDPARM washes away the record boundaries (see the doc).  The semicolons
are required at the end of DD:STDPARM records so that this single argument
to "/bin/sh -c " can  be broken into multiple shell commands.   The whole
thing is an ugly hack.

FWIW, I've been using the shell in z/OS batch since 2007 with its stdin
coming from //STDIN DD *.   And yes, I know what here documents are.   I
just don't use  brain dead BPXBATCH.

Kirk Wolf
Dovetailed Technologies
http://dovetail.com
https://dovetail.com/products/cozbatch.html

On Fri, May 15, 2020 at 10:12 AM Jack J. Woehr  wrote:

> On 5/15/20 8:51 AM, Seymour J Metz wrote:
> > I understand why they parse pgm and sh differently. What I don't
> understand is why instream data should be treated differently from other
> datasets.
>
> Because it's easier to present to the Unix System Services environment
> that way?
> Unix is stream oriented, not record oriented, and shell syntax is molded
> to that.
> There are shell features like "here documents" (google it) which you've
> probably never used that would get broken if input to the USS shell got
> arbitrarily broken into lines to suit the flavor of MVS/TSO/JES
>
> --
> Jack J. Woehr # Science is more than a body of knowledge. It's a way of
> www.well.com/~jax # thinking, a way of skeptically interrogating the
> universe
> www.softwoehr.com # with a fine understanding of human fallibility. -
> Carl Sagan
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 14:02:25 +, Seymour J Metz wrote:

>Semicolon is a separator for TSO SH as well, but you have to keep TSO from 
>recognizing it.
>
Can it be quoted or escaped?  What about on the ISPF command line?

Where is the "TSO SH" command described?  TSO Command Ref?  UNIX Command Ref?
Other (specify)?

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 15:43:34 +, Seymour J Metz wrote:

>I hate that URL mangling! 
>https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxa500/bpxbatr.htm
> 
And that one didn't get mangled.  It's the Command Ref.

>IBM Knowledge Center
>
> Home -> z/OS 2.1.0 -> z/OS UNIX System Services -> z/OS UNIX System Services 
> User's Guide -> The z/OS shells -> Using z/OS UNIX from batch, TSO/E, and 
> ISPF -> The BPXBATCH utility -> Passing parameter data to BPXBATCH -> 
> Guidelines for defining STDPARM
> 
But that's the User's Guide.  Rules belong in the Ref.

In-stream seems to be the exception that proves the rule, but
what rule applies to non-in-stream?

IBM screwed it up.  And there's no upward-compatible recovery path.
Perhaps an entirely different DDNAME.

>__
>From: Paul Gilmartin
>Sent: Friday, May 15, 2020 11:08 AM
>
>>"For in-stream data sets: with the SH option, trailing blanks are not 
>>truncated. Records in in-stream data sets are concatenated with blanks as 
>>separator characters, and the string remaining after the SH token is passed 
>>as a single argument to a /bin/sh -c command. For the PGM option, the string 
>>is divided not only at line boundaries but also at horizontal white space 
>>within a line. "

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 09:12:36 -0600, Jack J. Woehr  wrote:
>
>There are shell features like "here documents" (google it) which you've
>probably never used that would get broken if input to the USS shell got
>arbitrarily broken into lines to suit the flavor of MVS/TSO/JES
>
Au contraire.  Here documents work far better if record boundaries
are preserved (not arbitrarily; converted to NL); hardly at all if lines
are concatenated.

I use them regularly

BPXWUNIX does much better.  Fantasy RFE: provide a rudimentary
wrapper for BPXWUNIX callable via IRXJCL, not much more than:

SIGNAL ON NOVALUE
parse arg Login Cmd  /* Cmd may have multiple tokens.  */
address MVS
'EXECIO * DISKR STDENV (stem ENV.'  /* Error recovery?  */
call BPXWUNIX Cmd, 'DD:STDIN', 'DD:STDOUT', 'DD:STDERR', 'ENV.', Login
return RESULT

I'd expect DD *,SYMBOLS= to work for STDIN.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
I hate that URL mangling! 
https://www.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxa500/bpxbatr.htm

IBM Knowledge Center

 Home -> z/OS 2.1.0 -> z/OS UNIX System Services -> z/OS UNIX System Services 
User's Guide -> The z/OS shells -> Using z/OS UNIX from batch, TSO/E, and ISPF 
-> The BPXBATCH utility -> Passing parameter data to BPXBATCH -> Guidelines for 
defining STDPARM



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [000433f07816-dmarc-requ...@listserv.ua.edu]
Sent: Friday, May 15, 2020 11:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

On Fri, 15 May 2020 13:35:59 +, Seymour J Metz wrote:

>"For in-stream data sets: with the SH option, trailing blanks are not 
>truncated. Records in in-stream data sets are concatenated with blanks as 
>separator characters, and the string remaining after the SH token is passed as 
>a single argument to a /bin/sh -c command. For the PGM option, the string is 
>divided not only at line boundaries but also at horizontal white space within 
>a line. "
>
Where did you find that (citation needed)?  I find only roughly
similar for STDPARM in:
z/OS  Version 2 Release 4
UNIX System Services Command Reference
IBM   SA23-2280-40

>Which doesn't make a lot of sense. If it is not taken as a single parameter 
>for other file types, why not?
>
There appears to be a woeful lack of communication among
designers, coders, and tech writers.  Almost more than can be
fixed by RCF.  Examples needed for Cartesian product of:
{SH|PGM} {FB|VB} {PATH|DSN|SYSIN} {single|multiple commands}

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 09:30:46 -0500, Joel C. Ewing  wrote:

>I think that maybe they are trying to imply ..l.
> 
Stop! That's not how to document.


On Fri, 15 May 2020 14:51:10 +, Seymour J Metz wrote:
>
>I understand why they parse pgm and sh differently. What I don't understand is 
>why instream data should be treated differently from other datasets. 
>
They believed, erroneously, that instream data can only be fixed-80.
But that doesn't justify treating instream data differently from other
data sets with similar attributes.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Jack J. Woehr

On 5/15/20 8:51 AM, Seymour J Metz wrote:

I understand why they parse pgm and sh differently. What I don't understand is 
why instream data should be treated differently from other datasets.


Because it's easier to present to the Unix System Services environment 
that way?
Unix is stream oriented, not record oriented, and shell syntax is molded 
to that.
There are shell features like "here documents" (google it) which you've 
probably never used that would get broken if input to the USS shell got 
arbitrarily broken into lines to suit the flavor of MVS/TSO/JES


--
Jack J. Woehr # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Paul Gilmartin
On Fri, 15 May 2020 13:35:59 +, Seymour J Metz wrote:

>"For in-stream data sets: with the SH option, trailing blanks are not 
>truncated. Records in in-stream data sets are concatenated with blanks as 
>separator characters, and the string remaining after the SH token is passed as 
>a single argument to a /bin/sh -c command. For the PGM option, the string is 
>divided not only at line boundaries but also at horizontal white space within 
>a line. "
>
Where did you find that (citation needed)?  I find only roughly
similar for STDPARM in:
z/OS  Version 2 Release 4
UNIX System Services Command Reference
IBM   SA23-2280-40
 
>Which doesn't make a lot of sense. If it is not taken as a single parameter 
>for other file types, why not?
>
There appears to be a woeful lack of communication among
designers, coders, and tech writers.  Almost more than can be
fixed by RCF.  Examples needed for Cartesian product of:
{SH|PGM} {FB|VB} {PATH|DSN|SYSIN} {single|multiple commands}

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
I understand why they parse pgm and sh differently. What I don't understand is 
why instream data should be treated differently from other datasets. 


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
Joel C. Ewing 
Sent: Friday, May 15, 2020 10:30 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

I think that maybe they are trying to imply that if "PGM" is used, the
whole rest of the multi-line string is parsed as MVS-style program
parameters, with record  boundaries always being a parameter boundary,
and passed to the program. if "SH" is used, the entire string is passed
as the "command" argument to the unix shell, which then parses it as
unix commands plus parameters according to unix command syntax rules; so
that with only a blank at end-of-record, an in-stream end-of-line might
not be the end of a command or even the end of a parameter.   Either
way, highly confusing as would appear to be a  collision of two
paradigms.  Multiple examples of what they really meant would have been
useful.
Joel C Ewing

On 5/15/20 8:35 AM, Seymour J Metz wrote:
> "For in-stream data sets: with the SH option, trailing blanks are not 
> truncated. Records in in-stream data sets are concatenated with blanks as 
> separator characters, and the string remaining after the SH token is passed 
> as a single argument to a /bin/sh -c command. For the PGM option, the string 
> is divided not only at line boundaries but also at horizontal white space 
> within a line. "
>
> Which doesn't make a lot of sense. If it is not taken as a single parameter 
> for other file types, why not?
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Jon Bathmaker [jon.bathma...@sys1consulting.com]
> Sent: Friday, May 15, 2020 8:10 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: USS: su: User ID "SH" does not exist
>
> Hi Ed,
>
> Thanks for this!  How *did* you find out about the semicolons, I didn't
> see them anywhere in the doc.
>
> Best regards,
> *Jon Bathmaker,*
> SYS1 Consulting Inc.
> 519-577-9661
>
>
>
> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>> //STDPARM DD *
>>> SH su
>>> SH echo $PATH
>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>
>> The above looks wrong to me. I always do it this way:
>>
>>
>> //STDPARM  DD *
>> SH su;
>>echo $PATH;
>>unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>
>>
> ...


--
Joel C. Ewing

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Joel C. Ewing
I think that maybe they are trying to imply that if "PGM" is used, the
whole rest of the multi-line string is parsed as MVS-style program
parameters, with record  boundaries always being a parameter boundary,
and passed to the program. if "SH" is used, the entire string is passed
as the "command" argument to the unix shell, which then parses it as
unix commands plus parameters according to unix command syntax rules; so
that with only a blank at end-of-record, an in-stream end-of-line might
not be the end of a command or even the end of a parameter.   Either
way, highly confusing as would appear to be a  collision of two
paradigms.  Multiple examples of what they really meant would have been
useful.
    Joel C Ewing

On 5/15/20 8:35 AM, Seymour J Metz wrote:
> "For in-stream data sets: with the SH option, trailing blanks are not 
> truncated. Records in in-stream data sets are concatenated with blanks as 
> separator characters, and the string remaining after the SH token is passed 
> as a single argument to a /bin/sh -c command. For the PGM option, the string 
> is divided not only at line boundaries but also at horizontal white space 
> within a line. "
>
> Which doesn't make a lot of sense. If it is not taken as a single parameter 
> for other file types, why not?
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> Jon Bathmaker [jon.bathma...@sys1consulting.com]
> Sent: Friday, May 15, 2020 8:10 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: USS: su: User ID "SH" does not exist
>
> Hi Ed,
>
> Thanks for this!  How *did* you find out about the semicolons, I didn't
> see them anywhere in the doc.
>
> Best regards,
> *Jon Bathmaker,*
> SYS1 Consulting Inc.
> 519-577-9661
>
>
>
> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>> //STDPARM DD *
>>> SH su
>>> SH echo $PATH
>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>
>> The above looks wrong to me. I always do it this way:
>>
>>
>> //STDPARM  DD *
>> SH su;
>>echo $PATH;
>>unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>
>>
> ...


-- 
Joel C. Ewing

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Don Poitras
Jon,
  You have to email the listserv for everyone to see your note. See
instructions at the bottom of this post. 

All,
  I think I've posted this before, but this is how I avoid semi-colons and
plus signs. I just have a job where I can type normal commands and see the
output as I'd like. 

//DONBPX JOB (,R282),POITRAS,NOTIFY=SASDTP,TIME=(0,10),CLASS=A,
//REGION=1M,MSGCLASS=A  
//* 
//*  The idea here is that I'd like to see the commands printed 
//*  along with the output. set -x will do that (while printing 
//*  a "++" in front of the commands, but that's ok), but sends  
//*  it's debugging output to stderr. By setting stdout and 
//*  stderr to the same file, the output is interleaved and the 
//*  final step prints the result.  
//* 
//COPY1EXEC PGM=IEBGENER
//SYSINDD DUMMY 
//SYSUT1   DD * 
set -x  
cd /u/sasdtp/temp   
pwd 
ls -Fartl   
date
/*  
//SYSUT2   DD PATH='/u/sasdtp/donbpx2.txt', 
//PATHOPTS=(ORDWR,OTRUNC,OCREAT),PATHMODE=SIRWXU,   
//PATHDISP=(KEEP,DELETE),FILEDATA=TEXT  
//SYSPRINT DD SYSOUT=*  
//BPXBAT   EXEC PGM=BPXBATCH,PARMDD=PARMINDD
//STDINDD DUMMY 
//STDOUT   DD PATH='/u/sasdtp/donbpx2.out.txt', 
//PATHOPTS=(OWRONLY,OTRUNC,OCREAT),PATHMODE=SIRWXU, 
//PATHDISP=(KEEP,DELETE),FILEDATA=TEXT  
//STDERR   DD PATH='/u/sasdtp/donbpx2.out.txt', 
//PATHOPTS=(OWRONLY,OTRUNC,OCREAT),PATHMODE=SIRWXU, 
//PATHDISP=(KEEP,DELETE),FILEDATA=TEXT  
//PARMINDD DD * 
sh /u/sasdtp/donbpx2.txt
/*  
//COPY2EXEC PGM=IEBGENER
//SYSINDD DUMMY 
//SYSUT1   DD PATH='/u/sasdtp/donbpx2.out.txt', 
//PATHOPTS=(ORDONLY),   
//RECFM=VB,LRECL=1024,BLKSIZE=3000  
//SYSUT2   DD SYSOUT=*  
//SYSPRINT DD SYSOUT=*  
//  

result:

++ cd /u/sasdtp/temp   
++ pwd 
/u/sasdtp/temp 
++ ls -Fartl   
total 620  
-rw-r--r--1 SASDTP   CCD 5797 Jan 20  2011 hexdump.C   
-rwxr-xr-x1 SASDTP   CCD   118784 Jan 20  2011 hexdump*
-rwx--1 SASDTP   CCD   129024 Jan 20  2011 hexdump.pax*
drwxr-xr-x2 SASDTP   CCD 8192 Oct 30  2019 ./  
drwxr-xr-x  131 SASDTP   CCD32768 May 15 14:04 ../ 
++ date
Fri May 15 14:15:35 UTC 2020   


In article <3a46c5b9-6e54-4a14-affb-79dc3437c...@googlegroups.com> you wrote:
> On Friday, May 15, 2020 at 10:23:30 AM UTC+10, Jon Bathmaker wrote:
> > Hi,
> > 
> > Because of auditor demands we are no longer able to run TSO USS commands 
> > that require UID=0,?? so I attempting figure out how to run?? USS commands 
> > in under BPXBATCH.?? The following is a job to debug the unmount command 
> > in batch but I have been unsuccessful so far. I am hoping that I am 
> > doing something wrong and that one of you can point out my error.
> > 
> > Here is the JCL:
> > 
> > //BATBPX?? EXEC PGM=BPXBATCH
> > 
> > //STEPLIB?? DD DISP=SHR,DSN=SYS1.CEE.SCEERUN
> > 
> > //STDERR DD SYSOUT=*
> > 
> > //STDOUT?? ??DD SYSOUT=*
> > 
> > //STDPARM?? DD *
> > 
> > SH su
> > 
> > SH echo $PATH
> > 
> > SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
> > 
> > Here is the contents of STDERR when the job runs.
> > 
> > FSUM5023 su: User ID "SH" does not exist, or the 

Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
Semicolon is a separator for TSO SH as well, but you have to keep TSO from 
recognizing it.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of 
David Crayford 
Sent: Friday, May 15, 2020 9:55 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

I'm talking about the TSO SH command not a shell script!

On 2020-05-15 9:13 PM, Joel C. Ewing wrote:
> Nope.   In Unix, semicolons are command separators, not a continuation
> indicator.  The actual command continuation character is "\", but that
> is only needed just prior to an EOL character.
>
> It would appear that in this environment no end-of-line characters are
> seen, so unix just sees "SH su  SH ...".  Without the
> semicolon the shell sees the command  "su SH", which is an attempt to
> switch to the context of user "SH".   In the absence of a recognized
> EOL/ENTER to indicate end of command, the semicolon must be used between
> commands -- although putting an extra one at the end doesn't hurt -- it
> just sees a null command at the end.
>
> This requirement may not be documented.   They may just assume that
> everyone familiar with Unix will of course "know" this if they describe
> the STDPARM file as being treated as a single string  or a single line
> with no EOL forced at the end of each record.
>  Joel C Ewing
>
>
> On 5/15/20 7:47 AM, David Crayford wrote:
>> Nope. Semicolons are a continuation!
>>
>> On 2020-05-15 8:13 PM, David Spiegel wrote:
>>> Hi Jon,
>>> Every line except for the last line needs a semicolon.
>>>
>>> Regards,
>>> David
>>>
>>> On 2020-05-15 08:10, Jon Bathmaker wrote:
>>>> Hi Ed,
>>>>
>>>> Thanks for this!  How *did* you find out about the semicolons, I
>>>> didn't see them anywhere in the doc.
>>>>
>>>> Best regards,
>>>> *Jon Bathmaker,*
>>>> SYS1 Consulting Inc.
>>>> 519-577-9661
>>>>
>>>>
>>>>
>>>> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>>>>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>>>>> //STDPARM DD *
>>>>>> SH su
>>>>>> SH echo $PATH
>>>>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>>
>>>>> The above looks wrong to me. I always do it this way:
>>>>>
>>>>>
>>>>> //STDPARM  DD *
>>>>> SH su;
>>>>> echo $PATH;
>>>>> unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>>
>>>>>
>>>> ..
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread David Crayford

I'm talking about the TSO SH command not a shell script!

On 2020-05-15 9:13 PM, Joel C. Ewing wrote:

Nope.   In Unix, semicolons are command separators, not a continuation
indicator.  The actual command continuation character is "\", but that
is only needed just prior to an EOL character.

It would appear that in this environment no end-of-line characters are
seen, so unix just sees "SH su  SH ...".  Without the
semicolon the shell sees the command  "su SH", which is an attempt to
switch to the context of user "SH".   In the absence of a recognized
EOL/ENTER to indicate end of command, the semicolon must be used between
commands -- although putting an extra one at the end doesn't hurt -- it
just sees a null command at the end.

This requirement may not be documented.   They may just assume that
everyone familiar with Unix will of course "know" this if they describe
the STDPARM file as being treated as a single string  or a single line
with no EOL forced at the end of each record.
     Joel C Ewing


On 5/15/20 7:47 AM, David Crayford wrote:

Nope. Semicolons are a continuation!

On 2020-05-15 8:13 PM, David Spiegel wrote:

Hi Jon,
Every line except for the last line needs a semicolon.

Regards,
David

On 2020-05-15 08:10, Jon Bathmaker wrote:

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I
didn't see them anywhere in the doc.

Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
    echo $PATH;
    unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



..




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
Of course: semicolon is the standard *ix command separator. If the parameter 
following -c includes a semicol then it is treated as multiple commands.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Spiegel [dspiegel...@hotmail.com]
Sent: Friday, May 15, 2020 9:36 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Hi R'Shmuel,
BPXBATCH allows only one Command Buffer. If the user wants to issue more
than one command, then s/he must separate commands with a semicolon
(much like the ISPF Command line).

Regards,
David

On 2020-05-15 09:32, Seymour J Metz wrote:
> Possibly, but ; is definitely a command separator character, not a 
> continuation character.
>
>
> --
> Shmuel (Seymour J.) Metz
> https://eur05.safelinks.protection.outlook.com/?url=http:%2F%2Fmason.gmu.edu%2F~smetz3data=02%7C01%7C%7Ca1d14b2155ab4d26d96808d7f8d47ff5%7C84df9e7fe9f640afb435%7C1%7C0%7C637251463900660906sdata=0v7lCqOekIfyjsPxgu%2BQw9Rp%2FwNpXSERP%2F8lo5%2F04Tg%3Dreserved=0
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> David Crayford [dcrayf...@gmail.com]
> Sent: Friday, May 15, 2020 9:25 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: USS: su: User ID "SH" does not exist
>
> Yes, in a shell, but no using BPXBATCH.
>
> On 2020-05-15 9:17 PM, Seymour J Metz wrote:
>> ITYM \ at the end is a continuation.
>>
>>
>> --
>> Shmuel (Seymour J.) Metz
>> https://eur05.safelinks.protection.outlook.com/?url=http:%2F%2Fmason.gmu.edu%2F~smetz3data=02%7C01%7C%7Ca1d14b2155ab4d26d96808d7f8d47ff5%7C84df9e7fe9f640afb435%7C1%7C0%7C637251463900660906sdata=0v7lCqOekIfyjsPxgu%2BQw9Rp%2FwNpXSERP%2F8lo5%2F04Tg%3Dreserved=0
>>
>> 
>> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>> David Crayford [dcrayf...@gmail.com]
>> Sent: Friday, May 15, 2020 8:47 AM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: USS: su: User ID "SH" does not exist
>>
>> Nope. Semicolons are a continuation!
>>
>> On 2020-05-15 8:13 PM, David Spiegel wrote:
>>> Hi Jon,
>>> Every line except for the last line needs a semicolon.
>>>
>>> Regards,
>>> David
>>>
>>> On 2020-05-15 08:10, Jon Bathmaker wrote:
>>>> Hi Ed,
>>>>
>>>> Thanks for this!  How *did* you find out about the semicolons, I
>>>> didn't see them anywhere in the doc.
>>>>
>>>> Best regards,
>>>> *Jon Bathmaker,*
>>>> SYS1 Consulting Inc.
>>>> 519-577-9661
>>>>
>>>>
>>>>
>>>> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>>>>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>>>>> //STDPARM DD *
>>>>>> SH su
>>>>>> SH echo $PATH
>>>>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>> The above looks wrong to me. I always do it this way:
>>>>>
>>>>>
>>>>> //STDPARM  DD *
>>>>> SH su;
>>>>>  echo $PATH;
>>>>>  unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>>
>>>>>
>>>> --
>>>> For IBM-MAIN subscribe / signoff / archive access instructions,
>>>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>>> .
>>> --
>>> For IBM-MAIN subscribe / signoff / archive access instructions,
>>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>> --
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>
>> --
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> .

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread David Spiegel

Hi R'Shmuel,
BPXBATCH allows only one Command Buffer. If the user wants to issue more 
than one command, then s/he must separate commands with a semicolon 
(much like the ISPF Command line).


Regards,
David

On 2020-05-15 09:32, Seymour J Metz wrote:

Possibly, but ; is definitely a command separator character, not a continuation 
character.


--
Shmuel (Seymour J.) Metz
https://eur05.safelinks.protection.outlook.com/?url=http:%2F%2Fmason.gmu.edu%2F~smetz3data=02%7C01%7C%7Ca1d14b2155ab4d26d96808d7f8d47ff5%7C84df9e7fe9f640afb435%7C1%7C0%7C637251463900660906sdata=0v7lCqOekIfyjsPxgu%2BQw9Rp%2FwNpXSERP%2F8lo5%2F04Tg%3Dreserved=0


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Friday, May 15, 2020 9:25 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Yes, in a shell, but no using BPXBATCH.

On 2020-05-15 9:17 PM, Seymour J Metz wrote:

ITYM \ at the end is a continuation.


--
Shmuel (Seymour J.) Metz
https://eur05.safelinks.protection.outlook.com/?url=http:%2F%2Fmason.gmu.edu%2F~smetz3data=02%7C01%7C%7Ca1d14b2155ab4d26d96808d7f8d47ff5%7C84df9e7fe9f640afb435%7C1%7C0%7C637251463900660906sdata=0v7lCqOekIfyjsPxgu%2BQw9Rp%2FwNpXSERP%2F8lo5%2F04Tg%3Dreserved=0


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Friday, May 15, 2020 8:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Nope. Semicolons are a continuation!

On 2020-05-15 8:13 PM, David Spiegel wrote:

Hi Jon,
Every line except for the last line needs a semicolon.

Regards,
David

On 2020-05-15 08:10, Jon Bathmaker wrote:

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I
didn't see them anywhere in the doc.

Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS

The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
 echo $PATH;
 unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
"For in-stream data sets: with the SH option, trailing blanks are not 
truncated. Records in in-stream data sets are concatenated with blanks as 
separator characters, and the string remaining after the SH token is passed as 
a single argument to a /bin/sh -c command. For the PGM option, the string is 
divided not only at line boundaries but also at horizontal white space within a 
line. "

Which doesn't make a lot of sense. If it is not taken as a single parameter for 
other file types, why not?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Jon 
Bathmaker [jon.bathma...@sys1consulting.com]
Sent: Friday, May 15, 2020 8:10 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I didn't
see them anywhere in the doc.

Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:
> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>> //STDPARM DD *
>> SH su
>> SH echo $PATH
>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>
>
> The above looks wrong to me. I always do it this way:
>
>
> //STDPARM  DD *
> SH su;
>echo $PATH;
>unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>
>

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
Possibly, but ; is definitely a command separator character, not a continuation 
character.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Friday, May 15, 2020 9:25 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Yes, in a shell, but no using BPXBATCH.

On 2020-05-15 9:17 PM, Seymour J Metz wrote:
> ITYM \ at the end is a continuation.
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> 
> From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
> David Crayford [dcrayf...@gmail.com]
> Sent: Friday, May 15, 2020 8:47 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: USS: su: User ID "SH" does not exist
>
> Nope. Semicolons are a continuation!
>
> On 2020-05-15 8:13 PM, David Spiegel wrote:
>> Hi Jon,
>> Every line except for the last line needs a semicolon.
>>
>> Regards,
>> David
>>
>> On 2020-05-15 08:10, Jon Bathmaker wrote:
>>> Hi Ed,
>>>
>>> Thanks for this!  How *did* you find out about the semicolons, I
>>> didn't see them anywhere in the doc.
>>>
>>> Best regards,
>>> *Jon Bathmaker,*
>>> SYS1 Consulting Inc.
>>> 519-577-9661
>>>
>>>
>>>
>>> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>>>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>>>> //STDPARM DD *
>>>>> SH su
>>>>> SH echo $PATH
>>>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>
>>>> The above looks wrong to me. I always do it this way:
>>>>
>>>>
>>>> //STDPARM  DD *
>>>> SH su;
>>>> echo $PATH;
>>>> unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>
>>>>
>>> --
>>> For IBM-MAIN subscribe / signoff / archive access instructions,
>>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>> .
>> --
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
Now this is precious: "For in-stream data sets: with the SH option, trailing 
blanks are not truncated. Records in in-stream data sets are concatenated with 
blanks as separator characters, and the string remaining after the SH token is 
passed as a single argument to a /bin/sh -c command. For the PGM option, the 
string is divided not only at line boundaries but also at horizontal white 
space within a line. "

Where is it documented how STDPARM is treated for other datasets and Unix 
files? If the data after the leading shell are not treated as a single 
parameter, why not?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Joel C. Ewing [jcew...@acm.org]
Sent: Friday, May 15, 2020 9:13 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Nope.   In Unix, semicolons are command separators, not a continuation
indicator.  The actual command continuation character is "\", but that
is only needed just prior to an EOL character.

It would appear that in this environment no end-of-line characters are
seen, so unix just sees "SH su  SH ...".  Without the
semicolon the shell sees the command  "su SH", which is an attempt to
switch to the context of user "SH".   In the absence of a recognized
EOL/ENTER to indicate end of command, the semicolon must be used between
commands -- although putting an extra one at the end doesn't hurt -- it
just sees a null command at the end.

This requirement may not be documented.   They may just assume that
everyone familiar with Unix will of course "know" this if they describe
the STDPARM file as being treated as a single string  or a single line
with no EOL forced at the end of each record.
Joel C Ewing


On 5/15/20 7:47 AM, David Crayford wrote:
> Nope. Semicolons are a continuation!
>
> On 2020-05-15 8:13 PM, David Spiegel wrote:
>> Hi Jon,
>> Every line except for the last line needs a semicolon.
>>
>> Regards,
>> David
>>
>> On 2020-05-15 08:10, Jon Bathmaker wrote:
>>> Hi Ed,
>>>
>>> Thanks for this!  How *did* you find out about the semicolons, I
>>> didn't see them anywhere in the doc.
>>>
>>> Best regards,
>>> *Jon Bathmaker,*
>>> SYS1 Consulting Inc.
>>> 519-577-9661
>>>
>>>
>>>
>>> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>>>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>>>> //STDPARM DD *
>>>>> SH su
>>>>> SH echo $PATH
>>>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>
>>>>
>>>> The above looks wrong to me. I always do it this way:
>>>>
>>>>
>>>> //STDPARM  DD *
>>>> SH su;
>>>>echo $PATH;
>>>>unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>>
>>>>
>>> ..


--
Joel C. Ewing

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread David Spiegel

Hi David,
Yes, I am aware of that. That is *why* they are necessary.
What is your point?

Regards,
David

On 2020-05-15 08:47, David Crayford wrote:

Nope. Semicolons are a continuation!

On 2020-05-15 8:13 PM, David Spiegel wrote:

Hi Jon,
Every line except for the last line needs a semicolon.

Regards,
David

On 2020-05-15 08:10, Jon Bathmaker wrote:

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I 
didn't see them anywhere in the doc.


Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
   echo $PATH;
   unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread David Crayford

Yes, in a shell, but no using BPXBATCH.

On 2020-05-15 9:17 PM, Seymour J Metz wrote:

ITYM \ at the end is a continuation.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Friday, May 15, 2020 8:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Nope. Semicolons are a continuation!

On 2020-05-15 8:13 PM, David Spiegel wrote:

Hi Jon,
Every line except for the last line needs a semicolon.

Regards,
David

On 2020-05-15 08:10, Jon Bathmaker wrote:

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I
didn't see them anywhere in the doc.

Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
echo $PATH;
unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Seymour J Metz
ITYM \ at the end is a continuation.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Friday, May 15, 2020 8:47 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: USS: su: User ID "SH" does not exist

Nope. Semicolons are a continuation!

On 2020-05-15 8:13 PM, David Spiegel wrote:
> Hi Jon,
> Every line except for the last line needs a semicolon.
>
> Regards,
> David
>
> On 2020-05-15 08:10, Jon Bathmaker wrote:
>> Hi Ed,
>>
>> Thanks for this!  How *did* you find out about the semicolons, I
>> didn't see them anywhere in the doc.
>>
>> Best regards,
>> *Jon Bathmaker,*
>> SYS1 Consulting Inc.
>> 519-577-9661
>>
>>
>>
>> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
>>> On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
>>>> //STDPARM DD *
>>>> SH su
>>>> SH echo $PATH
>>>> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>
>>>
>>> The above looks wrong to me. I always do it this way:
>>>
>>>
>>> //STDPARM  DD *
>>> SH su;
>>>echo $PATH;
>>>unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>>>
>>>
>>
>> --
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>> .
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Joel C. Ewing
Nope.   In Unix, semicolons are command separators, not a continuation
indicator.  The actual command continuation character is "\", but that
is only needed just prior to an EOL character.

It would appear that in this environment no end-of-line characters are
seen, so unix just sees "SH su  SH ...".  Without the
semicolon the shell sees the command  "su SH", which is an attempt to
switch to the context of user "SH".   In the absence of a recognized 
EOL/ENTER to indicate end of command, the semicolon must be used between
commands -- although putting an extra one at the end doesn't hurt -- it
just sees a null command at the end.

This requirement may not be documented.   They may just assume that
everyone familiar with Unix will of course "know" this if they describe
the STDPARM file as being treated as a single string  or a single line
with no EOL forced at the end of each record.
    Joel C Ewing


On 5/15/20 7:47 AM, David Crayford wrote:
> Nope. Semicolons are a continuation!
>
> On 2020-05-15 8:13 PM, David Spiegel wrote:
>> Hi Jon,
>> Every line except for the last line needs a semicolon.
>>
>> Regards,
>> David
>>
>> On 2020-05-15 08:10, Jon Bathmaker wrote:
>>> Hi Ed,
>>>
>>> Thanks for this!  How *did* you find out about the semicolons, I
>>> didn't see them anywhere in the doc.
>>>
>>> Best regards,
>>> *Jon Bathmaker,*
>>> SYS1 Consulting Inc.
>>> 519-577-9661
>>>
>>>
>>>
>>> On 5/15/2020 12:19 AM, Ed Jaffe wrote:
 On 5/14/2020 5:23 PM, Jon Bathmaker wrote:
> //STDPARM DD *
> SH su
> SH echo $PATH
> SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


 The above looks wrong to me. I always do it this way:


 //STDPARM  DD *
 SH su;
    echo $PATH;
    unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


>>> ..


-- 
Joel C. Ewing

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Allan Staller
Use BPXBATSL, Check the fine manuals for details.

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Jon 
Bathmaker
Sent: Thursday, May 14, 2020 7:23 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: USS: su: User ID "SH" does not exist

[CAUTION: This Email is from outside the Organization. Unless you trust the 
sender, Don't click links or open attachments as it may be a Phishing email, 
which can steal your Information and compromise your Computer.]

Hi,

Because of auditor demands we are no longer able to run TSO USS commands that 
require UID=0,  so I attempting figure out how to run  USS commands in under 
BPXBATCH.  The following is a job to debug the unmount command
in batch but I have been unsuccessful so far.   I am hoping that I am
doing something wrong and that one of you can point out my error.

Here is the JCL:

//BATBPX  EXEC PGM=BPXBATCH

//STEPLIB  DD DISP=SHR,DSN=SYS1.CEE.SCEERUN

//STDERR   DD SYSOUT=*

//STDOUT   DD SYSOUT=*

//STDPARM  DD *

SH su

SH echo $PATH

SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS

Here is the contents of STDERR when the job runs.

FSUM5023 su: User ID "SH" does not exist, or the RACF profile does not contain 
an OMVS segment.


Thanks.

Best regards,

Jon Bathmaker

z/OS Systems Programmer


--
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN
::DISCLAIMER::

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. E-mail transmission is not guaranteed to be 
secure or error-free as information could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete, or may contain viruses in transmission. 
The e mail and its contents (with or without referred errors) shall therefore 
not attach any liability on the originator or HCL or its affiliates. Views or 
opinions, if any, presented in this email are solely those of the author and 
may not necessarily reflect the views or opinions of HCL or its affiliates. Any 
form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of this message without the prior written 
consent of authorized representative of HCL is strictly prohibited. If you have 
received this email in error please delete it and notify the sender 
immediately. Before opening any email and/or attachments, please check them for 
viruses and other defects.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread David Crayford

Nope. Semicolons are a continuation!

On 2020-05-15 8:13 PM, David Spiegel wrote:

Hi Jon,
Every line except for the last line needs a semicolon.

Regards,
David

On 2020-05-15 08:10, Jon Bathmaker wrote:

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I 
didn't see them anywhere in the doc.


Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
   echo $PATH;
   unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread David Spiegel

Hi Jon,
Every line except for the last line needs a semicolon.

Regards,
David

On 2020-05-15 08:10, Jon Bathmaker wrote:

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I 
didn't see them anywhere in the doc.


Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
   echo $PATH;
   unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
.


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-15 Thread Jon Bathmaker

Hi Ed,

Thanks for this!  How *did* you find out about the semicolons, I didn't 
see them anywhere in the doc.


Best regards,
*Jon Bathmaker,*
SYS1 Consulting Inc.
519-577-9661



On 5/15/2020 12:19 AM, Ed Jaffe wrote:

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
   echo $PATH;
   unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-14 Thread Ed Jaffe

On 5/14/2020 5:23 PM, Jon Bathmaker wrote:

//STDPARM DD *
SH su
SH echo $PATH
SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS



The above looks wrong to me. I always do it this way:


//STDPARM  DD *
SH su;
   echo $PATH;
   unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS


--
Phoenix Software International
Edward E. Jaffe
831 Parkview Drive North
El Segundo, CA 90245
https://www.phoenixsoftware.com/



This e-mail message, including any attachments, appended messages and the
information contained therein, is for the sole use of the intended
recipient(s). If you are not an intended recipient or have otherwise
received this email message in error, any use, dissemination, distribution,
review, storage or copying of this e-mail message and the information
contained therein is strictly prohibited. If you are not an intended
recipient, please contact the sender by reply e-mail and destroy all copies
of this email message and do not otherwise utilize or retain this email
message or any or all of the information contained therein. Although this
email message and any attachments or appended messages are believed to be
free of any virus or other defect that might affect any computer system into
which it is received and opened, it is the responsibility of the recipient
to ensure that it is virus free and no responsibility is accepted by the
sender for any loss or damage arising in any way from its opening or use.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-14 Thread Paul Gilmartin
On Thu, 14 May 2020 22:21:27 -0400, Tom Conley wrote:
>
>Try setting up sudo to do the command all at once. "sudo unmount.".
>Using su requires a password that you would not want in the clear.
> 
That setup might be in /etc/sudoers or in a RACF BPX.SUPERUSER
privilege class.
   
https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.bpxb200/sprclass.htm

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-14 Thread Tom Conley

On 5/14/2020 8:23 PM, Jon Bathmaker wrote:

Hi,

Because of auditor demands we are no longer able to run TSO USS commands 
that require UID=0,  so I attempting figure out how to run  USS commands 
in under BPXBATCH.  The following is a job to debug the unmount command 
in batch but I have been unsuccessful so far.   I am hoping that I am 
doing something wrong and that one of you can point out my error.


Here is the JCL:

//BATBPX  EXEC PGM=BPXBATCH

//STEPLIB  DD DISP=SHR,DSN=SYS1.CEE.SCEERUN

//STDERR   DD SYSOUT=*

//STDOUT   DD SYSOUT=*

//STDPARM  DD *

SH su

SH echo $PATH

SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS

Here is the contents of STDERR when the job runs.

FSUM5023 su: User ID "SH" does not exist, or the RACF profile does not 
contain an OMVS segment.



Thanks.

Best regards,

Jon Bathmaker

z/OS Systems Programmer



Hey John,

Try setting up sudo to do the command all at once. "sudo unmount.". 
Using su requires a password that you would not want in the clear.


Regards,
Tom Conley

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-14 Thread Paul Gilmartin
On Thu, 14 May 2020 20:23:20 -0400, Jon Bathmaker wrote:
>
>
>//STDERR�� DD SYSOUT=*
>
>//STDOUT� �DD SYSOUT=*
>
>//STDPARM� DD *
>
>SH su
>
>SH echo $PATH
>
>SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS
>
>Here is the contents of STDERR when the job runs.
>
>FSUM5023 su: User ID "SH" does not exist, or the RACF profile does not
>contain an OMVS segment.
>
Why do your auditors prohibit UID 0 from TSO but allow
it otherwise?

I'll recommend BPXWUNIX as a superior alternative.  And
SYSIN for bpxwunix can then be an instream data set.

I haven't the stamina to compose all the RCFs the description of STDPARM
in the Command Ref. deserves.  A couple examples:

If a MVS data set is specified:
• Specify one argument per line. 

What's an "argument"
 
Should PGM or SH be specified on only the first line,
or on every line?  If the latter, is a mixture of PGM
and SH supported?

• Trailing blanks are truncated for SYSIN and variable block data sets,
  but not for fixed block data sets. For a fixed block data set,
  trailing blanks will be included in the parameter text for a given
  argument up to the end of the record.

WTF!?  It makes sense to truncate for fixed, where the
programmer can't control trailing blanks.  For variable,
the programmer has control and trailing blanks should be
preserved.

-- gil

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: USS: su: User ID "SH" does not exist

2020-05-14 Thread Seymour J Metz
Who  is "we", exactly what were the auditors' demands and did you discuss the 
issues with your management?

What you have in stdparm is not a long parameter but a sequence of parameters. 
Is that legal, or will BPXBATCH take all of the input after the initial sh as 
one long command?


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3



From: IBM Mainframe Discussion List  on behalf of Jon 
Bathmaker 
Sent: Thursday, May 14, 2020 8:23 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: USS: su: User ID "SH" does not exist

Hi,

Because of auditor demands we are no longer able to run TSO USS commands
that require UID=0,  so I attempting figure out how to run  USS commands
in under BPXBATCH.  The following is a job to debug the unmount command
in batch but I have been unsuccessful so far.   I am hoping that I am
doing something wrong and that one of you can point out my error.

Here is the JCL:

//BATBPX  EXEC PGM=BPXBATCH

//STEPLIB  DD DISP=SHR,DSN=SYS1.CEE.SCEERUN

//STDERR   DD SYSOUT=*

//STDOUT   DD SYSOUT=*

//STDPARM  DD *

SH su

SH echo $PATH

SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS

Here is the contents of STDERR when the job runs.

FSUM5023 su: User ID "SH" does not exist, or the RACF profile does not
contain an OMVS segment.


Thanks.

Best regards,

Jon Bathmaker

z/OS Systems Programmer


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN


USS: su: User ID "SH" does not exist

2020-05-14 Thread Jon Bathmaker

Hi,

Because of auditor demands we are no longer able to run TSO USS commands 
that require UID=0,  so I attempting figure out how to run  USS commands 
in under BPXBATCH.  The following is a job to debug the unmount command 
in batch but I have been unsuccessful so far.   I am hoping that I am 
doing something wrong and that one of you can point out my error.


Here is the JCL:

//BATBPX  EXEC PGM=BPXBATCH

//STEPLIB  DD DISP=SHR,DSN=SYS1.CEE.SCEERUN

//STDERR   DD SYSOUT=*

//STDOUT   DD SYSOUT=*

//STDPARM  DD *

SH su

SH echo $PATH

SH unmount -fv ZOS240.SYS1.OMVS.SYSRES.OS240971.FNT.ZFS

Here is the contents of STDERR when the job runs.

FSUM5023 su: User ID "SH" does not exist, or the RACF profile does not 
contain an OMVS segment.



Thanks.

Best regards,

Jon Bathmaker

z/OS Systems Programmer


--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN