The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Backup Script rajwinder Shell Programming and Scripting 1 02-03-2009 10:50 AM
Backup script - HELP :( c00kie88 Shell Programming and Scripting 1 05-13-2008 08:23 PM
Backup script dan86 Shell Programming and Scripting 1 10-29-2007 08:47 PM
A backup script pascal Shell Programming and Scripting 2 09-09-2005 09:53 AM
Help with a backup script SemperFi UNIX for Dummies Questions & Answers 5 07-22-2004 12:00 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 05-26-2009
j_aix j_aix is offline
Registered User
  
 

Join Date: May 2009
Posts: 5
AIX script, help I'm just a backup!

Hello, I am trying to get the following Lawson command to work in an AIX script for a developer and I'm stumped, the Admin for this server is on vacation and I have very limited AIX scripting knowledge, I cannot seem to get this to work no matter what I try...

lawcmp test900 ap HM500

This is a Lawson command (lawcmp) and is preceded by required variables which compile a job, when logged in as the user and typing it exactly as shown from the command line it works, however when I put that command in a script it doesn't run. Other parts of the script appear to be working ok, it's just this piece that's failing....I checked that the file permission's and owner for both the script and command were correct and they appear to be fine, the error messages indicate that it might not be able to find the right path but again, I am very limited with AIX scripting and unsure on how to fix this, please help!

exec(): 0509-036 Cannot load program lawcmp because of the following errors:
0509-150 Dependent module libsecls.so could not be loaded.
0509-022 Cannot load module libsecls.so.
0509-026 System error: A file or directory in the path name does not exist.

# ------------------------------------------------------------
# This script compiles a program from Zena
#-------------------------------------------------------------

if [ $# -lt 2 ]

then

echo "Not enough parameters supplied"

echo

echo " Usage: To compile programs"

echo " in the Production environment."

return

else

PGMNAME=$1

SYSCDIN=$2

ENVCODE=$3

echo " parameters set starting script "
fi
echo " system code" ${SYSCDIN}

SYSCODE=$SYSCDIN
#SYSCODE=$(expr "$SYSCDIN" : ".\(..\)")

LIBPATH="src"



LIBCODE=${SYSCODE}${LIBPATH}
echo ${LIBCODE}


typeset -l SYSCODE

typeset -u PGMNAME

typeset -l LIBCODE

typeset -l ENVCODE

echo "environment is " ${ENVCODE}

PL="test900"

#if [ ${ENVCODE} = " dev" ]
#
#then
#
# PL="test900"
#
#else
#
# PL="prod900"
#
#fi



typeset -l PL



echo "*****************************************************"

echo

echo " Compiling program "${PGMNAME}" in library "${LIBCODE}"."

echo

echo "*****************************************************"



cd /lawsonenv/app/${PL}/${LIBCODE}



#DESTINATION=/lawsonenv/app/${PL}/${LIBCODE}/

#echo "xxxx"${PL}"xxxxx"
#echo "xxxx"${SYSCODE}"xxx"
#echo "xxxx"${PGMNAME}"xxx"


#lawcmp ${PL} ${SYSCODE} ${PGMNAME}
lawcmp test900 ap HM500

DESTINATION=/lawsonenv/app/${PL}/${LIBCODE}/
if [ -a ${DESTINATION}${PGMNAME}.err ]

then

cat ${DESTINATION}${PGMNAME}.err

echo "Compile error!"

else

echo "Compile completed successfully!"

fi

Last edited by j_aix; 05-26-2009 at 12:59 PM.. Reason: added script
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0