On Tue, Jul 5, 2016 at 10:47 AM, Peter <[email protected]> wrote:

> Hi John,
>
> In your case
>
> lrwxrwxrwx   1 BUBBA    TSHG          13 Jul  5 10:36 x -> /$SYSNAME/etc
>
> I am expecting as
>
> lrwxrwxrwx   1 BUBBA    TSHG          13 Jul  5 10:36 x -> $SYSNAME/etc
>
> Like in my expectation it is without backward slash.
>
> so if I issue under /MaintP21
>
> ln -s /\$SYSNAME\etc \etc
>
> i might get like
>
> etc --- > /$SYSNAME/etc
>
> So i was looking the result without the backward slash before $SYSNAME
>


​OK. then don't put in the / in the ln command:

​
ln -s \$SYSNAME/etc /x​


​instead. However, the results are functionally the same. Example:

LIH1:BUBBA:/home/bubba$
df .
Mounted on     Filesystem                Avail/Total    Files      Status

/home/bubba   (TSSPV.PLEXLIH1.HOME.BUBBA.ZFS) 31536804/45705600 4294926387
Available
LIH1:BUBBA:/home/bubba$
ln -s \$SYSNAME/etc x # note no leading /
LIH1:BUBBA:/home/bubba$
ls -l x
lrwxrwxrwx   1 BUBBA    TSHG          12 Jul  5 11:03 x -> $SYSNAME/etc
LIH1:TSH009:/home/bubba$
cd x
LIH1:BUBBA:/home/bubba/x$
df .
Mounted on     Filesystem                Avail/Total    Files      Status

/LIH1/etc      (OMVS.I17RS1.LIH1.ETC)    34308/40320    4294966929 Available
LIH1:BUBBA:/home/bubba/x$
cd
LIH1:BUBBA:/home/bubba$
rm x
LIH1:BUBBA:/home/bubba$
ln -s /\$SYSNAME/etc x # note leading /
LIH1:BUBBA:/home/bubba$
ls -l x
lrwxrwxrwx   1 BUBBA    TSHG          13 Jul  5 11:04 x -> /$SYSNAME/etc
LIH1:BUBBA:/home/bubba$
cd x
LIH1:BUBBA:/home/bubba/x$
df .
Mounted on     Filesystem                Avail/Total    Files      Status

/LIH1/etc      (OMVS.I17RS1.LIH1.ETC)    34308/40320    4294966929 Available


The $SYSNAME does not resolve to just the system name. It may __only__ be
used as the first portion of the SYMLINK and it always resolves starting at
the UNIX root directory. If you ever need to use the system name as a
directory not beginning from "root", such as /home/bubba/<<system name>>,
you need to use the $SYSSYMR

cd /home/bubba
mkdir SY1 # System one's &SYSNAME
mkdir SY2 # System two's &SYSNAME
ln -s \$SYSSYMR/current-system


Then /home/bubba/current-system would resolve to /home/bubba/SY1 on SY1 and
/home/bubba/SY2 on SY2.

ref:
https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.bpxb200/mountsym.htm
​
​From the about the &SYSNAME can be any defined static system symbol​



-- 
"Pessimism is a admirable quality in an engineer. Pessimistic people check
their work three times, because they're sure that something won't be right.
Optimistic people check once, trust in Solis-de to keep the ship safe, then
blow everyone up."
"I think you're mistaking the word optimistic for inept."
"They've got a similar ring to my ear."

>From "Star Nomad" by Lindsay Buroker:

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to