- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Problem in log generation in USS
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2007 06:21 AM
04-17-2007 06:21 AM
I am getting an error.
This is the part of the script which is giving an error. I want the output to be on the screen and also a log should be generated.
tee ../logs/build_bo_jar.log >/dev/tty |&
exec 2>&p 1>&2
Error is
exie 19: FSUM7341 bad file descriptor "p"
zOS 1.6 [/indus2/icapi/fw600/scripts]
Thanks in Adwance
Solved! Go to Solution.
- Tags:
- redirect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2007 06:35 AM
04-17-2007 06:35 AM
Re: Problem in log generation in USS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2007 04:14 AM
04-18-2007 04:14 AM
Re: Problem in log generation in USS
UNIX System Services allows UNIX applications from other platforms to run on IBM mainframes.
USS is a certified UNIX implementation (XPG4 UNIX 95) optimized for mainframe architecture.
Through integration with the rest of z/OS, additional time share option (TSO) commands are available alongside the usual UNIX services, making it possible to process UNIX files using ISPF. Extensions in JCL make it possible to use these files in batch processing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2007 03:48 PM
04-18-2007 03:48 PM
Re: Problem in log generation in USS
I can't see &p (co-process) as being valid in UNIX95 through UNIX2003. So it seems that USS doesn't have to support it.
I would also think that would make |& useless.
(Right, I don't see it in UNIX2003.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2007 01:56 PM
04-21-2007 01:56 PM
Re: Problem in log generation in USS
is there any other way of generating a log in USS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2007 05:29 PM
04-21-2007 05:29 PM
Re: Problem in log generation in USS
cat ../logs/build_bo_jar.log 2>&1 |tee jarlog.log
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2007 10:06 PM
04-21-2007 10:06 PM
SolutionUnfortunately I believe build_bo_jar.log IS the log file. Of course that leads to a solution, output to the log file, then do a tail -f on that log file. Or a cat(1) when done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2007 09:40 AM
04-25-2007 09:40 AM
Re: Problem in log generation in USS
Thanks for your advices. I tried them but
This solution is not working.
It is just creating build_bo_jar.log and jarlog.log of 0 size.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2007 11:16 AM
04-25-2007 11:16 AM
Re: Problem in log generation in USS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2007 05:31 AM
05-01-2007 05:31 AM
Re: Problem in log generation in USS
Since its an interactive script (accepts input from user) so the log generation become more complex.
I want to print output on the console as well as the same output should go inside a log file.
Please suggest me a method
_____________________
#!/bin/ksh
##############################################################################
# Modification History
# 04/16/07 - Sandeep Dwivedi - Original Version
#
##############################################################################
export JAVAPATH=/usr/lpp/zWebSphere/V6R1/java/J5.0/bin
export ICDIR=/myregion/icapi/fw600
export CLASSPATH=$ICDIR/bometa_class:$ICDIR/webapps/apifw/WEB-INF/lib/apifw.jar:$ICDIR/bometa_class/com/mycompany/apibo/metadata/$1
clear
BONAME=$1
#-----------------------------------------------------------------#
# Sub routines
#-----------------------------------------------------------------#
exit_process()
{
echo "--------------------------------------------------------------------"
exit
}
#-----------------------------------------------------------------#
# Pre checks
#-----------------------------------------------------------------#
# Check if no BOName was provided and also prompt for a BOName
if [ $# -lt 1 ] ; then
echo "\nYou MUST include a BOName"
echo "\nTo view valid BOName's, Press Enter"
line
ls -C $ICDIR/bometa_javasrc/com/mycompany/apibo/metadata/
echo "\nYou must not include more than One BOName. Please provide a BOName : "
read BONAME
BONCNT1=`echo $BONAME|wc -w`
if [ $BONCNT1 -gt 1 ] ; then
echo "\nYou MUST not include more than one BOName\n"
exit_process
fi
if [ -z $BONAME ] ; then
echo "\nYou MUST include a BOName\n"
exit_process
fi
echo "\nBONAME is $BONAME"
fi
# Check if more than one BOName's are entered
if [ $# -gt 1 ] ; then
echo "\nYou MUST not include more than one BOName\n"
exit_process
fi
# Check whether the BOName is valid or not
echo "\nSearching for validity of BONAME in $ICDIR/bometa_javasrc/com/mycompany/apibo/metadata"
test -d $ICDIR/bometa_javasrc/com/mycompany/apibo/metadata/$BONAME
find_status=$?
if [ $find_status -gt 0 ] ; then
echo "\nBOName not found, Please specify a VALID BOName\n"
exit_process
fi
#-----------------------------------------------------------------#
# Main Program
#-----------------------------------------------------------------#
echo "Creating temporary directory temp$$"
mkdir $ICDIR/bometa_lib/temp$$
echo
echo "Compiling $BONAME source into class files"
$JAVAPATH/javac -verbose -classpath $CLASSPATH -d $ICDIR/bometa_lib/temp$$ $ICDIR/bometa_javasrc/com/mycompany/apibo/metadata/$BONAME/*.java
echo
echo "Copying $BONAME class files to the classes directory"
cp -r $ICDIR/bometa_lib/temp$$/* $ICDIR/bometa_class
echo
cd $ICDIR/bometa_lib/temp$$
echo "Creating jar file $ICDIR/bometa_lib/ICBO-$BONAME.jar"
$JAVAPATH/jar -cvf $ICDIR/bometa_lib/ICBO-$BONAME.jar ./*
echo
echo "Copying ICBO-$BONAME.jar to $ICDIR/webapps/apifw/WEB-INF/lib/ICBO-$BONAME.jar"
cp $ICDIR/bometa_lib/ICBO-$BONAME.jar $ICDIR/webapps/apifw/WEB-INF/lib/ICBO-$BONAME.jar
echo
cd $ICDIR
echo "Removing temporary directory temp$$"
rm -r $ICDIR/bometa_lib/temp$$
echo
exit_process
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2007 05:13 PM
06-26-2007 05:13 PM
Re: Problem in log generation in USS
(Add somewhere at the top)
TMP=/var/tmp/foo.log # add $$ if you have multiple occurrences
exec 3>&1 # save old stdout
exec 4>&2 # save old stderr, needed?
exec > $TMP 2>&1 # redirect both to $TMP
And in exit_process: (I'm sending to stdout vs /dev/tty, you can change that.)
# Copy from $TMP to log and to stdout:
cat $TMP >> ../logs/build_bo_jar.log
cat $TMP 1>&3
rm -f $TMP
- Tags:
- exec