× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



this was passed along to me by a fellow midranger.  I see nothing special
so I thought it ok
to post.

"You can either remove all links that point to qshellutib.lib and then
reinstall 5769ss1 option 30 or create the script below and run it in qshell
to change the symbolic link.

You can use the following script to manually correct the links. For each
incorrect link, the script will prompt the user to make sure it should be
replaced. Answer 'Y' or 'y' when prompted to correct the link. Copy the
script to the file /tmp/chkqshlnk.sh and then call the script from the
Qshell command line."


                #! /QSYS.LIB/QSHELL.LIB/QZSHSH.PGM

                 alias chown="/QSYS.LIB/QSHELL.LIB/CHOWN.PGM"
                 alias grep="/QSYS.LIB/QSHELL.LIB/GREP.PGM"
                 alias ln="/QSYS.LIB/QSHELL.LIB/LN.PGM"
                 alias ls="/QSYS.LIB/QSHELL.LIB/LS.PGM"
                 alias tr="/QSYS.LIB/QSHELL.LIB/TR.PGM"

                 # Set the utility list based on the release of this
system.

                 if [ "$QSH_VERSION" = "V4R4M0" ] ; then
                   utillist="BASENAME CAT CHGRP CHMOD CHOWN CLRTMP CP DATE
DIRNAME ECHO ENV EXPR FIND GETJOBID GREP HEAD HOSTNAME ID LN LOGGER LOGNAME
LS MKDIR MV PR PWDX RM RMDIR SPLIT SYSTEM TAIL TEE TOUCH UNAME UNIQ"
                   alias tr="/QSYS.LIB/QSHELLUTIL.LIB/TR.PGM"

                 elif [ "$QSH_VERSION" = "V4R5M0" ] ; then
                   utillist="BASENAME CAT CHGRP CHMOD CHOWN CLRTMP CMP
COMPRESS CP CUT DATE DIRNAME DSPMSG ECHO EGREP ENV EXPR FILE FGREP FIND
GETJOBID GREP HEAD HOSTNAME ID LN LOGGER LOGNAME LS MKDIR MV OD PAX PR PWDX
RM RMDIR SED SETCCSID SORT SPLIT SYSTEM TAIL TEE TEST TOUCH TR UNAME
UNCOMPRESS UNIQ WC XARGS ZCAT"

                 elif [ "$QSH_VERSION" = "V5R1M0" ] ; then
                   utillist="BASENAME CAT CHGRP CHMOD CHOWN CLRTMP CMP
COMPRESS CP CUT DATE DIRNAME DSPMSG ECHO EGREP ENV EXPR FILE FGREP FIND
GETJOBID GREP HEAD HOSTNAME ID LN LOGGER LOGNAME LS MKDIR MKFIFO MV OD PAX
PR PWDX RM RMDIR SED SETCCSID SORT SPLIT SYSTEM SYSVAL TAIL TAR TEE TEST
TOUCH TR UNAME UNCOMPRESS UNIQ WC XARGS ZCAT"

                 else
                   print "Release $QSH_VERSION is not supported by this
script."
                   exit 1
                 fi

                 for util in $utillist ; do
                   badlink=0
                   program=$util
                   util=$(print $util | tr 'A-Z' 'a-z')
                   link=$(ls -l /usr/bin/$util)
                   print $link | grep -q "QSYS "
                   if [ "$?" -ne 0 ] ; then
                     badlink=1
                   fi
                   link=${link##*-> }
                   print $link | grep -q
"/QSYS.LIB/QSHELL.LIB/$program.PGM"
                   if [ "$?" -ne 0 ] ; then
                     badlink=2
                   fi
                   if [ "$badlink" -eq 0 ] ; then
                     print "Link /usr/bin/$util is correct."
                   else
                     if [ "$badlink" -eq 1 ] ; then
                       print "The owner for link /usr/bin/$util is wrong.
                              Do you want to correct the link?"
                     else
                       print "Link /usr/bin/$util should not point to
                           $link.  Do you want to correct the link?"
                     fi
                     read
                     if [ "$REPLY" = "Y" -o "$REPLY" = "y" ] ; then
                       ln -sf /QSYS.LIB/QSHELL.LIB/$program.PGM
/usr/bin/$util
                       rc1=$?
                       chown -h QSYS /usr/bin/$util
                       rc2=$?
                       if [ "$rc1" -ne 0 -o "$rc2" -ne 0 ] ; then
                         print "Error correcting link /usr/bin/$util"
                       fi
                     fi
                   fi
                 done





-------------------------
 Bryan Dietz
3X Corporation

=======================================================

I just reinstalled QSH (based on conversations here). Some of the command
links (owned by QSYS) point to QSHELL.LIB; others (owned by me???) point to
QSHELLUTIB.LIB. Is there a command or script to reset the symlinks?

Does anyone know if regular GNU utilities might be usable under QSH? (gcc
would be nice)

Loyd




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.