AIX script, help I'm just a backup!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting AIX script, help I'm just a backup!
# 1  
Old 05-26-2009
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
# 2  
Old 07-23-2009
After adding /lawson/gen/lib/shared to the PATH in the user's profile, su - userid -c 'sysdump P/L ...' worked.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX backup solutions

Currently I am backing up AIX to tape. I would like to setup a back that goes to another server either windows or linux that we already backup and send offsite automatically. Is this possible? Thanks (5 Replies)
Discussion started by: fierfek
5 Replies

2. AIX

Backup software for AIX

Hello, Looking for some backup software for AIX , once tivoli is bit expensive , i'm searching for alternatives, do you guys have some experience with some other software? Cheers, (6 Replies)
Discussion started by: prpkrk
6 Replies

3. Shell Programming and Scripting

Help with Backup Shell Script for Network Device Configuration backup

HI all, im new to shell scripting. need your guidence for my script. i wrote one script and is attached here Im explaining the requirement of script. AIM: Shell script to run automatically as per scheduled and backup few network devices configurations. Script will contain a set of commands... (4 Replies)
Discussion started by: saichand1985
4 Replies

4. AIX

backup linux like aix

Hello everyone I need to backup some boxes with redhat enterprise for power. I was looking for software but I need to umount filesystems,etc,etc. I need a software that backup like I do with my aix boxes. mksysb command and thatīs it. Because I need to do online, with no umount fs. ... (5 Replies)
Discussion started by: lo-lp-kl
5 Replies

5. AIX

backup on aix

Hello everyone I have a 3583 tape library on my Aix servers. (aix 5.3) Im install hypertape software for backup datebase, files, etc. I have a question. on my directory devices I have this rmt crw-rw-rwT 1 root system 42, 1 Jan 18 21:57 rmt1.1 crw-rw-rwT 1 root ... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

6. AIX

Backup AIX to DVDs

Hello, Is there a way to backup AIX to CD's? (1 Reply)
Discussion started by: aixn00b
1 Replies

7. AIX

Aix backup error

Hi I am receiving the following backup error when using backup -0uf /dev/rmt0.1 for the file system backup: Backing up /dev/rfslv00 (/u04) to /dev/rmt0.1. backup: 0511-251 The file system is still mounted; data may not be consistent. Use the umount command to unmount the filesystem;... (1 Reply)
Discussion started by: jimthompson
1 Replies

8. AIX

Backup script for Aix without tape mount

Hi, My situation is to write a backup script for AIX server which doesnt have a tape mounted. They have created a folder on windows so that all AIX backup files can be moved to that windows folder where they will put these AIX backup files on a tape. Appreciate help. Regards dsrules. (7 Replies)
Discussion started by: dsrules
7 Replies

9. UNIX for Advanced & Expert Users

help with AIX and backup command

:) Hi my name is Ricardo !!!! I am using backup command in order to backup a server which its running AIX operating system. But I want to backup more than one filesytem in my script, this script send my backup to /dev/rmt0 (tape drive). my trouble is that I donīt know how to tell my script... (1 Reply)
Discussion started by: rickie
1 Replies

10. AIX

AIX backup and restore

Hello, Some background so you can see what I'm trying to do on AIX: In Windows its possible to partition a single hard drive into 2 separate logical paritions which may appear as a C and a D drive. It is then possible to to use 3rd party software such as Power Quest Drive Image to create a... (3 Replies)
Discussion started by: quickfirststep
3 Replies
Login or Register to Ask a Question