Weird error after excutiong, completed fine though

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Weird error after excutiong, completed fine though
# 1  
Old 12-08-2016
Weird error after excutiong, completed fine though

Hi Guys -

I'm getting the following error when I run my script:

Code:
which: no Data_Export.sh in (.)

However, my code completes with fine with a return code of 0. The above error message gets directed to my error file.
Any ideas?

Here is my script:

Code:
#source /u01/Hyperion_Batch/Scripts/Batch/_env.sh

#::-- Set Script Name --::#
_SN=${0##*/}

#::-- Set Path Variables --::

cd $HOME

_MAINPATH=$(pwd)/Hyperion_Batch/
_LOGPATH=Logs/
_ERRORPATH=Errors/
_SCRIPTPATH=Scripts/
_MAXLPATH=Scripts/MaxL/
_FILEPATH=Files/
_EXPORTPATH=Exports/

#::-- Set Log & Error subdirectory pertaining to specific process --::#

_PLOGPATH=Data_Export_Logs/
_PERRORPATH=Data_Export_Errors/

#::-- Set Date and Time Variable --::#
_DAY=$(date +%d)
_MONTH=$(date +%m)
_YEAR=$(date +%Y)
_DATESTAMP=${_YEAR}${_MONTH}${_DAY}
_HOUR=$(date +%H)
_MINUTE=$(date +%M)
_SECOND=$(date +%S)
_TIME=${_HOUR}${_MINUTE}
_DATETIMESTAMP=${_DATESTAMP}_${_TIME}

#::-- Establish STDOUT and STDERROR repositories --::
_ARC_LP=${_MAINPATH}${_LOGPATH}${_PLOGPATH}${_YEAR}_${_MONTH}${_DAY}
_ARC_EP=${_MAINPATH}${_ERRORPATH}${_PERRORPATH}${_YEAR}_${_MONTH}${_DAY}
    
mkdir -p ${_ARC_LP}
mkdir -p ${_ARC_EP}

#::-- Prepare File Name Format --::#
_FN=${_TIME}_${_SN%%.sh*}

#::-- Establish STDOUT and STDERROR files --::#
_LF=${_ARC_LP}/${_FN}.log
_EF=${_ARC_EP}/${_FN}.err
_MLF=${_ARC_LP}/${_FN}_MAXL.log

#::-- Direct STDOUT and STDERROR to repositories --::# 
exec 2>${_EF} > ${_LF}

#::-- Set MaxL Specific Variables --::#
_ESSB_USER=admin
_ESSB_PSWD=welcome1
_ESSB_SRVR=exalytics-madc-01.peloton.lan
_ESSB_APP=AUTODEMO
_ESSB_DB=FIN_PLAN

_DATA_EXPORTPATH=${_MAINPATH}${_FILEPATH}${_EXPORTPATH}
_EXPORTTYPE=ALL_DATA

_STARTMAXL=/u02/EssbaseServer/essbaseserver1/bin/startMaxl.sh

#::-- Export Script Variables --::#

export _MAINPATH _LOGPATH _ERRORPATH _SCRIPTPATH _MAXLPATH _FILEPATH _EXPORTPATH _ESSB_USER _ESSB_PSWD  
export _MAXLLOGFILE _DATA_EXPORTPATH _EXPORTTYPE _STARTMAXL _ESSB_SRVR _ESSB_APP _ESSB_DB 
 
#:: Begin Script Processing --::#
echo ---------------------------------------------------------
echo "Begin ${_SN%%.sh*} Process at ${_TIME}"                           
echo                                                                                                        
echo "Execute All Data Export against ${_ESSB_APP}"                                         
echo ---------------------------------------------------------

. ${_STARTMAXL} ${_MAINPATH}${_MAXLPATH}All_Data_Export.mxl ${_ESSB_USER} ${_ESSB_PSWD} ${_ESSB_SRVR} ${_ESSB_APP} ${_ESSB_DB} ${_DATA_EXPORTPATH} ${_EXPORTTYPE} ${_YEAR}${_MONTH}${_DAY} ${_MLF}

if [ $? -eq 0 ]
then
  echo ---------------------------------------------------------
  echo "Essbase All Data Export Successful"                           
  echo ---------------------------------------------------------
  exit 0
  
else
  echo ---------------------------------------------------------
  echo "Essbase All Data Export Unsuccessful"                      
  echo ---------------------------------------------------------
  exit 1
  fi

Here is my log file:

Code:
---------------------------------------------------------
Begin Data_Export Process at 1638

Execute All Data Export against AUTODEMO
---------------------------------------------------------

 Essbase MaxL Shell 64-bit - Release 11.1.2 (ESB11.1.2.4.008B019)
 Copyright (c) 2000, 2016, Oracle and/or its affiliates.
 All rights reserved.

MAXL> login admin welcome1 on exalytics-madc-01.server;

 OK/INFO - 1051034 - Logging in user [admin@Native Directory].
 OK/INFO - 1241001 - Logged in to Essbase.

MAXL> export database AUTODEMO.FIN_PLAN all data to data_file "/home/oracle/Hyperion_Batch/Files/Exports/20161208_AUTODEMO_FIN_PLAN_ALL_DATA.txt";

 OK/INFO - 1005031 - Parallel export completed for this export thread. Blocks Exported: [347]. Elapsed time: [0.25]..
 OK/INFO - 1005002 - Ascii Backup Completed. Total blocks: [347]. Elapsed time: [0.25]..
 OK/INFO - 1005049 - Export completed. Total blocks: [347] Empty blocks: [22] Total empty cells: [3025952] Elapsed time: [0.25] secs.
 OK/INFO - 1013270 - Database export completed ['AUTODEMO'.'FIN_PLAN'].

MAXL> logout;

      User admin is logged out


  MaxL Shell completed

---------------------------------------------------------
Essbase ll Data Export Successful
---------------------------------------------------------

# 2  
Old 12-08-2016
Your code contains no 'which' statement, so it must be in some script this script is running.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Weird Error (: No such file or directory)

Hi Everyone, I am trying to make this script to use, to find out the DAHDI channel status. Every thing works fine, I even get proper results, however I have this weird error that comes along. Can someone please help me. Thanks a lot. #!/bin/bash # Color to set the test to when a channel is... (3 Replies)
Discussion started by: jeetz
3 Replies

2. Shell Programming and Scripting

awk weird error

Here is the awk code i wrote : if ; then gawk -v field_position="$field_position" -v field_length="$field_length" -v header="$header" -v trailer="$trailer" -v lr="$lr" '{ if(NR==1&&header=="1") { next } if(NR==lr&&trailer=="1") { next }... (1 Reply)
Discussion started by: ysvsr1
1 Replies

3. Shell Programming and Scripting

Weird Perl error using db2.

I have having a heck of a time figuring this out so any help is much appreciated. Here is the code where it seems to be dying, I bolded the part it is complaining about: $sth = $dbh->prepare( $query ) or die "error with query\n"; $sth->execute() or die "error executing query ...\n"; while(... (1 Reply)
Discussion started by: savigabi
1 Replies

4. Shell Programming and Scripting

Getting Command not found error Even though Script is working fine

Hi friends, I am using below script to do some work. But even though script is working fine but while executing it i am getting command not found error. :( Here is the script :- #!/bin/sh Names="name.txt" ###main##### for LINE in `cat ${Names}` do ... (3 Replies)
Discussion started by: harpal singh
3 Replies

5. UNIX for Dummies Questions & Answers

Weird Error moving a file

Hi, We are running into very weird error on AIX. Target directory exists on NFS. We have one script runs every 5 mins on our system. This script is running for 5 years for now without any issuess. Followig is the snapshot of the script : stmt_cnt=$(ls -1 ${1}/${2}|wc -l) if ;... (7 Replies)
Discussion started by: himihir2000
7 Replies

6. Ubuntu

Need help with a weird sudo error.

I'm fairly new to unix and I was trying to change the name of my host and my user. I changed the name in /hostname using this: gksudo gedit /etc/hostname I then tried changing the name back but it still gave the same error: {env_reset,... (1 Reply)
Discussion started by: H3jck
1 Replies

7. Programming

getting Segmentation Fault (core dumped) error but Program runs fine.

i am executing following program int main() { char str; FILE * fp; int i=0; ... (4 Replies)
Discussion started by: bhavesh.sapra
4 Replies

8. Shell Programming and Scripting

Weird unbalanced quotes error

hi all, i am writing a wrapping script to burn subtitle into video file using transcode. I got this very weird error: code: inFile="movie.avi" subFile="sub.srt" outFile="movie_sub.avi" strExc="-i $inFile -x 'mplayer=-sub $subFile' -w $vidBR -o $outFile -y xvid" echo "transcode $strExc"... (2 Replies)
Discussion started by: tduccuong
2 Replies

9. Programming

C - advice how to catch some weird error

I have some unstable mistake in my program and out-of-idea how to catch it. I am looking for advice with a way to work it out! I have in a pretty complicated program (but one source file) set of int-counters - 15, if exactly. Lately, on final printout I have inpossible value (I am... (3 Replies)
Discussion started by: alex_5161
3 Replies

10. Web Development

weird 500 Internal server error

Hi All, I am seeking some help. While trying to access my website: EDITED (hosted on private server somewhere - don't want to publicize names) - I have a weird behaviour: I can always get to the site - but some applications get a 500 Internal error. If I use FireBug (mozilla addon) I can... (2 Replies)
Discussion started by: saariko
2 Replies
Login or Register to Ask a Question