Re: Unix support of symbols in .profile

2016-02-10 Thread Ed Finnell
I don't think so. Whoever customized the first SDSF needs to do the same  
customization on second FMID.
 
As far as I know there's only the SDSF Operation and Customization  Manual 
SA23-2274
 
For ISFPARMS:
 
Command.SLASH.Name /, ( or ) Specifies a single character to use when 
issuing system commands  through SDSF (usually referred to as the slash 
command). You would use  this character with all forms of the slash command, 
including I/ and W/.  Enclose the character in single quotation marks, for 
example VALUE(')').  The default is /.  
This also affects the character used with the REXX  ISFEXEC command. The 
REXX ISFSLASH command is preferred, as it does not  require the character to 
be coded with the command.  
UPRSLCMD
UPRSLCIC
UPRSLCWC
 
 
In a message dated 2/10/2016 1:29:13 A.M. Central Standard Time,  
000433f07816-dmarc-requ...@listserv.ua.edu writes:

Is this  YA stupid code page problem?


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


Re: Unix support of symbols in .profile

2016-02-09 Thread David Magee
Kirk,

My .profile is

umask 027   
Sys_MPT=$(sysvar SYSNAME)   
echo $Sys_MPT   
echo $HOME/$Sys_MPT/maxdate 
if [ ! -f $HOME/$Sys_MPT/maxdate ]; then
  /usr/sbin/mount -v -f UNIX.ZFS.QRDR.C2ECQRLF.$Sys_MPT ./$Sys_MPT
  echo "* The QRadar LEEF file was NOT mounted. *"  
  echo "* A mount command has been issued. *"   
  else  
  echo "* The QRadar LEEF file was ALREADY mounted. *"  
fi  

The echo's in STDOUT are:

SYSQ  
/u/c2ecqrlf/SYSQ/maxdate  
* The QRadar LEEF file was ALREADY mounted. * 

But STDERR is showing

[: /u/c2ecqrlf/.profile 5: FSUM7351 not found   

and the mount was NOT performed.

Something must not be right with my if statement. The if statement works when 
variables are not in the statement. 

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


Re: Unix support of symbols in .profile

2016-02-09 Thread Jousma, David
I am able to pass system symbols in native commands like:

ln -s \$SYSNAME/fitb  /RSM02A/opt/fitb

_
Dave Jousma
Assistant Vice President, Mainframe Engineering
david.jou...@53.com
1830 East Paris, Grand Rapids, MI  49546 MD RSCB2H
p 616.653.8429
f 616.653.2717


-Original Message-
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Magee
Sent: Tuesday, February 09, 2016 9:52 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Unix support of symbols in .profile

Kirk,

My .profile is

umask 027   
Sys_MPT=$(sysvar SYSNAME)   
echo $Sys_MPT   
echo $HOME/$Sys_MPT/maxdate 
if [ ! -f $HOME/$Sys_MPT/maxdate ]; then
  /usr/sbin/mount -v -f UNIX.ZFS.QRDR.C2ECQRLF.$Sys_MPT ./$Sys_MPT
  echo "* The QRadar LEEF file was NOT mounted. *"  
  echo "* A mount command has been issued. *"   
  else  
  echo "* The QRadar LEEF file was ALREADY mounted. *"  
fi  

The echo's in STDOUT are:

SYSQ  
/u/c2ecqrlf/SYSQ/maxdate  
* The QRadar LEEF file was ALREADY mounted. * 

But STDERR is showing

[: /u/c2ecqrlf/.profile 5: FSUM7351 not found   

and the mount was NOT performed.

Something must not be right with my if statement. The if statement works when 
variables are not in the statement. 


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

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


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


Re: Unix support of symbols in .profile

2016-02-09 Thread Paul Gilmartin
On Tue, 9 Feb 2016 09:01:28 -0600, John McKown wrote:

>On Tue, Feb 9, 2016 at 8:51 AM, David Magee wrote:
>
>> Kirk,
>>
>> My .profile is
>>
>> umask 027
>> Sys_MPT=$(sysvar SYSNAME)
>> echo $Sys_MPT
>> echo $HOME/$Sys_MPT/maxdate
>> if [ ! -f $HOME/$Sys_MPT/maxdate ]; then
>>   /usr/sbin/mount -v -f UNIX.ZFS.QRDR.C2ECQRLF.$Sys_MPT ./$Sys_MPT
>>   echo "* The QRadar LEEF file was NOT mounted. *"
>>   echo "* A mount command has been issued. *"
>>   else
>>   echo "* The QRadar LEEF file was ALREADY mounted. *"
>> fi
>>
>> The echo's in STDOUT are:
>>
>> SYSQ
>> /u/c2ecqrlf/SYSQ/maxdate
>> * The QRadar LEEF file was ALREADY mounted. *
>>
>> But STDERR is showing
>>
>> [: /u/c2ecqrlf/.profile 5: FSUM7351 not found
>>
>> and the mount was NOT performed.
>>
>> Something must not be right with my if statement. The if statement works
>> when variables are not in the statement.
>> 
This seems to be reporting that "[" is not found.  What does "type [" report?
(Add that for diagnosis to your script.)  How is "[" defined?  Is it an alias 
for
"test"?  Is it a link to "test"?  Other?

>​The first thing that I do when a script is not working correctly is make
>the first statement be:
>
>set -x
>
>this will echo each statement to stdout just before it is executed. It
>helps me get a better idea what is going on.​ 
>
And a point of style:  I find "if" constructs more legible if, ceteris paribus,
I code the shorter branch first.

-- gil

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


Re: Unix support of symbols in .profile

2016-02-09 Thread John McKown
On Tue, Feb 9, 2016 at 8:51 AM, David Magee 
wrote:

> Kirk,
>
> My .profile is
>
> umask 027
> Sys_MPT=$(sysvar SYSNAME)
> echo $Sys_MPT
> echo $HOME/$Sys_MPT/maxdate
> if [ ! -f $HOME/$Sys_MPT/maxdate ]; then
>   /usr/sbin/mount -v -f UNIX.ZFS.QRDR.C2ECQRLF.$Sys_MPT ./$Sys_MPT
>   echo "* The QRadar LEEF file was NOT mounted. *"
>   echo "* A mount command has been issued. *"
>   else
>   echo "* The QRadar LEEF file was ALREADY mounted. *"
> fi
>
> The echo's in STDOUT are:
>
> SYSQ
> /u/c2ecqrlf/SYSQ/maxdate
> * The QRadar LEEF file was ALREADY mounted. *
>
> But STDERR is showing
>
> [: /u/c2ecqrlf/.profile 5: FSUM7351 not found
>
> and the mount was NOT performed.
>
> Something must not be right with my if statement. The if statement works
> when variables are not in the statement.
>


​The first thing that I do when a script is not working correctly is make
the first statement be:

set -x

this will echo each statement to stdout just before it is executed. It
helps me get a better idea what is going on.​

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


Re: Unix support of symbols in .profile

2016-02-09 Thread Kirk Wolf
more likely your "[" is in the wrong code page.

Since many z/OS people don't switch their TN3270 emulators from 037 and use
1047 (the default for z/OS Unix), I often avoid brackets and braces in
shell scripts and do this:

if test ! -f file; then
..
fi


Kirk Wolf
Dovetailed Technologies
http://dovetail.com

On Tue, Feb 9, 2016 at 9:32 AM, Paul Gilmartin <
000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Tue, 9 Feb 2016 09:01:28 -0600, John McKown wrote:
>
> >On Tue, Feb 9, 2016 at 8:51 AM, David Magee wrote:
> >
> >> Kirk,
> >>
> >> My .profile is
> >>
> >> umask 027
> >> Sys_MPT=$(sysvar SYSNAME)
> >> echo $Sys_MPT
> >> echo $HOME/$Sys_MPT/maxdate
> >> if [ ! -f $HOME/$Sys_MPT/maxdate ]; then
> >>   /usr/sbin/mount -v -f UNIX.ZFS.QRDR.C2ECQRLF.$Sys_MPT ./$Sys_MPT
> >>   echo "* The QRadar LEEF file was NOT mounted. *"
> >>   echo "* A mount command has been issued. *"
> >>   else
> >>   echo "* The QRadar LEEF file was ALREADY mounted. *"
> >> fi
> >>
> >> The echo's in STDOUT are:
> >>
> >> SYSQ
> >> /u/c2ecqrlf/SYSQ/maxdate
> >> * The QRadar LEEF file was ALREADY mounted. *
> >>
> >> But STDERR is showing
> >>
> >> [: /u/c2ecqrlf/.profile 5: FSUM7351 not found
> >>
> >> and the mount was NOT performed.
> >>
> >> Something must not be right with my if statement. The if statement works
> >> when variables are not in the statement.
> >>
> This seems to be reporting that "[" is not found.  What does "type ["
> report?
> (Add that for diagnosis to your script.)  How is "[" defined?  Is it an
> alias for
> "test"?  Is it a link to "test"?  Other?
>
> >​The first thing that I do when a script is not working correctly is make
> >the first statement be:
> >
> >set -x
> >
> >this will echo each statement to stdout just before it is executed. It
> >helps me get a better idea what is going on.​
> >
> And a point of style:  I find "if" constructs more legible if, ceteris
> paribus,
> I code the shorter branch first.
>
> -- 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: Unix support of symbols in .profile

2016-02-09 Thread Paul Gilmartin
On Tue, 9 Feb 2016 09:53:42 -0600, Kirk Wolf wrote:

>more likely your "[" is in the wrong code page.
>
>Since many z/OS people don't switch their TN3270 emulators from 037 and use
>1047 (the default for z/OS Unix), ...
>
Good catch!

Switch it from 037 to 1047 and *never* switch it back.  Works for me.

-- gil

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


Re: Unix support of symbols in .profile

2016-02-09 Thread David Magee
That was it! I normally run emulator A which is set up correctly as 1047. 
Pop'ed over to use emulator B (which is set up for 037) to assist a user having 
with a file transfer problem involved with some of those other special 
characters. Then I fell asleep at the wheel.

Thanks for the reminder!

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


AW: Re: Unix support of symbols in .profile

2016-02-09 Thread Peter Hunkeler
> Switch it from 037 to 1047 and *never* switch it back.  Works for me.



There are a lot more code pages in common use, especially here in Europe. 
Switching TN3270 to CP1047 is not always an option. I consequently do:
a) avoid TSO OMVS
b) use SSH to log into the shell
c) make sure the shell code page matches theTN3270 code page (run chcp in 
/etc/profile or ~/.profile)
Take care of config files which must be in CP1047. My .profile allows me to 
choose the CP at login. Alternatively, use iconv.


--
Peter Hunkeler



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


Re: Unix support of symbols in .profile

2016-02-09 Thread Bruce Hewson
Hello Hil,

normally the default prefix for issuing MVS Commands from SDSF is "/", not "-".

Regards
Bruce


Original message:
==

What about dynamic symbols?  (Or why not?)

And "z/OS system installation and maintenance" tells me:

... You can display the symbols in your system by entering the D SYMBOLS
command. Figure 1 shows the result of entering this command.

Figure 1. Partial output of the D SYMBOLS command (some lines removed)

HQX7708 -  SDSF PRIMARY OPTION MENU  --
COMMAND INPUT ===> -D SYMBOLS
  IEA007I STATIC SYSTEM SYMBOL VALUES
= "2"
   = "70"

But:

   Display  Filter  View  Print  Options  Search  Help
 --
 HQX77A0 -  SDSF PRIMARY OPTION MENU  -- INVALID COMMAND
 COMMAND INPUT ===> -D SYMBOLS SCROLL ===> CSR

 DAActive users  INIT  Initiators
 I Input queue   PRPrinters
 O Output queue  PUN   Punches
...
???

-- gil

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


Re: Unix support of symbols in .profile

2016-02-09 Thread Paul Gilmartin
On Tue, 9 Feb 2016 23:42:44 -0600, Bruce Hewson wrote:
>
>normally the default prefix for issuing MVS Commands from SDSF is "/", not "-".
>
Hmmm...  I didn't recognize it as an MVS command because it *didn't* have
"/" as a prefix.

That's how it appeared in the manual.

Is this YA stupid code page problem?

Is that prefix configurable and the developer had an idiosyncratic convention?

Is an RCF in order?  If I could find a publicaton number.

>Original message:
>==
>
>What about dynamic symbols?  (Or why not?)
>
>And "z/OS system installation and maintenance" tells me:
>
>... You can display the symbols in your system by entering the D SYMBOLS
>command. Figure 1 shows the result of entering this command.
>
>Figure 1. Partial output of the D SYMBOLS command (some lines removed)
>
>HQX7708 -  SDSF PRIMARY OPTION MENU  --
>COMMAND INPUT ===> -D SYMBOLS
>  IEA007I STATIC SYSTEM SYMBOL VALUES
>= "2"
>   = "70"
>
>But:
>
>   Display  Filter  View  Print  Options  Search  Help
> --
> HQX77A0 -  SDSF PRIMARY OPTION MENU  -- INVALID COMMAND
> COMMAND INPUT ===> -D SYMBOLS SCROLL ===> CSR
>
> DAActive users  INIT  Initiators
> I Input queue   PRPrinters
> O Output queue  PUN   Punches

-- gil

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


Re: Unix support of symbols in .profile

2016-02-08 Thread David Magee
Thanks, Kirk!



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


Re: Unix support of symbols in .profile

2016-02-08 Thread Kirk Wolf
A z/OS system symbol is not a shell variable.

But there is a sysvar shell command to read a system symbol.

>From "man sysvar":

  sysvar -- Display static system symbols


  Format

  sysvar var


  Description

  The sysvar command allows users to obtain substitution text for system
  variables that are defined in the IEASYMxx member of SYS1.PARMLIB or in
  the system IPL parameters. The substitution text is printed to standard
  output (stdout). This could be used to substitute system variables in
  shell variables. For example:

system_name=$(sysvar SYSNAME)



Kirk Wolf
Dovetailed Technologies
http://dovetail.com

On Mon, Feb 8, 2016 at 3:51 PM, David Magee 
wrote:

> I'm stumped trying to use a system symbol in my .profile to perform a test
> for a file name.
>
> I'm coding along these lines:
>
> if [ ! -f //file_name ]; then
>   echo "* The file is not there. *"
> else
>   echo "* The file is there. *"
> fi
>
> Surely it's staring me right in the face!
>
>
> --
> 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: Unix support of symbols in .profile

2016-02-08 Thread Paul Gilmartin
On Mon, 8 Feb 2016 16:08:54 -0600, Kirk Wolf wrote:

>A z/OS system symbol is not a shell variable.
>But there is a sysvar shell command to read a system symbol.
>From "man sysvar":
>
>  sysvar -- Display static system symbols
>...
The Rexx MVSVAR() might also be useful if properly wrapped.

What about dynamic symbols?  (Or why not?)

And "z/OS system installation and maintenance" tells me:

... You can display the symbols in your system by entering the D SYMBOLS
command. Figure 1 shows the result of entering this command.

Figure 1. Partial output of the D SYMBOLS command (some lines removed)

HQX7708 -  SDSF PRIMARY OPTION MENU  --
COMMAND INPUT ===> -D SYMBOLS
  IEA007I STATIC SYSTEM SYMBOL VALUES
= "2"
   = "70"

But:

   Display  Filter  View  Print  Options  Search  Help
 --
 HQX77A0 -  SDSF PRIMARY OPTION MENU  -- INVALID COMMAND
 COMMAND INPUT ===> -D SYMBOLS SCROLL ===> CSR

 DAActive users  INIT  Initiators
 I Input queue   PRPrinters
 O Output queue  PUN   Punches
...
???

-- gil

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