Sponsored Content
Top Forums UNIX for Beginners Questions & Answers 0403-016 Cannot find or open the file in If Statement Post 303032449 by MIA651 on Monday 18th of March 2019 01:43:59 PM
Old 03-18-2019
0403-016 Cannot find or open the file in If Statement

Hi,

I am comparing the number of records in the .bad record from sql loader, if it is higher than the number passed in as an argument, the program should exit. However, I constantly receive the error "
Code:
0403-016 Cannot find or open the file.

" on the line with the if statement "elif [ $bad_record_count <= $error_limit ];". The code is below and error_limit=$1. Any help is appreciated.

Code:
if [[ $chksanret = 0 ]]; then
   sqlldr CONTROL=$LOAD_HOME/lndcntl/mrkdwndly.ctl LOG=$LOAD_HOME/loadresults/mrkdnasapbar.log  \
      BAD=$LOAD_HOME/loadresults/mrkdnasapbaz.bad DATA=$LOAD_HOME/$fnamem     \
      USERID=$OSLDR ERRORS=999 DISCARD=$LOAD_HOME/loadresults/mrkdnasaptoss.dis \
      DISCARDMAX=5 DIRECT=TRUE
   retcode=`echo $?`
   bad_record_count=$(< $LOAD_HOME/loadresults/mrkdnasapbaz.bad wc -l)
   if [[ $retcode = 0 ]]
   then
     cp $LOAD_HOME/$fnamem $LOAD_HOME/ARCHIVE/LND_ASAP_PRCCHG_DYLY.txt_$DATE
   elif [ $bad_record_count <= $error_limit ];
   then
     cp $LOAD_HOME/$fnamem $LOAD_HOME/ARCHIVE/LND_ASAP_PRCCHG_DYLY.txt_$DATE
   else
     exit 12
   fi
else
   exit $chksanret


Last edited by RudiC; 03-19-2019 at 05:52 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getting error 0403-016 Cannot find or open the file while reading a long line

Hi, I have an requirement of reading a long line of 7000 chars and cutting it iam doing this : while read -r x do echo $x ......... done < `cat filename` when iam doing this it is giving me "0403-016 Cannot find or open the file." Can anyone let how this can be done. (2 Replies)
Discussion started by: karthee
2 Replies

2. UNIX for Dummies Questions & Answers

0403-015 - Cannot access a required executable file. It is in use.

How is this error resolved please? I'm just trying to run a shell script and am getting this error. All file permissions are fine. Thanks (0 Replies)
Discussion started by: miwinter
0 Replies

3. Solaris

Error Message: find: cannot open /: Stale NFS file handle

I am using the "find" command below and it respond with the error message " find: cannot open /: Stale NFS file handle" what does it mean? what can I do about it? Need advice, thanks. below are the command that I enter, the respond and the error message: root@ScripServer:/# find / -name... (1 Reply)
Discussion started by: ezsurf
1 Replies

4. Shell Programming and Scripting

Script Error: 13192.sumr: 0403-016 Cannot find or open the file.

Hello, i am familiar enough with unix to do some damage but thats about it. We have a set of RS/6000 43P Model 150's running AIX for our Catia V4 programmers. back in the 90's a script was written to automate the conversion of files into machine code. that script has started giving us... (0 Replies)
Discussion started by: jgruenwald
0 Replies

5. Shell Programming and Scripting

For loop find statement file name manipulation

for i in `find . -name "*.BEFORE_DISASTER_RECOVERY"`;do dir_name=`dirname $i`;file_name=`basename $i`;cd $dir_name;mv $file_name (STUCK HERE) ;pwd;cd $BASE_DIR;done Okay, so I was able to get to this point. As you can see, I have a small for loop that searches for any files with the string... (5 Replies)
Discussion started by: cbo0485
5 Replies

6. SCO

Error: msgcnt 1 vxfs: mesg 016: vx_ilisterr - / file system error reading

Hello... i got an error in my SCO OpenServer 6. the error is: msgcnt 1 vxfs: mesg 016: vx_ilisterr - / file system error reading inode 373 Can anyone help me? (1 Reply)
Discussion started by: AndryMB
1 Replies

7. Shell Programming and Scripting

Newbie.. Find if a file exists and open, if not create the desired file..

Hey all, I'm brand new to script writing, I'm wanting to make a script that will ask for a file and then retrieve that file if it exists, and if it doesn't exist, create the file with the desired name, and I'm completely stuck.. so far.. #! bin/bash echo "Enter desired file" read "$file" if ... (5 Replies)
Discussion started by: Byrang
5 Replies

8. Shell Programming and Scripting

Nothing is getting displayed on browser while using open statement

Hi, I have the below script which is working fine on cmd line, but nothing gets displayed on browser. There is no permission issue. If i remove the open statement and print some other data. Its working fine on browser. Kindly help. #!c:/perl/bin/perl use Win32::ODBC; use CGI ':standard';... (19 Replies)
Discussion started by: miteshpant
19 Replies

9. UNIX for Dummies Questions & Answers

Statement to find if an entry exists in a file

I need to check if an entry input by the user is in a file. If so, I need to run a command, and if it does not exist then it should output entry does not exist. So I have so far... echo "Enter record:" read record //command || //command Can I use an if statement to do this? (3 Replies)
Discussion started by: itech4814
3 Replies

10. Shell Programming and Scripting

[Solved] 0403-057 Syntax error for if statement

I am getting the following error when I am running a script in ksh when trying to execute an if statement comparing two numerical values tstmb.sh: 1.5321e+08: 0403-057 Syntax error Below is my code snippet. #!/bin/ksh set -x TODAY=$(date +%y%m%d) for file in $(ls -rt *.log | tail... (11 Replies)
Discussion started by: kiran1112
11 Replies
PPI::Statement::Unknown(3)				User Contributed Perl Documentation				PPI::Statement::Unknown(3)

NAME
PPI::Statement::Unknown - An unknown or transient statement INHERITANCE
PPI::Statement::Unknown isa PPI::Statement isa PPI::Node isa PPI::Element DESCRIPTION
The "PPI::Statement::Unknown" class is used primarily during the lexing process to hold elements that are known to be statement, but for which the exact "type" of statement is as yet unknown, and requires further tokens in order to resolve the correct type. They should not exist in a fully parse valid document, and if any exists they indicate either a problem in Document, or possibly (by allowing it to get through unresolved) a bug in PPI::Lexer. METHODS
"PPI::Statement::Unknown" has no additional methods beyond the default ones provided by PPI::Statement, PPI::Node and PPI::Element. SUPPORT
See the support section in the main module. AUTHOR
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2001 - 2011 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.16.2 2011-02-25 PPI::Statement::Unknown(3)
All times are GMT -4. The time now is 06:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy