Sponsored Content
Top Forums Shell Programming and Scripting AIX script, help I'm just a backup! Post 302319877 by j_aix on Tuesday 26th of May 2009 11:25:46 AM
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
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. AIX

Backup AIX to DVDs

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

6. 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

7. 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

8. 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

9. 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

10. 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
ROUND(3)								 1								  ROUND(3)

round - Rounds a float

SYNOPSIS
float round (float $val, [int $precision], [int $mode = PHP_ROUND_HALF_UP]) DESCRIPTION
Returns the rounded value of $val to specified $precision (number of digits after the decimal point). $precision can also be negative or zero (default). Note PHP doesn't handle strings like "12,300.2" correctly by default. See converting from strings. PARAMETERS
o $val - The value to round o $precision - The optional number of decimal digits to round to. o $mode - Use one of the following constants to specify the mode in which rounding occurs. +--------------------+---------------------------------------------------+ | Constant | | | | | | | Description | | | | +--------------------+---------------------------------------------------+ | | | | PHP_ROUND_HALF_UP | | | | | | | Round $val up to $precision decimal places away | | | from zero, when it is half way there. Making 1.5 | | | into 2 and -1.5 into -2. | | | | | | | |PHP_ROUND_HALF_DOWN | | | | | | | Round $val down to $precision decimal places | | | towards zero, when it is half way there. Making | | | 1.5 into 1 and -1.5 into -1. | | | | | | | |PHP_ROUND_HALF_EVEN | | | | | | | Round $val to $precision decimal places towards | | | the next even value. | | | | | | | |PHP_ROUND_HALF_ODD | | | | | | | Round $val to $precision decimal places towards | | | the next odd value. | | | | +--------------------+---------------------------------------------------+ RETURN VALUES
The rounded value EXAMPLES
Example #1 round(3) examples <?php echo round(3.4); // 3 echo round(3.5); // 4 echo round(3.6); // 4 echo round(3.6, 0); // 4 echo round(1.95583, 2); // 1.96 echo round(1241757, -3); // 1242000 echo round(5.045, 2); // 5.05 echo round(5.055, 2); // 5.06 ?> Example #2 $mode examples <?php echo round(9.5, 0, PHP_ROUND_HALF_UP); // 10 echo round(9.5, 0, PHP_ROUND_HALF_DOWN); // 9 echo round(9.5, 0, PHP_ROUND_HALF_EVEN); // 10 echo round(9.5, 0, PHP_ROUND_HALF_ODD); // 9 echo round(8.5, 0, PHP_ROUND_HALF_UP); // 9 echo round(8.5, 0, PHP_ROUND_HALF_DOWN); // 8 echo round(8.5, 0, PHP_ROUND_HALF_EVEN); // 8 echo round(8.5, 0, PHP_ROUND_HALF_ODD); // 9 ?> Example #3 $mode with precision examples <?php /* Using PHP_ROUND_HALF_UP with 1 decimal digit precision */ echo round( 1.55, 1, PHP_ROUND_HALF_UP); // 1.6 echo round( 1.54, 1, PHP_ROUND_HALF_UP); // 1.5 echo round(-1.55, 1, PHP_ROUND_HALF_UP); // -1.6 echo round(-1.54, 1, PHP_ROUND_HALF_UP); // -1.5 /* Using PHP_ROUND_HALF_DOWN with 1 decimal digit precision */ echo round( 1.55, 1, PHP_ROUND_HALF_DOWN); // 1.5 echo round( 1.54, 1, PHP_ROUND_HALF_DOWN); // 1.5 echo round(-1.55, 1, PHP_ROUND_HALF_DOWN); // -1.5 echo round(-1.54, 1, PHP_ROUND_HALF_DOWN); // -1.5 /* Using PHP_ROUND_HALF_EVEN with 1 decimal digit precision */ echo round( 1.55, 1, PHP_ROUND_HALF_EVEN); // 1.6 echo round( 1.54, 1, PHP_ROUND_HALF_EVEN); // 1.5 echo round(-1.55, 1, PHP_ROUND_HALF_EVEN); // -1.6 echo round(-1.54, 1, PHP_ROUND_HALF_EVEN); // -1.5 /* Using PHP_ROUND_HALF_ODD with 1 decimal digit precision */ echo round( 1.55, 1, PHP_ROUND_HALF_ODD); // 1.5 echo round( 1.54, 1, PHP_ROUND_HALF_ODD); // 1.5 echo round(-1.55, 1, PHP_ROUND_HALF_ODD); // -1.5 echo round(-1.54, 1, PHP_ROUND_HALF_ODD); // -1.5 ?> CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.3.0 | | | | | | | The $mode parameter was introduced. | | | | | 5.2.7 | | | | | | | The inner workings of round(3) was changed to | | | conform to the C99 standard. | | | | +--------+---------------------------------------------------+ SEE ALSO
ceil(3), floor(3), number_format(3). PHP Documentation Group ROUND(3)
All times are GMT -4. The time now is 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy