Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Seymour J Metz
I would try displaying both in hex. Is it possible that one has a space where 
the other has an HT?


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Tom 
Longfellow [03e29b607131-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, August 17, 2023 11:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Strange results for the PS1 prompt with z/OS Unix

I am confused and am throwing out a Hail Mary for help.   Here is the situation.
Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile   has a PS1 of
export PS1="[\\u@\\H \\W \\@]\\$ "

On system 2 - the /etc/profile  has a PS1 of
   export PS1="[\\u@\\H \\W \\@]\\$ "

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
   [TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
  [\u@\H \W \@]$
-=-=-=-=
I am using the same SHELL program in my environment.  (/usr/bin/bash)

Anybody have any ideas why the two different LPARs are reading the same string 
but interpreting it in two different ways?
My suspect is some dark secret settings in the Unix file system.   Total Guess

--
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: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Mark Zelden
Agree with Shmuel.  I assume the same emulator profile is used for both? 
If you are working with z/OS Unix for sure you want 1047.  If using Vista 
TN3270 it
identifies that as "US C Programming".  Maybe you aren't seeing a "`" correctly 
(backtick).


Regards,

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
ITIL v3 Foundation Certified
mailto:m...@mzelden.com
Mark's MVS Utilities: http://www.mzelden.com/mvsutil.html




On Thu, 17 Aug 2023 15:40:28 +, Seymour J Metz  wrote:

>I would try displaying both in hex. Is it possible that one has a space where 
>the other has an HT?
>
>
>--
>Shmuel (Seymour J.) Metz
>http://mason.gmu.edu/~smetz3
>
>
>From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>Tom Longfellow [03e29b607131-dmarc-requ...@listserv.ua.edu]
>Sent: Thursday, August 17, 2023 11:31 AM
>To: IBM-MAIN@LISTSERV.UA.EDU
>Subject: Strange results for the PS1 prompt with z/OS Unix
>
>I am confused and am throwing out a Hail Mary for help.   Here is the 
>situation.
>Two cloned LPARs.  (same sysres and unix root file systems)
>
>On system 1 - the /etc/profile   has a PS1 of
>export PS1="[\\u@\\H \\W \\@]\\$ "
>
>On system 2 - the /etc/profile  has a PS1 of
>   export PS1="[\\u@\\H \\W \\@]\\$ "
>
>Why YES they do look the same... at least they do to me.
>-=-=-=
>The results however are very different.
>
>On system one the displayed PS1 is
>   [TECH905@jismvs_test ~ 11:26 AM]$
>
>On system two the displayed PS1 is
>  [\u@\H \W \@]$
>-=-=-=-=
>I am using the same SHELL program in my environment.  (/usr/bin/bash)
>
>Anybody have any ideas why the two different LPARs are reading the same string 
>but interpreting it in two different ways?
>My suspect is some dark secret settings in the Unix file system.   Total Guess
>
>--
>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: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Matt Hogstrom
Is this sh, bash, … ?

Is the TERM environment variable the same on both systems ?

Matt Hogstrom
PGP key 0F143BC1

> On Aug 17, 2023, at 11:31, Tom Longfellow 
> <03e29b607131-dmarc-requ...@listserv.ua.edu> wrote:
> 
> I am confused and am throwing out a Hail Mary for help.   Here is the 
> situation.
> Two cloned LPARs.  (same sysres and unix root file systems)

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Seymour J Metz
He might also try diff. Both the code page issue for [ ] and the visual 
similarity of ` to ' seem plausible culprits.

I've had similar issues on the PC side with AA versus AC for ¬.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Mark Zelden [m...@mzelden.com]
Sent: Thursday, August 17, 2023 12:11 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

Agree with Shmuel.  I assume the same emulator profile is used for both?
If you are working with z/OS Unix for sure you want 1047.  If using Vista 
TN3270 it
identifies that as "US C Programming".  Maybe you aren't seeing a "`" correctly 
(backtick).


Regards,

Mark
--
Mark Zelden - Zelden Consulting Services - z/OS, OS/390 and MVS
ITIL v3 Foundation Certified
mailto:m...@mzelden.com
Mark's MVS Utilities: 
http://secure-web.cisco.com/1wGRmPm9OrQwrmCaqJr6aJ_340Li_b4CjojZM6P8Usrij6Qp7ya-_Zav54oQt4dz-H4vL2j7pVfemGH3ck94qqiu63hiWIf2W6i2JkbxPkcECgsEXpQ5P_NL-SFJJMfk0NaUjB1qIcmIn_VjKkbblkytICnw8o_hVOVZ0SU7MdeSgUUxac5IeiuUCQ9CeLHVDaYzw0x2x48yBoDWa_RQQ64wf6kw53UF84ctS1EjRdB7ma5KoQk8SjPihLeySd1tyWbOFJICyugk3_Uzqzl90uofzJ7xDkeyAcKBCpUKIz5yu5BJa7j1NUQI0g_aiorvShNU6LY4aS_il-t3MZyGGuzq3iIi2uLS1rx6-DVZ132GqQCqAlLhUvnlAOp-nXT3cKI00kKqJxbGrv9hFxuKkVrgVooCJseXHZCe-EasGAvh6QbLWRky9QLYv-utfiC9T/http%3A%2F%2Fwww.mzelden.com%2Fmvsutil.html




On Thu, 17 Aug 2023 15:40:28 +, Seymour J Metz  wrote:

>I would try displaying both in hex. Is it possible that one has a space where 
>the other has an HT?
>
>
>--
>Shmuel (Seymour J.) Metz
>http://mason.gmu.edu/~smetz3
>
>
>From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
>Tom Longfellow [03e29b607131-dmarc-requ...@listserv.ua.edu]
>Sent: Thursday, August 17, 2023 11:31 AM
>To: IBM-MAIN@LISTSERV.UA.EDU
>Subject: Strange results for the PS1 prompt with z/OS Unix
>
>I am confused and am throwing out a Hail Mary for help.   Here is the 
>situation.
>Two cloned LPARs.  (same sysres and unix root file systems)
>
>On system 1 - the /etc/profile   has a PS1 of
>export PS1="[\\u@\\H \\W \\@]\\$ "
>
>On system 2 - the /etc/profile  has a PS1 of
>   export PS1="[\\u@\\H \\W \\@]\\$ "
>
>Why YES they do look the same... at least they do to me.
>-=-=-=
>The results however are very different.
>
>On system one the displayed PS1 is
>   [TECH905@jismvs_test ~ 11:26 AM]$
>
>On system two the displayed PS1 is
>  [\u@\H \W \@]$
>-=-=-=-=
>I am using the same SHELL program in my environment.  (/usr/bin/bash)
>
>Anybody have any ideas why the two different LPARs are reading the same string 
>but interpreting it in two different ways?
>My suspect is some dark secret settings in the Unix file system.   Total Guess
>
>--
>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: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Rick Troth

On 8/17/23 11:31, Tom Longfellow wrote:

I am confused and am throwing out a Hail Mary for help.   Here is the situation.
Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile   has a PS1 of
 export PS1="[\\u@\\H \\W \\@]\\$ "

On system 2 - the /etc/profile  has a PS1 of
export PS1="[\\u@\\H \\W \\@]\\$ "

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
[TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
   [\u@\H \W \@]$
-=-=-=-=
I am using the same SHELL program in my environment.  (/usr/bin/bash)

Anybody have any ideas why the two different LPARs are reading the same string 
but interpreting it in two different ways?
My suspect is some dark secret settings in the Unix file system.   Total Guess



Good comments in other responses, in particular: code page concerns 
(square brackets, back-tick, stuff like that).


I've struggled to get things to play right with the Unix standard. 
/etc/profile should be sourced at login, but is not always. Also, people 
lately have turned to "RC scripts" (like ~.bashrc). Avoid these for 
PROFILING. Long story.


Some suggestions, things to check:

 * confirm that both systems are giving you BASH (because the PS1
   you're showing is an extension from original Bourne)
 * confirm that BASH is at the same level
 * confirm that /etc/profile is getting sourced *and* that something
   else is not changing things after the fact
 * look for ~.profile (which is supposed to take effect *after*
   /etc/profile, giving you final control)
 * avoid ~.bashrc and other RC scripts (in the near term, until you've
   fixed this)
 * check your code pages, including file tagging


I hope this helps.


-- R; <><




--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@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: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Tom Longfellow
Thanks for all the ideas so far.Here are some answers to the posed 
questions.

The same emulator is used for both systems.   That emulator is connected to a 
session switcher on system 2. System 1 is accessed via standard 
APPN/SNA/VTAM routing.  (only one emulator is involved.)

The value of TERM is xterm.(I have no idea why)

The PS1 setting string is being Cut from Session 1 and then Pasted to Session 2 
(under the same  emulator and session switcher (netmaster) session.

the SHELL is /usr/bin/bash


Examining the hex I am not seeing any problems with those brackets.   They both
-=-=
On system 1 I see
 export PS1="[\\u@\\H \\W \\@]\\$ " 
48A999A4DEF77AEEA7EEC4EEE4EE7BEE5474
05776930721EFD004C0080006000CD00B0F0

-=-=
On system 2
 export PS1="[\\u@\\H \\W \\@]\\$ " 
48A999A4DEF77AEEA7EEC4EEE4EE7BEE5474
05776930721EFD004C0080006000CD00B0F0

Could the problem be in character set interpretation performed during the ISPF 
edit process on zFS files?   how is character set selected for unix files?

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Rick Troth

On 8/17/23 12:42, Tom Longfellow wrote:

The value of TERM is xterm.(I have no idea why)



"xterm" has become generic for ANSI X3.64 capable terminals and terminal 
emulators.
Once upon a time "vt100" filled that role, but "xterm" implies more 
capability.


https://en.wikipedia.org/wiki/ANSI_escape_code


-- R; <><

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Paul Gilmartin
On Thu, 17 Aug 2023 11:42:28 -0500, Tom Longfellow wrote:
>...
>The PS1 setting string is being Cut from Session 1 and then Pasted to Session 
>2 (under the same  emulator and session switcher (netmaster) session.
>
I'd distrust screen copy/paste for anything with metacharacters.
Especially with a 3270.

Is this in your ~/.profile?  Is it  supposed to be identical on both systems?
Then  I'd suggest on system2:
make a  backup copy of .profile
ssh -f system1 'cat .profile' | tee .profile
On both systems, compare the results of:
cksum .profile.

Even better, shared zFS or NFS.

-- 
gil

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Matt Hogstrom
Did you modify the TERMINFO ?I ended up creating one with xterm which is 
not standard

Matt Hogstrom
+1 (919) 656-0564

> On Aug 17, 2023, at 13:40, Paul Gilmartin 
> <042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:
> 
> On Thu, 17 Aug 2023 11:42:28 -0500, Tom Longfellow wrote:
>>   ...
>> The PS1 setting string is being Cut from Session 1 and then Pasted to 
>> Session 2 (under the same  emulator and session switcher (netmaster) session.
>> 
> I'd distrust screen copy/paste for anything with metacharacters.
> Especially with a 3270.
> 
> Is this in your ~/.profile?  Is it  supposed to be identical on both systems?
> Then  I'd suggest on system2:
>make a  backup copy of .profile
>ssh -f system1 'cat .profile' | tee .profile
> On both systems, compare the results of:
>cksum .profile.
> 
> Even better, shared zFS or NFS.
> 
> -- 
> 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: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Tom Longfellow
I have not done any play with TERMINFO

Don't know how.

Don't even know where it is stored.

I think I 'might' have had to do some kind of TERMINFO thing in the ancient 
past before z/OS standardized them and made it no longer necessary to create 
/tty directories and the like.

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Pew, Curtis G
I think I had a problem like this once, but I don’t remember how I fixed it.

However, this StackOverflow question might give you some things to try:

https://stackoverflow.com/questions/8261602/how-can-i-debug-the-bash-prompt



On Aug 17, 2023, at 1:39 PM, Tom Longfellow 
<03e29b607131-dmarc-requ...@listserv.ua.edu> wrote:

I have not done any play with TERMINFO

Don't know how.

Don't even know where it is stored.

--
Curtis Pew
ITS Campus Solutions
curtis@austin.utexas.edu




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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Paul Gilmartin
On Thu, 17 Aug 2023 13:39:54 -0500, Tom Longfellow wrote:

>I have not done any play with TERMINFO
>
>Don't know how.
>
>Don't even know where it is stored.
>



... at one time I used it to add  a clear screen command for 3270 OMVS.

-- 
gil

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Bob Bridges
Not QUITE the same.  Your first example starts in position 4; the second in 
position 3.

(Heh, heh, I just slay myself.)

---
Bob Bridges, robhbrid...@gmail.com, cell 336 382-7313

/* Anyone can do any amount of work, provided it isn't the work he is supposed 
be doing at that moment.  -Robert Benchley */

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Tom 
Longfellow
Sent: Thursday, August 17, 2023 11:32

I am confused and am throwing out a Hail Mary for help.   Here is the situation.
Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile   has a PS1 of
export PS1="[\\u@\\H \\W \\@]\\$ "  

On system 2 - the /etc/profile  has a PS1 of 
   export PS1="[\\u@\\H \\W \\@]\\$ "   

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Paul Gilmartin
On Thu, 17 Aug 2023 16:16:46 -0400, Bob Bridges  wrote:

>Not QUITE the same.  Your first example starts in position 4; the second in 
>position 3.
>
>(Heh, heh, I just slay myself.)
>
That's not frivolous.  It's valuable to verify similarity of profiles by such as
on system2:
ssh -f system1 "cat .profile" | diff -s /dev/fd/0 .profile

... reconcile any unintended differences and repeat.

-- 
gil

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Jon Perryman
 For system 2, try changing \\ to \. My guess is that on system 2, it's being 
used as an escape character.
On Thursday, August 17, 2023 at 08:31:43 AM PDT, Tom Longfellow 
<03e29b607131-dmarc-requ...@listserv.ua.edu> wrote:  
 
 I am confused and am throwing out a Hail Mary for help.  Here is the situation.
Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile  has a PS1 of
    export PS1="[\\u@\\H \\W \\@]\\$ "  

On system 2 - the /etc/profile  has a PS1 of 
  export PS1="[\\u@\\H \\W \\@]\\$ "  

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
  [TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
  [\u@\H \W \@]$ 
-=-=-=-=
I am using the same SHELL program in my environment.  (/usr/bin/bash)

Anybody have any ideas why the two different LPARs are reading the same string 
but interpreting it in two different ways?
My suspect is some dark secret settings in the Unix file system.  Total Guess

--
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: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread David Crayford
What version of bash are you using? Rocket software's port or IBM z/OS 
Open Tools?


Irrespective, bash is an enhanced ASCII application so make sure you 
have the following environment variables set in your profile login 
scripts by entering "env | sort" from the shell command line.


_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
_TAG_REDIR_ERR=txt
_TAG_REDIR_IN=txt
_TAG_REDIR_OUT=txt

Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so 
bye, bye bash.


I've being using zsh for years and it turbo charges the shell. For 
example, there are open source themes such as oh-my-zsh and 
powerline10k. The powerline customizes PS1 with fancy glyphs. The 
current Git branch, commits and other information is shown. It's next 
level to the dull one your using :). Also, there is zsh-autosuggestions 
which recalls previous commands for auto completion. oh-my-zsh also 
provides a plugin for git command completion and other super cool 
command completions that make using the shell as easy as an IDE.


https://github.com/ohmyzsh/ohmyzsh/tree/master
https://github.com/romkatv/powerlevel10k
https://github.com/zsh-users/zsh-autosuggestions

To enable the cool glyphs you will need to install Nerd fonts and 
configure your terminal emulator. If you're a Windows user and using 
PuTTY I recommend switching to Windows Terminial (preferably with WSL2) 
which has tabs, tiled windows and is just miles better. If you're on a 
Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator 
you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"


In the meantime, there is a port of powerline-go as part of the Z/OS 
Open Tools project. If you have downloaded the installer you can install 
it simply by running "zopen install powerlinegoport".


https://github.com/justjanne/powerline-go   # instructions how to 
configure it with bash


*Z Shell (Zsh) on z/OS*

The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made 
available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as 
an interactive login shell and as a shell script command processor. It 
has command-line editing, built-in spelling correction, programmable 
command completion, shell functions (with autoloading), a history 
mechanism, and a host of other features. With the extensibility, rich 
customization, and advanced features, Zsh provides a modern and powerful 
shell on z/OS. It is designed to accelerate users' daily work and have 
consistent behavior with other open platforms.


On 17/8/2023 11:31 pm, Tom Longfellow wrote:

I am confused and am throwing out a Hail Mary for help.   Here is the situation.
Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile   has a PS1 of
 export PS1="[\\u@\\H \\W \\@]\\$ "

On system 2 - the /etc/profile  has a PS1 of
export PS1="[\\u@\\H \\W \\@]\\$ "

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
[TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
   [\u@\H \W \@]$
-=-=-=-=
I am using the same SHELL program in my environment.  (/usr/bin/bash)

Anybody have any ideas why the two different LPARs are reading the same string 
but interpreting it in two different ways?
My suspect is some dark secret settings in the Unix file system.   Total Guess

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@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: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Seymour J Metz
While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, I 
don't see it killing bash, due to compatibility.


--
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, August 18, 2023 5:38 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

What version of bash are you using? Rocket software's port or IBM z/OS
Open Tools?

Irrespective, bash is an enhanced ASCII application so make sure you
have the following environment variables set in your profile login
scripts by entering "env | sort" from the shell command line.

_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
_TAG_REDIR_ERR=txt
_TAG_REDIR_IN=txt
_TAG_REDIR_OUT=txt

Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
bye, bye bash.

I've being using zsh for years and it turbo charges the shell. For
example, there are open source themes such as oh-my-zsh and
powerline10k. The powerline customizes PS1 with fancy glyphs. The
current Git branch, commits and other information is shown. It's next
level to the dull one your using :). Also, there is zsh-autosuggestions
which recalls previous commands for auto completion. oh-my-zsh also
provides a plugin for git command completion and other super cool
command completions that make using the shell as easy as an IDE.

https://github.com/ohmyzsh/ohmyzsh/tree/master
https://github.com/romkatv/powerlevel10k
https://github.com/zsh-users/zsh-autosuggestions

To enable the cool glyphs you will need to install Nerd fonts and
configure your terminal emulator. If you're a Windows user and using
PuTTY I recommend switching to Windows Terminial (preferably with WSL2)
which has tabs, tiled windows and is just miles better. If you're on a
Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator
you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"

In the meantime, there is a port of powerline-go as part of the Z/OS
Open Tools project. If you have downloaded the installer you can install
it simply by running "zopen install powerlinegoport".

https://github.com/justjanne/powerline-go   # instructions how to
configure it with bash

*Z Shell (Zsh) on z/OS*

The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made
available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as
an interactive login shell and as a shell script command processor. It
has command-line editing, built-in spelling correction, programmable
command completion, shell functions (with autoloading), a history
mechanism, and a host of other features. With the extensibility, rich
customization, and advanced features, Zsh provides a modern and powerful
shell on z/OS. It is designed to accelerate users' daily work and have
consistent behavior with other open platforms.

On 17/8/2023 11:31 pm, Tom Longfellow wrote:
> I am confused and am throwing out a Hail Mary for help.   Here is the 
> situation.
> Two cloned LPARs.  (same sysres and unix root file systems)
>
> On system 1 - the /etc/profile   has a PS1 of
>  export PS1="[\\u@\\H \\W \\@]\\$ "
>
> On system 2 - the /etc/profile  has a PS1 of
> export PS1="[\\u@\\H \\W \\@]\\$ "
>
> Why YES they do look the same... at least they do to me.
> -=-=-=
> The results however are very different.
>
> On system one the displayed PS1 is
> [TECH905@jismvs_test ~ 11:26 AM]$
>
> On system two the displayed PS1 is
>[\u@\H \W \@]$
> -=-=-=-=
> I am using the same SHELL program in my environment.  (/usr/bin/bash)
>
> Anybody have any ideas why the two different LPARs are reading the same 
> string but interpreting it in two different ways?
> My suspect is some dark secret settings in the Unix file system.   Total Guess
>
> --
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email tolists...@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: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread David Crayford

On 18/8/2023 7:07 pm, Seymour J Metz wrote:

While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, I 
don't see it killing bash, due to compatibility.


I'm feeling a bit puzzled here! Bash doesn't come pre-installed with 
z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any 
compatibility problems, right? If IBM decides to include zsh, which is 
considered superior to bash, this could be a game-changer.


Once IBM introduced their Python SDK for z/OS, Rocket's Python started 
struggling and eventually became obsolete.


It's perfectly fine to skip commenting on every discussion, especially 
when it's not within your field of expertise.





--
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, August 18, 2023 5:38 AM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

What version of bash are you using? Rocket software's port or IBM z/OS
Open Tools?

Irrespective, bash is an enhanced ASCII application so make sure you
have the following environment variables set in your profile login
scripts by entering "env | sort" from the shell command line.

_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
_TAG_REDIR_ERR=txt
_TAG_REDIR_IN=txt
_TAG_REDIR_OUT=txt

Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
bye, bye bash.

I've being using zsh for years and it turbo charges the shell. For
example, there are open source themes such as oh-my-zsh and
powerline10k. The powerline customizes PS1 with fancy glyphs. The
current Git branch, commits and other information is shown. It's next
level to the dull one your using :). Also, there is zsh-autosuggestions
which recalls previous commands for auto completion. oh-my-zsh also
provides a plugin for git command completion and other super cool
command completions that make using the shell as easy as an IDE.

https://github.com/ohmyzsh/ohmyzsh/tree/master
https://github.com/romkatv/powerlevel10k
https://github.com/zsh-users/zsh-autosuggestions

To enable the cool glyphs you will need to install Nerd fonts and
configure your terminal emulator. If you're a Windows user and using
PuTTY I recommend switching to Windows Terminial (preferably with WSL2)
which has tabs, tiled windows and is just miles better. If you're on a
Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator
you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"

In the meantime, there is a port of powerline-go as part of the Z/OS
Open Tools project. If you have downloaded the installer you can install
it simply by running "zopen install powerlinegoport".

https://github.com/justjanne/powerline-go# instructions how to
configure it with bash

*Z Shell (Zsh) on z/OS*

The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made
available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as
an interactive login shell and as a shell script command processor. It
has command-line editing, built-in spelling correction, programmable
command completion, shell functions (with autoloading), a history
mechanism, and a host of other features. With the extensibility, rich
customization, and advanced features, Zsh provides a modern and powerful
shell on z/OS. It is designed to accelerate users' daily work and have
consistent behavior with other open platforms.

On 17/8/2023 11:31 pm, Tom Longfellow wrote:

I am confused and am throwing out a Hail Mary for help.   Here is the situation.
Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile   has a PS1 of
  export PS1="[\\u@\\H \\W \\@]\\$ "

On system 2 - the /etc/profile  has a PS1 of
 export PS1="[\\u@\\H \\W \\@]\\$ "

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
 [TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
[\u@\H \W \@]$
-=-=-=-=
I am using the same SHELL program in my environment.  (/usr/bin/bash)

Anybody have any ideas why the two different LPARs are reading the same string 
but interpreting it in two different ways?
My suspect is some dark secret settings in the Unix file system.   Total Guess

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

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread kekronbekron
Does it say in any 3.1 note that zsh is going to be included?
zsh port doesn't (publicly) exist yet.

Might want to check the zopen install command for powerline.


--- Original Message ---
On Friday, August 18th, 2023 at 17:03, David Crayford  
wrote:


> On 18/8/2023 7:07 pm, Seymour J Metz wrote:
> 
> > While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, 
> > I don't see it killing bash, due to compatibility.
> 
> 
> I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
> z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
> compatibility problems, right? If IBM decides to include zsh, which is
> considered superior to bash, this could be a game-changer.
> 
> Once IBM introduced their Python SDK for z/OS, Rocket's Python started
> struggling and eventually became obsolete.
> 
> It's perfectly fine to skip commenting on every discussion, especially
> when it's not within your field of expertise.
> 
> > --
> > 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, August 18, 2023 5:38 AM
> > To:IBM-MAIN@LISTSERV.UA.EDU
> > Subject: Re: Strange results for the PS1 prompt with z/OS Unix
> > 
> > What version of bash are you using? Rocket software's port or IBM z/OS
> > Open Tools?
> > 
> > Irrespective, bash is an enhanced ASCII application so make sure you
> > have the following environment variables set in your profile login
> > scripts by entering "env | sort" from the shell command line.
> > 
> > _BPXK_AUTOCVT=ON
> > _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
> > _TAG_REDIR_ERR=txt
> > _TAG_REDIR_IN=txt
> > _TAG_REDIR_OUT=txt
> > 
> > Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
> > bye, bye bash.
> > 
> > I've being using zsh for years and it turbo charges the shell. For
> > example, there are open source themes such as oh-my-zsh and
> > powerline10k. The powerline customizes PS1 with fancy glyphs. The
> > current Git branch, commits and other information is shown. It's next
> > level to the dull one your using :). Also, there is zsh-autosuggestions
> > which recalls previous commands for auto completion. oh-my-zsh also
> > provides a plugin for git command completion and other super cool
> > command completions that make using the shell as easy as an IDE.
> > 
> > https://github.com/ohmyzsh/ohmyzsh/tree/master
> > https://github.com/romkatv/powerlevel10k
> > https://github.com/zsh-users/zsh-autosuggestions
> > 
> > To enable the cool glyphs you will need to install Nerd fonts and
> > configure your terminal emulator. If you're a Windows user and using
> > PuTTY I recommend switching to Windows Terminial (preferably with WSL2)
> > which has tabs, tiled windows and is just miles better. If you're on a
> > Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator
> > you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"
> > 
> > In the meantime, there is a port of powerline-go as part of the Z/OS
> > Open Tools project. If you have downloaded the installer you can install
> > it simply by running "zopen install powerlinegoport".
> > 
> > https://github.com/justjanne/powerline-go # instructions how to
> > configure it with bash
> > 
> > Z Shell (Zsh) on z/OS
> > 
> > The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made
> > available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as
> > an interactive login shell and as a shell script command processor. It
> > has command-line editing, built-in spelling correction, programmable
> > command completion, shell functions (with autoloading), a history
> > mechanism, and a host of other features. With the extensibility, rich
> > customization, and advanced features, Zsh provides a modern and powerful
> > shell on z/OS. It is designed to accelerate users' daily work and have
> > consistent behavior with other open platforms.
> > 
> > On 17/8/2023 11:31 pm, Tom Longfellow wrote:
> > 
> > > I am confused and am throwing out a Hail Mary for help. Here is the 
> > > situation.
> > > Two cloned LPARs. (same sysres and unix root file systems)
> > > 
> > > On system 1 - the /etc/

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Seymour J Metz
> I'm feeling a bit puzzled here!

Then ask instead of attributing to me things that I didn't write.

> Bash doesn't come pre-installed with z/OS;

True but irrelevant. Now, were Rocket to stop supporting it, *that* would be 
relevant.

> so there shouldn't be any compatibility problems, right?

WTF? How does the fact that it's 3rd party suddenly make bash and zsh 
compatible?

> If IBM decides to include zsh, which is
> considered superior to bash, this could be a game-changer.

Only for new scripts.

> Once IBM introduced their Python SDK for z/OS, Rocket's Python started
> struggling and eventually became obsolete.

True but irrelevant; those were two implementations of the same language, while 
bash and zsh are different languages.

> It's perfectly fine to skip commenting on every discussion,

It's perfectly fine to comment on what people actually write; it's not so fine 
to comment on what only exists in your head.


--
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, August 18, 2023 7:33 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

On 18/8/2023 7:07 pm, Seymour J Metz wrote:
> While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, I 
> don't see it killing bash, due to compatibility.

I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
compatibility problems, right? If IBM decides to include zsh, which is
considered superior to bash, this could be a game-changer.

Once IBM introduced their Python SDK for z/OS, Rocket's Python started
struggling and eventually became obsolete.

It's perfectly fine to skip commenting on every discussion, especially
when it's not within your field of expertise.

>
>
> --
> 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, August 18, 2023 5:38 AM
> To:IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Strange results for the PS1 prompt with z/OS Unix
>
> What version of bash are you using? Rocket software's port or IBM z/OS
> Open Tools?
>
> Irrespective, bash is an enhanced ASCII application so make sure you
> have the following environment variables set in your profile login
> scripts by entering "env | sort" from the shell command line.
>
> _BPXK_AUTOCVT=ON
> _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
> _TAG_REDIR_ERR=txt
> _TAG_REDIR_IN=txt
> _TAG_REDIR_OUT=txt
>
> Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
> bye, bye bash.
>
> I've being using zsh for years and it turbo charges the shell. For
> example, there are open source themes such as oh-my-zsh and
> powerline10k. The powerline customizes PS1 with fancy glyphs. The
> current Git branch, commits and other information is shown. It's next
> level to the dull one your using :). Also, there is zsh-autosuggestions
> which recalls previous commands for auto completion. oh-my-zsh also
> provides a plugin for git command completion and other super cool
> command completions that make using the shell as easy as an IDE.
>
> https://github.com/ohmyzsh/ohmyzsh/tree/master
> https://github.com/romkatv/powerlevel10k
> https://github.com/zsh-users/zsh-autosuggestions
>
> To enable the cool glyphs you will need to install Nerd fonts and
> configure your terminal emulator. If you're a Windows user and using
> PuTTY I recommend switching to Windows Terminial (preferably with WSL2)
> which has tabs, tiled windows and is just miles better. If you're on a
> Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator
> you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"
>
> In the meantime, there is a port of powerline-go as part of the Z/OS
> Open Tools project. If you have downloaded the installer you can install
> it simply by running "zopen install powerlinegoport".
>
> https://github.com/justjanne/powerline-go# instructions how to
> configure it with bash
>
> *Z Shell (Zsh) on z/OS*
>
> The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made
> available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as
> an interactive login shell and as a shell script command processor. It
> has command-line editing, built-in spelling correction, programmable
> c

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread David Crayford

On 18/8/2023 8:01 pm, kekronbekron wrote:

Does it say in any 3.1 note that zsh is going to be included?
zsh port doesn't (publicly) exist yet.


It's in the z/OS 3.1 announcement letter that was posted here last week



Might want to check the zopen install command for powerline.


I recommend installing the entire suite





--- Original Message ---
On Friday, August 18th, 2023 at 17:03, David Crayford  
wrote:



On 18/8/2023 7:07 pm, Seymour J Metz wrote:


While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, I 
don't see it killing bash, due to compatibility.


I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
compatibility problems, right? If IBM decides to include zsh, which is
considered superior to bash, this could be a game-changer.

Once IBM introduced their Python SDK for z/OS, Rocket's Python started
struggling and eventually became obsolete.

It's perfectly fine to skip commenting on every discussion, especially
when it's not within your field of expertise.


--
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, August 18, 2023 5:38 AM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

What version of bash are you using? Rocket software's port or IBM z/OS
Open Tools?

Irrespective, bash is an enhanced ASCII application so make sure you
have the following environment variables set in your profile login
scripts by entering "env | sort" from the shell command line.

_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
_TAG_REDIR_ERR=txt
_TAG_REDIR_IN=txt
_TAG_REDIR_OUT=txt

Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
bye, bye bash.

I've being using zsh for years and it turbo charges the shell. For
example, there are open source themes such as oh-my-zsh and
powerline10k. The powerline customizes PS1 with fancy glyphs. The
current Git branch, commits and other information is shown. It's next
level to the dull one your using :). Also, there is zsh-autosuggestions
which recalls previous commands for auto completion. oh-my-zsh also
provides a plugin for git command completion and other super cool
command completions that make using the shell as easy as an IDE.

https://github.com/ohmyzsh/ohmyzsh/tree/master
https://github.com/romkatv/powerlevel10k
https://github.com/zsh-users/zsh-autosuggestions

To enable the cool glyphs you will need to install Nerd fonts and
configure your terminal emulator. If you're a Windows user and using
PuTTY I recommend switching to Windows Terminial (preferably with WSL2)
which has tabs, tiled windows and is just miles better. If you're on a
Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator
you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"

In the meantime, there is a port of powerline-go as part of the Z/OS
Open Tools project. If you have downloaded the installer you can install
it simply by running "zopen install powerlinegoport".

https://github.com/justjanne/powerline-go # instructions how to
configure it with bash

Z Shell (Zsh) on z/OS

The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made
available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as
an interactive login shell and as a shell script command processor. It
has command-line editing, built-in spelling correction, programmable
command completion, shell functions (with autoloading), a history
mechanism, and a host of other features. With the extensibility, rich
customization, and advanced features, Zsh provides a modern and powerful
shell on z/OS. It is designed to accelerate users' daily work and have
consistent behavior with other open platforms.

On 17/8/2023 11:31 pm, Tom Longfellow wrote:


I am confused and am throwing out a Hail Mary for help. Here is the situation.
Two cloned LPARs. (same sysres and unix root file systems)

On system 1 - the /etc/profile has a PS1 of
export PS1="[\\u@\\H \\W \\@]\\$ "

On system 2 - the /etc/profile has a PS1 of
export PS1="[\\u@\\H \\W \\@]\\$ "

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
[TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
[\u@\H \W \@]$
-=-=-=-=
I am using the same SHELL program in my environment. (/usr/bin/bash)

Anybody have any ideas why the two different LPARs are reading the same string 
but interpreting it in two different ways?
My suspect is some dark secret settings in the Unix file system. Total Guess

-

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread David Crayford
While maintaining respect, it can be quite exasperating within a 
technical forum to come across a "pseudo-expert" or a "know-it-all." 
It's important to possess a solid grasp of the subject, as otherwise, 
your contributions might just add to the noise. z/OS UNIX might not be 
within your realm of expertise.


Enough said from me on this subject :)

On 18/8/2023 8:31 pm, Seymour J Metz wrote:


I'm feeling a bit puzzled here!

Then ask instead of attributing to me things that I didn't write.


Bash doesn't come pre-installed with z/OS;

True but irrelevant. Now, were Rocket to stop supporting it, *that* would be 
relevant.


so there shouldn't be any compatibility problems, right?

WTF? How does the fact that it's 3rd party suddenly make bash and zsh 
compatible?


If IBM decides to include zsh, which is
considered superior to bash, this could be a game-changer.

Only for new scripts.


Once IBM introduced their Python SDK for z/OS, Rocket's Python started
struggling and eventually became obsolete.

True but irrelevant; those were two implementations of the same language, while 
bash and zsh are different languages.


It's perfectly fine to skip commenting on every discussion,

It's perfectly fine to comment on what people actually write; it's not so fine 
to comment on what only exists in your head.


--
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, August 18, 2023 7:33 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

On 18/8/2023 7:07 pm, Seymour J Metz wrote:

While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, I 
don't see it killing bash, due to compatibility.

I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
compatibility problems, right? If IBM decides to include zsh, which is
considered superior to bash, this could be a game-changer.

Once IBM introduced their Python SDK for z/OS, Rocket's Python started
struggling and eventually became obsolete.

It's perfectly fine to skip commenting on every discussion, especially
when it's not within your field of expertise.



--
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, August 18, 2023 5:38 AM
To:IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

What version of bash are you using? Rocket software's port or IBM z/OS
Open Tools?

Irrespective, bash is an enhanced ASCII application so make sure you
have the following environment variables set in your profile login
scripts by entering "env | sort" from the shell command line.

_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
_TAG_REDIR_ERR=txt
_TAG_REDIR_IN=txt
_TAG_REDIR_OUT=txt

Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
bye, bye bash.

I've being using zsh for years and it turbo charges the shell. For
example, there are open source themes such as oh-my-zsh and
powerline10k. The powerline customizes PS1 with fancy glyphs. The
current Git branch, commits and other information is shown. It's next
level to the dull one your using :). Also, there is zsh-autosuggestions
which recalls previous commands for auto completion. oh-my-zsh also
provides a plugin for git command completion and other super cool
command completions that make using the shell as easy as an IDE.

https://github.com/ohmyzsh/ohmyzsh/tree/master
https://github.com/romkatv/powerlevel10k
https://github.com/zsh-users/zsh-autosuggestions

To enable the cool glyphs you will need to install Nerd fonts and
configure your terminal emulator. If you're a Windows user and using
PuTTY I recommend switching to Windows Terminial (preferably with WSL2)
which has tabs, tiled windows and is just miles better. If you're on a
Mac like me it's easy to configure Termimal, iTerm2 or whatever emulator
you use. Same with Linux desktops. On z/OS "export TERM=xterm-256color"

In the meantime, there is a port of powerline-go as part of the Z/OS
Open Tools project. If you have downloaded the installer you can install
it simply by running "zopen install powerlinegoport".

https://github.com/justjanne/powerline-go# instructions how to
configure it with bash

*Z Shell (Zsh) on z/OS*

The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made
available on z/OS 3.1. Zsh is a UNIX command interpreter that is used as
an interactive login shell and as a shell script command processor

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Rick Troth
ZSH is a powerful shell and serves as an example of the need for clean 
and generic profiling.
I don't use ZSH heavily, but I maintain it in the Chicory collection. 
(see below)


About profiling, I regularly setPS1='\$ ' which for BASH renders a 
prompt as "$" for normal users but as "#" for superuser. It's convenient.

ZSH shows that as "\$" and does not change it when I change UID.

This is *not* a slam on ZSH, just an observation.
In search of better profiling, /etc/zprofile should source /etc/profile 
and then override as needed. (PS1 being a prime example, eh?)

Or ~.zprofile sourcing ~.profile, same logic and rationale.

There are two levels: profiling which should happen when you sign on 
(once) and "resource config" which gets invoked every time a program 
starts.
RC scripts for shells should look for a sacred "I have been profiled" 
environment variable and source appropriate profiles if it is not set.
But RC scripts should not completely re-profile because they (the RC 
scripts) get sourced every time a shell starts.
RC scripts of interest in this context would be ~.zshrc and ~.bashrc (or 
/etc/zshrc and /etc/bashrc if you're the sysadmin).

Does this make sense?

I started the Chicory collection when I worked in academia because I 
didn't want to be on [name your platform] and not have various tools. 
BASH was one. (I didn't know about ZSH in those days.)
It has grown and gotten honed. Most open source packages build really 
easily. (Not as easy on USS, but that's a whole nutha story.) The 
collection includes *five* shells, currently  ...


 * bash-5.2.15
 * zsh-5.9
 * pdksh-5.2.14
 * dash-0.5.12
 * tcsh-6.24.10


So that's BASH, ZSH, KSH, DASH, and a C-shell variant. (Long story about 
C-shell. Let's just say, you don't wanna.)



-- R; <><


On 8/18/23 05:38, David Crayford wrote:
What version of bash are you using? Rocket software's port or IBM z/OS 
Open Tools?


Irrespective, bash is an enhanced ASCII application so make sure you 
have the following environment variables set in your profile login 
scripts by entering "env | sort" from the shell command line.


_BPXK_AUTOCVT=ON
_CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
_TAG_REDIR_ERR=txt
_TAG_REDIR_IN=txt
_TAG_REDIR_OUT=txt

Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 
so bye, bye bash.


I've being using zsh for years and it turbo charges the shell. For 
example, there are open source themes such as oh-my-zsh and 
powerline10k. The powerline customizes PS1 with fancy glyphs. The 
current Git branch, commits and other information is shown. It's next 
level to the dull one your using :). Also, there is 
zsh-autosuggestions which recalls previous commands for auto 
completion. oh-my-zsh also provides a plugin for git command 
completion and other super cool command completions that make using 
the shell as easy as an IDE.


https://github.com/ohmyzsh/ohmyzsh/tree/master
https://github.com/romkatv/powerlevel10k
https://github.com/zsh-users/zsh-autosuggestions

To enable the cool glyphs you will need to install Nerd fonts and 
configure your terminal emulator. If you're a Windows user and using 
PuTTY I recommend switching to Windows Terminial (preferably with 
WSL2) which has tabs, tiled windows and is just miles better. If 
you're on a Mac like me it's easy to configure Termimal, iTerm2 or 
whatever emulator you use. Same with Linux desktops. On z/OS "export 
TERM=xterm-256color"


In the meantime, there is a port of powerline-go as part of the Z/OS 
Open Tools project. If you have downloaded the installer you can 
install it simply by running "zopen install powerlinegoport".


https://github.com/justjanne/powerline-go   # instructions how to 
configure it with bash


*Z Shell (Zsh) on z/OS*

The Z Shell (Zsh), specifically Zsh 5.8.1, has been ported and made 
available on z/OS 3.1. Zsh is a UNIX command interpreter that is used 
as an interactive login shell and as a shell script command processor. 
It has command-line editing, built-in spelling correction, 
programmable command completion, shell functions (with autoloading), a 
history mechanism, and a host of other features. With the 
extensibility, rich customization, and advanced features, Zsh provides 
a modern and powerful shell on z/OS. It is designed to accelerate 
users' daily work and have consistent behavior with other open platforms.


On 17/8/2023 11:31 pm, Tom Longfellow wrote:
I am confused and am throwing out a Hail Mary for help.   Here is the 
situation.

Two cloned LPARs.  (same sysres and unix root file systems)

On system 1 - the /etc/profile   has a PS1 of
 export PS1="[\\u@\\H \\W \\@]\\$ "

On system 2 - the /etc/profile  has a PS1 of
    export PS1="[\\u@\\H \\W \\@]\\$ "

Why YES they do look the same... at least they do to me.
-=-=-=
The results however are very different.

On system one the displayed PS1 is
    [TECH905@jismvs_test ~ 11:26 AM]$

On system two the displayed PS1 is
   [\u@\H \W \@]$
-=-=

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Grant Taylor

On 8/18/23 8:33 AM, Rick Troth wrote:
About profiling, I regularly setPS1='\$ ' which for BASH renders a 
prompt as "$" for normal users but as "#" for superuser. It's convenient.

ZSH shows that as "\$" and does not change it when I change UID.


Zsh has similar behavior.

Zsh uses different escape sequences for the prompt PS1 et al. than Bash 
does.


Check out the PROMPT EXPANSION of the zshmis (or zshall) manual pages.

Look into %# in the Zsh prompt as it will give you # for root and % for 
non-root.



This is *not* a slam on ZSH, just an observation.


There are many differences between Zsh and Bash.  Prompt (PS1 et al.) is 
just one that surprises a lot of people.


In search of better profiling, /etc/zprofile should source /etc/profile 
and then override as needed. (PS1 being a prime example, eh?)

Or ~.zprofile sourcing ~.profile, same logic and rationale.


I want to agree, but I can't.  I've seen too many differences across too 
many platforms and too many Unix (like) OSs.  Getting consistent 
behavior can become very tricky and you quickly end up away from the 
purity that -- I think -- that you are talking about.


There are two levels: profiling which should happen when you sign on 
(once) and "resource config" which gets invoked every time a program 
starts.


Eh

The water starts to get murky when you start using the same shell for 
both interactive (ostensibly with a TTY) and non-interactive (ostensibly 
without a TTY) use.  E.g. the former is your login shell and the latter 
is a script using the same shell.  Sometimes you want different 
configurations of that shell based on it's use case.


Then you get into even more esoteric things like is your interactive 
shell a login shell or a non-login shell (possibly started from inside 
your login shell).


Aside:  Some people start additional interactive non-login shells from 
their interactive login shell as a way to divide command history or have 
different features for a task at hand.  E.g. in the long process of 
working on something that takes many hours and need a shell briefly to 
fix something / unclog a printer, then start an interactive non-login 
shell, do the maintenance work therein, then exit back to the original 
shell without significantly altering your outer shell's command history. 
 Think something along the lines of an "interrupt" button on copiers.


What ""profile to use when can be complicated.

RC scripts for shells should look for a sacred "I have been profiled" 
environment variable and source appropriate profiles if it is not set.


That's why there are ~/.bash_profile exists and is separate from 
~/.bash_login exists and is separate from ~/.profile exists and is 
separate from ~/.bashrc.


The shell maintainers intention for the different files often gets 
corrupted by distributors who have one file include another file.


I've not had enough coffee to remember which is for what purpose.  But I 
am confident that they are separated on purpose.


But RC scripts should not completely re-profile because they (the RC 
scripts) get sourced every time a shell starts.


Hence ~/.bash_login vs ~/.bashrc.

RC scripts of interest in this context would be ~.zshrc and ~.bashrc (or 
/etc/zshrc and /etc/bashrc if you're the sysadmin).


Zsh has similar separation of files like Bash does.  But mostly* with 
different names.


Many shells in the Bourn shell family; Bourn, Bash, Zsh, will also read 
~/.profile and /etc/profile as a way of being backwards compatible and 
cross shell compatible (for a given value of compatible).


#needMoreCoffee


Does this make sense?

I started the Chicory collection when I worked in academia because I 
didn't want to be on [name your platform] and not have various tools. 
BASH was one. (I didn't know about ZSH in those days.)
It has grown and gotten honed. Most open source packages build really 
easily. (Not as easy on USS, but that's a whole nutha story.) The 
collection includes *five* shells, currently  ...


  * bash-5.2.15
  * zsh-5.9
  * pdksh-5.2.14
  * dash-0.5.12
  * tcsh-6.24.10


So that's BASH, ZSH, KSH, DASH, and a C-shell variant. (Long story about 
C-shell. Let's just say, you don't wanna.)


I assume that you're using Public Domain Korn Shell because Korn Shell 
proper source code / license wasn't available when you started that 
list.  I learned a few years ago that Korn Shell proper is now available.




--
Grant. . . .

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Seymour J Metz
I would consider a person who claims to know what another knows, absent 
evidence, to be in that category. Ad hominem arguments have no place here.


--
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, August 18, 2023 8:49 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

While maintaining respect, it can be quite exasperating within a
technical forum to come across a "pseudo-expert" or a "know-it-all."
It's important to possess a solid grasp of the subject, as otherwise,
your contributions might just add to the noise. z/OS UNIX might not be
within your realm of expertise.

Enough said from me on this subject :)

On 18/8/2023 8:31 pm, Seymour J Metz wrote:

>> I'm feeling a bit puzzled here!
> Then ask instead of attributing to me things that I didn't write.
>
>> Bash doesn't come pre-installed with z/OS;
> True but irrelevant. Now, were Rocket to stop supporting it, *that* would be 
> relevant.
>
>> so there shouldn't be any compatibility problems, right?
> WTF? How does the fact that it's 3rd party suddenly make bash and zsh 
> compatible?
>
>> If IBM decides to include zsh, which is
>> considered superior to bash, this could be a game-changer.
> Only for new scripts.
>
>> Once IBM introduced their Python SDK for z/OS, Rocket's Python started
>> struggling and eventually became obsolete.
> True but irrelevant; those were two implementations of the same language, 
> while bash and zsh are different languages.
>
>> It's perfectly fine to skip commenting on every discussion,
> It's perfectly fine to comment on what people actually write; it's not so 
> fine to comment on what only exists in your head.
>
>
> --
> 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, August 18, 2023 7:33 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: Strange results for the PS1 prompt with z/OS Unix
>
> On 18/8/2023 7:07 pm, Seymour J Metz wrote:
>> While, IMHO, zsh should have been included in MVS/ESA SP V4.3 OpenEdition, I 
>> don't see it killing bash, due to compatibility.
> I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
> z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
> compatibility problems, right? If IBM decides to include zsh, which is
> considered superior to bash, this could be a game-changer.
>
> Once IBM introduced their Python SDK for z/OS, Rocket's Python started
> struggling and eventually became obsolete.
>
> It's perfectly fine to skip commenting on every discussion, especially
> when it's not within your field of expertise.
>
>>
>> --
>> 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, August 18, 2023 5:38 AM
>> To:IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: Strange results for the PS1 prompt with z/OS Unix
>>
>> What version of bash are you using? Rocket software's port or IBM z/OS
>> Open Tools?
>>
>> Irrespective, bash is an enhanced ASCII application so make sure you
>> have the following environment variables set in your profile login
>> scripts by entering "env | sort" from the shell command line.
>>
>> _BPXK_AUTOCVT=ON
>> _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) TERMTHDACT(UADUMP) ABTERMENC(ABEND)
>> _TAG_REDIR_ERR=txt
>> _TAG_REDIR_IN=txt
>> _TAG_REDIR_OUT=txt
>>
>> Incidentally, I noticed that IBM are shipping zsh as part of z/OS 3.1 so
>> bye, bye bash.
>>
>> I've being using zsh for years and it turbo charges the shell. For
>> example, there are open source themes such as oh-my-zsh and
>> powerline10k. The powerline customizes PS1 with fancy glyphs. The
>> current Git branch, commits and other information is shown. It's next
>> level to the dull one your using :). Also, there is zsh-autosuggestions
>> which recalls previous commands for auto completion. oh-my-zsh also
>> provides a plugin for git command completion and other super cool
>> command completions that make using the shell as easy as an IDE.
>>
>> https://github.com/ohmyzsh/

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Matt Hogstrom
Tom,

I was dropping my son off at ECU yesterday to start his college journey and 
couldn’t offer a more articulate answer on your question.

I am including a link to a good article on Medium.Com  that 
talks about prompt setup for Bash.  This is where my TERMINFO comment came 
from.  This article talks about the process.  As well as creating prompts for 
bash in general.

https://medium.com/@sdearth/color-terminals-on-z-os-unix-system-services-6e9b3958af1b

https://medium.com/@sdearth/color-terminals-on-z-os-unix-system-services-6e9b3958af1b
I tried your prompt on my system which is running bash and got this result.

export PS1="[\\u@\\H \\W \\@]\\$ "

[OMVSKERN@M103 ~ 10:28 AM]#

I assume this is that you were expecting.  I was adding color to mine and this 
is the prompt I use

export PS1="^[[38;5;126m`whoami`@^[[1;31m:`hostname | sed 's/\..*//'`^[[0m>”

Note the funky ^[ in the prompt.  It is generated by doing a Ctrl-K and then 
immediately pressing ESC  This is what messed me up but may not be your issue.  
Also, I set my PS1 in .bashrc and not /etc/profile as I expect my users will 
customize their prompts to their taste and workflows.

I hope this helps at least in providing a pointer or two.


Matt Hogstrom
m...@hogstrom.org
+1-919-656-0564
PGP Key: 0x90ECB270
Facebook   LinkedIn 
  Twitter 

“It may be cognitive, but, it ain’t intuitive."
— Hogstrom



> On Aug 17, 2023, at 11:31 AM, Tom Longfellow 
> <03e29b607131-dmarc-requ...@listserv.ua.edu> wrote:
> 
> Anybody have any ideas why the two different LPARs are reading the same 
> string but interpreting it in two different ways?
> My suspect is some dark secret settings in the Unix file system.   Total Guess


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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Rick Troth

> I want to agree, but I can't.
>  I've seen too many differences across too many platforms and too 
many Unix (like) OSs.
>  Getting consistent behavior can become very tricky and you quickly 
end up away from the purity that -- I think -- that you are talking about.


You understand what I am talking about.

I didn't mean to imply that all vendors ("distributors" in the Linux 
case) get this stuff right.
EXPECT IT, where "expect" means "to require" not "to presume upon". Hold 
their feet to the fire when the break shit.

It's not difficult, but it does count for "eternal vigilance".

Speaking of breaking shit, I've been more pleased than disappointed by 
one particular distributor.
SUSE have worked hard to make stuff work, even in the fact of contrary 
popular trends. (I won't enumerate now for sake of brevity.)


Then:
(talking about login versus child shells and "profile" versus "resource 
config")


> The water starts to get murky when you start using the same shell
> for both interactive (ostensibly with a TTY) and non-interactive
> (ostensibly without a TTY) use.  E.g. the former is your login shell
> and the latter is a script using the same shell.  Sometimes you want
> different configurations of that shell based on it's use case.

(other stuff cut for brevity)

Yes, murky indeed.

Stephen Bourne recognized the overlap between interactive commands and 
scripted commands and *intentionally* made his shell a language 
interpreter.
Bill Joy criticized it as unfriendly for interactive work, and Bourne 
conceeded. If one must use a different shell for keyboard input than for 
scripting, there is the C shell.
But BASH has absorbed many of the conveniences of C shell. I expect KSH 
has too (but I don't know it as well as you do). With KSH and BASH, who 
needs CSH?


The problem is, when people use the C shell (Joy's brainchild) and then 
think to script a sequence of commands they had entered interactively 
... train wreck.
While C shell may be better for interactive work (than olde Bourne), it 
is widely criticized as poor on the scripting front. And people use what 
they know.
I've chosen to "know" and teach Bourne-ish shells in both modes. When I 
cobble-up a nifty sequence, I can immediately copy-n-paste that into a 
file for re-use later. This is good practice.


> #needMoreCoffee

mee too!

Meanwhile, ALL Bourne-compatible shells are supposed to source 
/etc/profile when invoked in "login" mode. I know that BASH, ZSH, PDKSH, 
and DASH all do. It's when the per-shell custom variant exists that 
/etc/profile gets skipped.


-- R; <><


On 8/18/23 10:27, Grant Taylor wrote:

On 8/18/23 8:33 AM, Rick Troth wrote:
About profiling, I regularly setPS1='\$ ' which for BASH renders a 
prompt as "$" for normal users but as "#" for superuser. It's 
convenient.

ZSH shows that as "\$" and does not change it when I change UID.


Zsh has similar behavior.

Zsh uses different escape sequences for the prompt PS1 et al. than 
Bash does.


Check out the PROMPT EXPANSION of the zshmis (or zshall) manual pages.

Look into %# in the Zsh prompt as it will give you # for root and % 
for non-root.



This is *not* a slam on ZSH, just an observation.


There are many differences between Zsh and Bash.  Prompt (PS1 et al.) 
is just one that surprises a lot of people.


In search of better profiling, /etc/zprofile should source 
/etc/profile and then override as needed. (PS1 being a prime example, 
eh?)

Or ~.zprofile sourcing ~.profile, same logic and rationale.


I want to agree, but I can't.  I've seen too many differences across 
too many platforms and too many Unix (like) OSs.  Getting consistent 
behavior can become very tricky and you quickly end up away from the 
purity that -- I think -- that you are talking about.


There are two levels: profiling which should happen when you sign on 
(once) and "resource config" which gets invoked every time a program 
starts.


Eh

The water starts to get murky when you start using the same shell for 
both interactive (ostensibly with a TTY) and non-interactive 
(ostensibly without a TTY) use.  E.g. the former is your login shell 
and the latter is a script using the same shell.  Sometimes you want 
different configurations of that shell based on it's use case.


Then you get into even more esoteric things like is your interactive 
shell a login shell or a non-login shell (possibly started from inside 
your login shell).


Aside:  Some people start additional interactive non-login shells from 
their interactive login shell as a way to divide command history or 
have different features for a task at hand.  E.g. in the long process 
of working on something that takes many hours and need a shell briefly 
to fix something / unclog a printer, then start an interactive 
non-login shell, do the maintenance work therein, then exit back to 
the original shell without significantly altering your outer shell's 
command history.  Think something along the lines of an "interrupt" 
button 

Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-18 Thread Grant Taylor

On 8/18/23 11:57 AM, Rick Troth wrote:
EXPECT IT, where "expect" means "to require" not "to presume upon". Hold 
their feet to the fire when the break shit.


ACK


It's not difficult, but it does count for "eternal vigilance".


Yep, making sure that someone / something constantly does things 
properly is an eternal task.


SUSE have worked hard to make stuff work, even in the fact of contrary 
popular trends. (I won't enumerate now for sake of brevity.)


I've not had the pleasure of using SuSE.  But I know many that highly 
regard it.


Aside, I'd be curious to read your enumeration, either privately or here.

Stephen Bourne recognized the overlap between interactive commands and 
scripted commands and *intentionally* made his shell a language 
interpreter.
Bill Joy criticized it as unfriendly for interactive work, and Bourne 
conceeded. If one must use a different shell for keyboard input than for 
scripting, there is the C shell.


There are MANY scripting et al. interpreters that I would loath to use 
interactively.  Perl, Python, and PHP come to mind.


But BASH has absorbed many of the conveniences of C shell. I expect KSH 
has too (but I don't know it as well as you do). With KSH and BASH, who 
needs CSH?


I have always encouraged fellow administrators to understand, if not be 
fluent in the native shell.  As in whatever /bin/sh is (sym-linked to). 
Or similarly, whatever root's shell is.


I similarly encouraged fellow administrators to not change their shell 
in the account definition system.  Instead, have the default shell check 
to see if the preferred shell is accessible and exec it if it is.  That 
way their account is still somewhat functional in the event that their 
preferred shell is inaccessible for any reason.  E.g. file system 
containing the preferred shell isn't mounted, network problems breaking 
NFS, etc.


The problem is, when people use the C shell (Joy's brainchild) and then 
think to script a sequence of commands they had entered interactively 
... train wreck.


ACK

While C shell may be better for interactive work (than olde Bourne), it 
is widely criticized as poor on the scripting front. And people use what 
they know.


ACK

I've chosen to "know" and teach Bourne-ish shells in both modes. When I 
cobble-up a nifty sequence, I can immediately copy-n-paste that into a 
file for re-use later. This is good practice.


I routinely wend up recording (part of) my shell history and using that 
as the basis for automation and refinement.


Meanwhile, ALL Bourne-compatible shells are supposed to source 
/etc/profile when invoked in "login" mode. I know that BASH, ZSH, PDKSH, 
and DASH all do. It's when the per-shell custom variant exists that 
/etc/profile gets skipped.


Yep.  I've seen some complex matrices of what files are read when both 
from upstream shell maintainer and downstream distro maintainer.




--
Grant. . . .

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-19 Thread Sebastian Welton
On Fri, 18 Aug 2023 19:33:03 +0800, David Crayford  wrote:

>I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
>z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
>compatibility problems, right? If IBM decides to include zsh, which is
>considered superior to bash, this could be a game-changer.

Currently trying this one out, not too sure if there is any Rocket influence or 
not:

https://github.com/ZOSOpenTools/bashport

Sebastian.

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-20 Thread Tom Longfellow
Let me know when the slaying starts :)

The 'trival' matter was introduced by a slightly sloppy set  of Copy-Paste 
combos (user error)  and , OF COURSE -- a leading blank in a unix config or 
command is Never of consequence

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-20 Thread Tom Longfellow
changing the \\ to \ in only one system is unacceptable to me.   Even if it 
works, I would not use it.
I am expecting that identical software bases should produce identical results.

What the means is I am looking for what is different.   What has happened on 
System 1 that was not correctly cloned to System 2.  What environmental 
differences could have caused this difference in behaviour.

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-20 Thread Matt Hogstrom
Gratz.   We’ve all been there

Matt Hogstrom
+1 (919) 656-0564

> On Aug 20, 2023, at 12:35, Tom Longfellow 
> <03e29b607131-dmarc-requ...@listserv.ua.edu> wrote:
> 
> changing the \\ to \ in only one system is unacceptable to me.   Even if it 
> works, I would not use it.
> I am expecting that identical software bases should produce identical results.
> 
> What the means is I am looking for what is different.   What has happened on 
> System 1 that was not correctly cloned to System 2.  What environmental 
> differences could have caused this difference in behaviour.
> 
> --
> 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: Strange results for the PS1 prompt with z/OS Unix

2023-08-20 Thread David Crayford

On 19/8/2023 6:18 pm, Sebastian Welton wrote:

On Fri, 18 Aug 2023 19:33:03 +0800, David Crayford  wrote:


I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
compatibility problems, right? If IBM decides to include zsh, which is
considered superior to bash, this could be a game-changer.

Currently trying this one out


If you're using it don't forget to star the repo on Github. That really 
helps the maintainers gauge how many people are using the port.




  not too sure if there is any Rocket influence or not:


Not that I know of. The distinction between the z/OS Open Tools 
initiative and Rocket's ported tools lies in Rocket's provision of 
commercial support and SMP/E packaging. Customers tend to approach 
open-source solutions on z/OS cautiously, especially after the 
Shellshock incident with bash. Rocket remains vigilant about addressing 
any new Common Vulnerabilities and Exposures (CVE), promptly releasing 
patches. Bash is a dependecy for Git, which holds significant importance 
as a ported tool. In recent customer presentations, the predominant 
focus has been on modernization, involving Git integration, whether 
directly or through bridging from existing legacy SCM systems.


I extend my appreciation to IBM for their commitment to the z/OS Open 
Tools initiative. The community is commendable, well-guided, and staffed 
with highly skilled engineers. Numerous packages have been ported, some 
of which I have undertaken myself, like CMake. I intend to leverage the 
z/OS Open Tools ports as they spare me the effort of continuous 
maintenance.





https://github.com/ZOSOpenTools/bashport

Sebastian.

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email tolists...@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: Strange results for the PS1 prompt with z/OS Unix

2023-08-20 Thread kekronbekron
> I intend to leverage the z/OS Open Tools ports as they spare me the effort of 
> continuous maintenance.

That sounds like it's going to lead to RS offering supported option of stuff, 
relying on other people's open sourced work... with what amount of giving back 
involved?
In other words, what's the value add apart from the comfort of support, and the 
SMP/E install option?

Just looking to understand, nothing else.

- KB

--- Original Message ---
On Monday, August 21st, 2023 at 10:12, David Crayford  
wrote:


> On 19/8/2023 6:18 pm, Sebastian Welton wrote:
> 
> > On Fri, 18 Aug 2023 19:33:03 +0800, David crayforddcrayf...@gmail.com wrote:
> > 
> > > I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
> > > z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
> > > compatibility problems, right? If IBM decides to include zsh, which is
> > > considered superior to bash, this could be a game-changer.
> > > Currently trying this one out
> 
> 
> If you're using it don't forget to star the repo on Github. That really
> helps the maintainers gauge how many people are using the port.
> 
> > not too sure if there is any Rocket influence or not:
> 
> 
> Not that I know of. The distinction between the z/OS Open Tools
> initiative and Rocket's ported tools lies in Rocket's provision of
> commercial support and SMP/E packaging. Customers tend to approach
> open-source solutions on z/OS cautiously, especially after the
> Shellshock incident with bash. Rocket remains vigilant about addressing
> any new Common Vulnerabilities and Exposures (CVE), promptly releasing
> patches. Bash is a dependecy for Git, which holds significant importance
> as a ported tool. In recent customer presentations, the predominant
> focus has been on modernization, involving Git integration, whether
> directly or through bridging from existing legacy SCM systems.
> 
> I extend my appreciation to IBM for their commitment to the z/OS Open
> Tools initiative. The community is commendable, well-guided, and staffed
> with highly skilled engineers. Numerous packages have been ported, some
> of which I have undertaken myself, like CMake. I intend to leverage the
> z/OS Open Tools ports as they spare me the effort of continuous
> maintenance.
> 
> > https://github.com/ZOSOpenTools/bashport
> > 
> > Sebastian.
> > 
> > --
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email tolists...@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: Strange results for the PS1 prompt with z/OS Unix

2023-08-21 Thread David Crayford
> On 21 Aug 2023, at 1:35 pm, kekronbekron 
> <02dee3fcae33-dmarc-requ...@listserv.ua.edu> wrote:
> 
>> I intend to leverage the z/OS Open Tools ports as they spare me the effort 
>> of continuous maintenance.
> 
> That sounds like it's going to lead to RS offering supported option of stuff, 
> relying on other people's open sourced work... with what amount of giving 
> back involved?

There is zero chance of RS offering commercial support for code ported by the 
z/OS Open Tools community. They don’t need to. If they thought there was a 
market for a tool that they would just provide their own port. 

I’m not quite sure what you mean by “giving back”? If you’re talking about 
upstreaming changes then we’ve had this conversation before many times. The 
maintainers of open source projects, such as Python, want nothing to do with 
z/OS patches in their mainline code. That’s why IBM and Rocket keep their own 
patch files. 

> In other words, what's the value add apart from the comfort of support, and 
> the SMP/E install option?
> 

Comfort? That's hardly the case. Deploying anything into production without 
proper support is unheard of. If you're just a casual enthusiast downloading 
development tools for personal use, that's one thing. However, when an 
organization aims to adopt Git for managing critical source code, no 
responsible IT manager would be at ease without round-the-clock support. This 
principle applies universally, encompassing mainframes and all systems alike. 
Support is a must, either directly from the product vendor or through services 
provided by specialized organizations. As an example, consider enterprise Linux 
distributions like RHEL, which are predominantly constructed from open source 
software. RedHat (now IBM) or SUSE stands behind them, delivering essential 
support. Same for cloud operators. 



> 
> - KB
> 
> --- Original Message ---
> On Monday, August 21st, 2023 at 10:12, David Crayford  
> wrote:
> 
> 
>> On 19/8/2023 6:18 pm, Sebastian Welton wrote:
>> 
>>> On Fri, 18 Aug 2023 19:33:03 +0800, David crayforddcrayf...@gmail.com wrote:
>>> 
 I'm feeling a bit puzzled here! Bash doesn't come pre-installed with
 z/OS; rather, it's a tool ported by Rocket, so there shouldn't be any
 compatibility problems, right? If IBM decides to include zsh, which is
 considered superior to bash, this could be a game-changer.
 Currently trying this one out
>> 
>> 
>> If you're using it don't forget to star the repo on Github. That really
>> helps the maintainers gauge how many people are using the port.
>> 
>>> not too sure if there is any Rocket influence or not:
>> 
>> 
>> Not that I know of. The distinction between the z/OS Open Tools
>> initiative and Rocket's ported tools lies in Rocket's provision of
>> commercial support and SMP/E packaging. Customers tend to approach
>> open-source solutions on z/OS cautiously, especially after the
>> Shellshock incident with bash. Rocket remains vigilant about addressing
>> any new Common Vulnerabilities and Exposures (CVE), promptly releasing
>> patches. Bash is a dependecy for Git, which holds significant importance
>> as a ported tool. In recent customer presentations, the predominant
>> focus has been on modernization, involving Git integration, whether
>> directly or through bridging from existing legacy SCM systems.
>> 
>> I extend my appreciation to IBM for their commitment to the z/OS Open
>> Tools initiative. The community is commendable, well-guided, and staffed
>> with highly skilled engineers. Numerous packages have been ported, some
>> of which I have undertaken myself, like CMake. I intend to leverage the
>> z/OS Open Tools ports as they spare me the effort of continuous
>> maintenance.
>> 
>>> https://github.com/ZOSOpenTools/bashport
>>> 
>>> Sebastian.
>>> 
>>> --
>>> For IBM-MAIN subscribe / signoff / archive access instructions,
>>> send email tolists...@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: Strange results for the PS1 prompt with z/OS Unix

2023-08-21 Thread kekronbekron
Ah ok, I misunderstood then.
When you said it'll spare you the effort of continuous maintenance, I thought 
you meant further work/whatever will be based off of zopen stuff.

Of course, RS can't offer support for zopen content directly.

Well... giving back as in more than star-ing a repo. Keeping the supply chain 
sustainable.
I'm seeing quite a bit of zopen patches being accepted upstream.
But I do know what you mean... there are some projects/orgs that don't want to 
accept patches without having access to h/w where they can test/run those 
patches on.

>> Comfort? That's hardly the case. 
> no responsible IT manager would be at ease without...

In other words... comfort, albeit for a professional setting.
I didn't use that word in a derogatory manner. It is what it is.

Supported open source is certainly not a "must".
It's just far more common/expected in the mainframe world.
... which is hilarious; it was the mainframe ecosystem that was originally open 
(I'm assuming)... with CBT etc.

- KB

--- Original Message ---
On Monday, August 21st, 2023 at 13:57, David Crayford  
wrote:


> > On 21 Aug 2023, at 1:35 pm, kekronbekron 
> > 02dee3fcae33-dmarc-requ...@listserv.ua.edu wrote:
> > 
> > > I intend to leverage the z/OS Open Tools ports as they spare me the 
> > > effort of continuous maintenance.
> > 
> > That sounds like it's going to lead to RS offering supported option of 
> > stuff, relying on other people's open sourced work... with what amount of 
> > giving back involved?
> 
> 
> There is zero chance of RS offering commercial support for code ported by the 
> z/OS Open Tools community. They don’t need to. If they thought there was a 
> market for a tool that they would just provide their own port.
> 
> I’m not quite sure what you mean by “giving back”? If you’re talking about 
> upstreaming changes then we’ve had this conversation before many times. The 
> maintainers of open source projects, such as Python, want nothing to do with 
> z/OS patches in their mainline code. That’s why IBM and Rocket keep their own 
> patch files.
> 
> > In other words, what's the value add apart from the comfort of support, and 
> > the SMP/E install option?
> 
> 
> Comfort? That's hardly the case. Deploying anything into production without 
> proper support is unheard of. If you're just a casual enthusiast downloading 
> development tools for personal use, that's one thing. However, when an 
> organization aims to adopt Git for managing critical source code, no 
> responsible IT manager would be at ease without round-the-clock support. This 
> principle applies universally, encompassing mainframes and all systems alike. 
> Support is a must, either directly from the product vendor or through 
> services provided by specialized organizations. As an example, consider 
> enterprise Linux distributions like RHEL, which are predominantly constructed 
> from open source software. RedHat (now IBM) or SUSE stands behind them, 
> delivering essential support. Same for cloud operators.

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


Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-21 Thread Seymour J Metz
Long before the CBT tape. Proprietary software was the innovation. In the 1950s 
through the 1970s shops routinely exchanged software, although the shift away 
from, e.g., cards, tape, has certainly made things easier. Also, these days 
there are formal mechanisms instead of the informal and ad hoc methods of an 
earlier era.


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


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
kekronbekron [02dee3fcae33-dmarc-requ...@listserv.ua.edu]
Sent: Monday, August 21, 2023 4:53 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Strange results for the PS1 prompt with z/OS Unix

Ah ok, I misunderstood then.
When you said it'll spare you the effort of continuous maintenance, I thought 
you meant further work/whatever will be based off of zopen stuff.

Of course, RS can't offer support for zopen content directly.

Well... giving back as in more than star-ing a repo. Keeping the supply chain 
sustainable.
I'm seeing quite a bit of zopen patches being accepted upstream.
But I do know what you mean... there are some projects/orgs that don't want to 
accept patches without having access to h/w where they can test/run those 
patches on.

>> Comfort? That's hardly the case.
> no responsible IT manager would be at ease without...

In other words... comfort, albeit for a professional setting.
I didn't use that word in a derogatory manner. It is what it is.

Supported open source is certainly not a "must".
It's just far more common/expected in the mainframe world.
... which is hilarious; it was the mainframe ecosystem that was originally open 
(I'm assuming)... with CBT etc.

- KB

--- Original Message ---
On Monday, August 21st, 2023 at 13:57, David Crayford  
wrote:


> > On 21 Aug 2023, at 1:35 pm, kekronbekron 
> > 02dee3fcae33-dmarc-requ...@listserv.ua.edu wrote:
> >
> > > I intend to leverage the z/OS Open Tools ports as they spare me the 
> > > effort of continuous maintenance.
> >
> > That sounds like it's going to lead to RS offering supported option of 
> > stuff, relying on other people's open sourced work... with what amount of 
> > giving back involved?
>
>
> There is zero chance of RS offering commercial support for code ported by the 
> z/OS Open Tools community. They don’t need to. If they thought there was a 
> market for a tool that they would just provide their own port.
>
> I’m not quite sure what you mean by “giving back”? If you’re talking about 
> upstreaming changes then we’ve had this conversation before many times. The 
> maintainers of open source projects, such as Python, want nothing to do with 
> z/OS patches in their mainline code. That’s why IBM and Rocket keep their own 
> patch files.
>
> > In other words, what's the value add apart from the comfort of support, and 
> > the SMP/E install option?
>
>
> Comfort? That's hardly the case. Deploying anything into production without 
> proper support is unheard of. If you're just a casual enthusiast downloading 
> development tools for personal use, that's one thing. However, when an 
> organization aims to adopt Git for managing critical source code, no 
> responsible IT manager would be at ease without round-the-clock support. This 
> principle applies universally, encompassing mainframes and all systems alike. 
> Support is a must, either directly from the product vendor or through 
> services provided by specialized organizations. As an example, consider 
> enterprise Linux distributions like RHEL, which are predominantly constructed 
> from open source software. RedHat (now IBM) or SUSE stands behind them, 
> delivering essential support. Same for cloud operators.

--
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: [EXTERNAL] Re: Strange results for the PS1 prompt with z/OS Unix

2023-08-17 Thread Pommier, Rex
The initial email said bash

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Matt Hogstrom
Sent: Thursday, August 17, 2023 11:13 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: Strange results for the PS1 prompt with z/OS Unix

Is this sh, bash, … ?

Is the TERM environment variable the same on both systems ?

Matt Hogstrom
PGP key 0F143BC1

> On Aug 17, 2023, at 11:31, Tom Longfellow 
> <03e29b607131-dmarc-requ...@listserv.ua.edu> wrote:
> 
> I am confused and am throwing out a Hail Mary for help.   Here is the 
> situation.
> Two cloned LPARs.  (same sysres and unix root file systems)

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

--
The information contained in this message is confidential, protected from 
disclosure and may be legally privileged. If the reader of this message is not 
the intended recipient or an employee or agent responsible for delivering this 
message to the intended recipient, you are hereby notified that any disclosure, 
distribution, copying, or any action taken or action omitted in reliance on it, 
is strictly prohibited and may be unlawful. If you have received this 
communication in error, please notify us immediately by replying to this 
message and destroy the material in its entirety, whether in electronic or hard 
copy format. Thank you.


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