Processing multiple files (environment setting)

Hello

I posted on here a while ago about processing multiple files within a script.
See original post below:

I have a program cfxfrwb which is designed to remove headers from reports files.
The cfxfrwb is located in the following directory /u01/efin/v40/live/bin

I run the program against a single report file in the temp directory and it does it's job.

./cfxfrwb /home/efin/efintran/temp/cli_r02r0051.prt

I'd like to run the ./cfxfrwb against several report files.

I modified a script I found on the web but it doesn't seem to work

#!/bin/bash
FILES=/home/efin/efintran/temp/*
for f in $FILES
do cfxfrwb
  echo "Processing $f file..."
  # take action on each file. $f store current file name
  cat $f
done

I'd be grateful if someone could offer some assistance.

Many thanks

The problem was solved by using the following:

#!/bin/bash
FILES=/home/efin/efintran/temp/*
for f in $FILES
do 
/u01/efin/v40/live/bin/cfxfrwb $f
echo "Processing $f file..."
# take action on each file. $f store current file name

We have recently upgraded our systems and my script has stopped working again. We have different file paths.
The cfxfrwb program will work if it runs against files individually

for example /u01/efin/v42/live/bin/cfxfrwb act_r09r3817.prt ...this processes the file act_r09r3817.prt as expected and removes it's header.

when it is executed within the script it returns an error:

Removing headers from report files \n
./efdsx_trans: line 209: 18443 Segmentation Fault      (core dumped) /u01/efin/v42/live/bin/cfxfrwb $f
Processing /export/home/efin/efintran/temp/act_r09r3814.prt file...

We have discovered that the cfxfrwb program will only work when the environment has been set. I have looked at the settings within the environment and included them in my script but it still returns core dump errors.

Anyone have any ideas?
Many thanks

My crystal ball is in the repair shop today. Without seeing the code that is dropping core, seeing how the environment being used by the code that is dropping core is established, and the context in which that code is being run; it is going to be difficult for most of us to guess at what is wrong.

Hello Don

Thanks for the reply

Here are the environmental settings we set which will allow the cfxfrwb program to work when processing an individual file:

ALTORATAB=/cedar/efin/bin/oratab
ANumber=1
ATarget=pre-live
BASEPATH=/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
C='\c'
CFXHOME=/cedar/efin/v42/live
CFXSVMODE=2
CFXTAB=/cedar/efin/bin/cfxtab.tab
Choice=1
DEV2K_HOME=/cedar/oracle/Middleware/Oracle_FRHome1
DISPLAY=''
ERRNO=25
FCEDIT=/bin/ed
FORMS_PATH=/cedar/efin/v42/live/lib
FORMS_TERMINAL=/cedar/efin/v42/live/bin
HOME=/export/home/efin
IFS='
'
LC_CTYPE=en_GB.ISO8859-15
LC_MESSAGES=C
LC_MONETARY=en_GB.ISO8859-15
LC_NUMERIC=en_GB.ISO8859-15
LC_TIME=en_GB.ISO8859-15
LD_LIBRARY_PATH=dummy:/cedar/oracle/Middleware/Oracle_FRHome1/lib:/cedar/oracle/Middleware/Oracle_FRHome1/jdk/jre/lib/amd64/native_threads:/cedar/oracle/Middleware/Oracle_FRHome
1/jdk/jre/lib/sparcv9/native_threads:/cedar/oracle/Middleware/Oracle_FRHome1/jdk/jre/lib/sparcv9/server
LINENO=1
LOGNAME=efin
MAIL=/var/mail//efin
MAILCHECK=600
N=''
NLSPATH=dummy:/cedar/efin/v42/live/bin/%N
OLDPS1='[hrbs01efinas]$PWD>'
OLDPWD=/export/home/efin
OPTIND=1
ORACLE_DOC=/cedar/oracle/Middleware/Oracle_FRHome1/odoc
ORACLE_HOME=/cedar/oracle/Middleware/Oracle_FRHome1
ORACLE_INSTANCE=/cedar/oracle/Middleware/asinst_1
ORACLE_SID=EFINL
ORACLE_TERM=vt220
ORATAB=/cedar/efin/bin/oratab
PATH=/cedar/efin/v42/live/bin:/cedar/oracle/Middleware/Oracle_FRHome1/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
PPID=28503
PS1='hrbs01efinas-efin-pre-live>'
PS2='> '
PS3='#? '
PS4='+ '
PWD=/cedar/efin/v42/live
RANDOM=10625
RDBMS_HOME=/cedar/oracle/Middleware/Oracle_FRHome1/
SECONDS=141
SECURITYID=security/security
SHELL=/bin/ksh
SSH_CLIENT='192.168.1.195 55524 22'
SSH_CONNECTION='192.168.1.195 55524 192.168.3.106 22'
SSH_TTY=/dev/pts/2
TERM=xterm
TMOUT=0
TNS_ADMIN=/cedar/oracle/Middleware/asinst_1/config
TWO_TASK=EFINL
TZ=GB
TheChoice=1
USER=efin
_=set

Below is the entire script

# Script to copy latest efin Reports V403 to a new file for today
  and then transfer them to Datastore
#
# Mar 2013 BM
#
DSDIR=/app/MSS/PROD/print_outs/ds export DSDIR
TODAY=`date '+%b%d'` export TODAY
MONTH=`date '+%b%y'` export MONTH
HOST='192.168.1.22'
USER='xxxxxx'
PASSWD='xxxxx'
#
clear
#
echo "Moving previous EFIN file to /u01/efin/v40/live/report/archive/bon.\n"
#
cd /export/home/efin/efintran/temp
#
mv * /u01/efin/v42/live/report/archive/bon
#
echo ""
#
echo "Done.\n"
#
# Change to home directory /jrie
#
echo "Moving to efin user reports folder \n"
#
cd /u01/efin/v42/live/report/jrie
#
echo "Transfering e-fin reports to temporary folder \n"
#
cp cli_r02*.prt /export/home/efin/efintran/temp
#
cp cli_r04*.prt /export/home/efin/efintran/temp
#
cp act_r07r*.prt /export/home/efin/efintran/temp
#
cp act_r09r*.prt /export/home/efin/efintran/temp
#
cp act_r90r*.prt /export/home/efin/efintran/temp
#
cp act_r92r*.prt /export/home/efin/efintran/temp
#
cp act_r93r*.prt /export/home/efin/efintran/temp
#
cp act_r38r*.prt /export/home/efin/efintran/temp
#
echo ""
#
echo "Done.\n"
#
cd /u01/efin/v42/live/bin
#
echo ""
#
echo "Removing headers from report files \n"
#
#!/bin/bash
FILES=/export/home/efin/efintran/temp/*
for f in $FILES
do
/u01/efin/v42/live/bin/cfxfrwb $f
  echo "Processing $f file..."
  # take action on each file. $f store current file name
done
#
echo "Sticking files together \n"
#
cd /export/home/efin/efintran/temp
#
cat cli_r02*.prt > /export/home/efin/efintran/temp/efinr02$TODAY
#
cat cli_r04*.prt > /export/home/efin/efintran/temp/efinr04$TODAY
#
cat act_r07r*.prt > /export/home/efin/efintran/temp/efin$TODAY
#
cat act_r09r*.prt >> /export/home/efin/efintran/temp/efin$TODAY
#
cat act_r90r*.prt >> /export/home/efin/efintran/temp/efin$TODAY
#
cat act_r92r*.prt >> /export/home/efin/efintran/temp/efin$TODAY
#
cat act_r93r*.prt >> /export/home/efin/efintran/temp/efin$TODAY
#
cat act_r38r*.prt >> /export/home/efin/efintran/temp/efin$TODAY
#
echo "Removing empty spaces from efin files \n"
#
sed '/^$/d' efinr02$TODAY > efinr02a$TODAY
#
sed '/^$/d' efinr04$TODAY > efinr04a$TODAY
#
sed '/^$/d' efin$TODAY > efinall$TODAY
#
rm efinr02$TODAY
#
rm efinr04$TODAY
#
rm efin$TODAY
#
echo "*** Connecting to the DSX Server for file transfer *** \n"
#
ftp -n -v $HOST <<EOF
type ascii
user $USER $PASSWD
cd ..
cd efin
put efinr02*
put efinr04*
put efinall*
bye
/
EOF
#

Basically this script:
goes into a user's directory,
copies some report files to a temp directory,
attempts to process the files using cfxfrwb (which strips out the headers of the report files),
Cats the files together,
FTPs the files over to a document archive device.

As mentioned before , setting the enviroment above will allow cfxfrwb to process an individual report file but it errors when processing a directory full.

Someone mentioned that the #!/bin/bash statement will override the environment settings (I tried removing it and it still errored). I have also tried just setting the enviroment and manually executing

FILES=/export/home/efin/efintran/temp/*
for f in $FILES
do
/u01/efin/v42/live/bin/cfxfrwb $f
done

still errors.

Many thanks for having a look.
Maybe I'm missing something obvious here..I don't know.

---------- Post updated at 01:33 PM ---------- Previous update was at 01:30 PM ----------

Sorry...I used the wrong code tag...Could a moderator please amend my tags if possible?

Thanks

First: You don't need a moderator to edit your post for you. (Although I was happy to edit your script for you this time.) There is an "Edit" button in the lower right corner of every post you submit. You can click on that button and edit your own post.

Second: You have now shown us the script that is calling the script that is dropping core. But you have not shown us the script that is calling something on line 209 that is dropping core. We need to see the script named efdsx_trans )which is the script that the diagnostic messages you showed us in post #1 in this thread came from.

Hello Don

The name of the script is

efdsx_trans

It's a bit misleading as I edited the script before posting (it goes into about 5 different user's accounts to retrieve files, I trimmed out 4 of the users).

I've edited the script now so that it is the same as the one in the previous post.

Moving previous EFIN file to /u01/efin/v40/live/report/archive/bon.


Done.

Moving to efin user reports folder

Transfering e-fin reports to temporary folder

cp: cannot access act_r07r*.prt

Done.


Removing headers from report files

./efdsx_trans[63]: 488 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3814.prt file...
./efdsx_trans[63]: 489 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3816.prt file...
./efdsx_trans[63]: 492 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3817.prt file...
./efdsx_trans[63]: 497 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3825.prt file...
./efdsx_trans[63]: 505 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3827.prt file...
./efdsx_trans[63]: 513 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3860.prt file...
./efdsx_trans[63]: 517 Segmentation Fault(coredump)
Processing /export/home/efin/efintran/temp/act_r09r3869.prt file...

Thanks again for looking

OK. So, now that the output from the script shown above comes from the script you showed us, we can now get a better idea of what is going on. And specifically, the diagnostics of the form:

./efdsx_trans[Line#]: Process-ID Segmentation Fault(coredump)

as in:

./efdsx_trans[63]: 488 Segmentation Fault(coredump)

Tells us that Process ID 488 dropped core due to a segmentation fault and that it was invoked from line # 63 in the script efdsx_trans which is:

/u01/efin/v42/live/bin/cfxfrwb $f

and, from the echo statement on line #64 in that script, we know that $f expanded to /export/home/efin/efintran/temp/act_r09r3814.prt this time through the loop.

So, now you need to look at cfxfrwb and find out why it is dropping core as it processes that file. So, if you can't track down the problem with this new information, show us the source for that utility and the stack trace from the core dump it produced when it died.

Hello

cfxfrwb looks like this...no idea if that is of any use.

[hrbs01efinas]/u01/efin/v42/live/bin>vi cfxfrwb
"cfxfrwb" [Incomplete last line] 188 lines, 42360 characters (17997 null)
^?ELF^B^B^A^F^A^B+^A^A^T\210@\236x@8^F@^\^[^F^E@^A@^AP^AP^C^D^A\220^A^A\220^Y^Y^A^E^A\@\@^P^A^G\@^A^P\@^Y�^\@^P^B^Gd�^A^Pd�^B\220dd�P^D^A�^A^A�^L^L^H/usr/lib/sparcv9/ld.so.1^A^[
^C;^Pe�GH^A^B^C^D^F^G^H^K^M^O^P^R^S^W^X^Z^[^]!"#%'(+,.1235789:;=>@ABCDFG^E
^L^N^Q^T^U^V^Y^\^^^_ $&)*-/046<?E^A^R^A^Pb^G^Q^W^A^Pxx^H^P^R^A^Pc^H!^W^A^Pxx^H^W^R^A^Pa*^]^R^A^Pb*$^R^A^Pa�*^R
^AM�^C(?^R
^A2p^AtK^R^A^Pa�Q^R^A^Pd�X l^R^A^P`\200s^R^A^Pb�}^R
^A^V\204^KP\202^R
^A0\^\\225 �^R
^A^T\210\224�^R^A^Pa@�^R^A^Pd`�^R
^A,�^C^D�^Q^O^A^P`�^R^A^Pb �^Q^M^AU�^D�^R^A^Pd@^A^E^R^L^AU�^T^A^K^R
^AR�^B\200^A^N^R
^A4^\\220^A^U^R^A^Pd^A^[^R^A^Pc�^A"^R^A^Pc\200^A/^R^A^Pa\200^A7^Q^A=^R^A^Pc@^AF^R^K^AU�^\^AL^Q^M^A\@^AS^R^A^Pd*^AZ^R
^A$^P^A�^Ac^R
^A+\234^A(^An^R
^A/�X^A^?^R^A^Pd ^A\207^Q^P^A^Pd�^A\220^R
^AE*^B*^A�^R
^A0x<^A>^R^A^Pc ^A�^R
^A+$x^A�^R^A^Pd\200^A�^Q^A�^R^A^Pc�^A� ^A�^R
^AH@^BP^B       ^Q^R^A^Pg\210^B^Y^R^A^Pb`^B^^^R
^A2^T\^B0^R^A^P`*^B/^R^A^P`�<^R
^A1\204\220^B5^Q^C^N^A^P\@^BK^Q^V^A^Pv^BR^R
^A!�^T^BY^R^A^Pc`^B`^R^A^Pb@^Bg^R
^A(\224^B\220^Bp^R
^A!�^T^B^V^R^A^Pb�^B\211^R
^A%�^B�^B\223^R^A^Pc*^B\231^Q^W^A^Px\200^B\236^R^A^Pa`^B�^R
^A!�^T^B\055^R^A^Pb\200fputc_environstrlenfopenmemcpyfgetccfxEnvVarRegisterSetTraceSwitchfseekmalloc_Jv_RegisterClassesatexitlocaltimemainGetCurrentThreadId__register_frame_info
_startstrcpystrncasecmphex_dumpMT_PROCEDURE_LINKAGE_TABLE_fclose_lib_versionrewind_finicfxEnvVarfgetsstrchrpthread_selfsprintferrnovfprintf_init_etextstrcmpcfxtracecfxtraceMTTra
ceFileChangedstrncmp_DYNAMICGetCfacsProfileStringExSleepcfxtraceFilenamestrcasecmp__iobgetenv__deregister_frame_infoWriteCfacsProfileStringEx__dso_handleasctimeTraceSwitchValue_
exit_GLOBAL_OFFSET_TABLE__edatasqlcx2strcatremovehex_dumpcfx_fetch_info_from_formcfxtrace2sleep_endstrncpycfxiemdifftimelibc.so.1SUNW_1.1SUNW_0.7libsocket.so.1libnsl.so.1libclnt
sh.so.11.1libm.so.2libresolv.so.2/usr/sfw/lib^A^B^B�^P
='\221^B^B�^P
=(\227^D^C^B�^C^A^C^A^C^C^C^A^A^C^C^C^C^A^A^A^C^C^A^A^C^A^C^A^A^A^C^C^B^C^C^C^A^A^C^A^A^A^C^A^A^A^C^A^C^C^C^A^A^C^A^C^C^A^A^A^A^C^C^A^A^C^A^C^A^C^A^C^A^P_^X^L^T^A^P_82^T^A^P_ ^Q
^T^A^Pxx^B^S^A^P_00^T^A^P_(!^T^A^P`\200^M^U^A^P`*7^U^A^P`�8^U^A^P`�2^U^A^Pa^Q^U^A^Pa ^L^U^A^Pa@^S^U^A^Pa`E^U^A^Pa\200 ^U^A^Pa*^E^U^A^Pa�
^U^A^Pa�^G^U^A^Pb^A^U^A^Pb ^W^U^A^Pb@>^U^A^Pb`5^U^A^Pb\200G^U^A^Pb*^F^U^A^Pb�^N^U^A^Pb�A^U^A^Pc^C^U^A^Pc -^U^A^Pc@"^U^A^Pc`=^U^A^Pc\200^_^U^A^Pc*C^U^A^Pc�^^^U^A^Pc�1^U^A^Pd^]^U^
A^Pd )^U^A^Pd@^Y^U^A^Pd`^T^U^A^Pd\200/^U^A^Pd*%^U^A^Pd�^K^U�^P �[�^?�^C�\207\234#*0\200\220^A^Bh^D\220^P^A@^D^R�^A^S\222^R`^A\223*p ^Q^U\220^R!�\220^R  @^D^R�^A@^P7^A\220^P^P\22
2^P^Q\225, ^C\224^B*^H\224^D@
^Y\230^S ^A\231+0 ^W^D^^\226^R�x\226^R�^L�r�@`^A@^D^R�^A@^D^R�^A\201��^H�^C�^W\235�@#/^D^Q^?����^E�^P\202^T`^X�]�^A�   \200�`^R@^]^C\202^P` �]�^A�X@�Y"�^L^C*^P^A�\\202`^H\237��
t�\�X@
�?�\202`^H^C\202^Pb��]�^A^B�^E^C\202^P`^H@^D^R��]�^A\202^T`^X\210^P ^A�]�^A�)@\201��^H^A\235�@\201��^H^A\235�@        /^D^Q^?��Ю^E�d^K^[\210^Q"�\212^Q`^H�]�^D^B�@^E\232^S`^P�
]�^E@^D^R��]�^M^C^K\202^P`(�]�^A�^^B�^G\212^Qb��]�^E^B�@^D^A@^D^R�\201�^A\201��^H^A\235�@\201��^H^A\235�@\201��^H^A\235�@\201��^H^A\235�@\201��^H^A\235�@\201��^H^A\235��\2
02^P^X�w�\207�'�^?�'�[^C        ^D^]\202^P`^A\203(p \202@^D\202^Pb<�w�\207�'�\203\220^P d@^F�^A\202^P^H
�@
^A\220^P D@^F�^A\202^P^H
�@^D^A^Ph^D^A\202^P ^A�'�\203�^G�\203�_�\207�!\220^P D@^F�^A\212^P^H^C  ^D^]\202^P`^A\203(p \202@^D\202^Pb8� @^C        ^D^]\202^P`^A\203(p \202@^D\202^Pb<�@\200*`^BH^^^A^C    ^
D^Z\202^P`^A\203(p \202@^D\212^P`�^C    ^D^Z\202^P`^A\203(p \202@^D\232^P`�^C   ^U\202^P`^A\203(p \202@^D\220^Pa�^C     ^U\202^P`^A\203(p \202@^D\222^Pb^H�Y@�[@@^C^T^A\212^G�_\2
10^P ^H�_�\207\202^A^A\220^P^E�X@@^D^RX^A\212^G�\217\210^P ^H�_�\207\202^A^A\220^P^E�X@\224^P ^L@^D^RW^A�/�\233\202^G��\212^G�\217\220^P^A^C    ^U\202^P`^A\203(p \202@^D\222^Pb
\224^P^E@^D^RR^A^C      ^D^]\202^P`^A\203(p \202@^D\202^Pb<�@\200*`^BH(^A^C     ^D^Z\202^P`^A\203(p \202@^D\212^P`�^C   ^D^Z\202^P`^A\203(p \202@^D\232^P`�\230^G�_\236^G��\210^P
 ^H�_�\207\202^A^A�X@�s��\202^G�\217�s��^C      ^U\202^P`^A\203(p \202@^D\220^Pa�^C     ^U\202^P`^A\203(p \202@^D\222^Pb(�Y@�[@\232^P^O@^B�^A\202^G�_\220^P^A^C ^U\202^P`^A\203(p
 \202@^D\222^Pbh@^D^R ^A\202^P^H�w���_��
@
@
@
"cfxfrwb" [Incomplete last line] 188 lines, 42360 characters (17997 null)
^A4�^A�^E^Q^A^W^A^Pxp^D^E^Y^B
^A9\214^Al^E-^A^W^A^Pv\220^D^E^N^B
^AJ\220^C\^A\237^B
^A4�^L^E;^A^V^A^Pu�^H^ED^B
^A<d    <^A�^A^R^A^Pq^XK^E[^A^W^A^Pwp�^Ee^A^W^A^Pwh^H^C7^A^R^A^Pp QX^D��^Eq^A^T^A^Pu�^E\203^B
^AUP^E~^B
^AU\234^E\231^A^S^A^Pu�\217^A^R^A^Pu�^E�^A^U^A^Pu�^E�^A^Q^A^Pgx^E�^D��^E�^R^A^Pb^E�^Q^W^A^Pxx^H^E�^R^A^Pc^E�!^W^A^Pxx^H^E�^R^A^Pa*^E�^R^A^Pb*^E�^R^A^Pa�^E�^R
^AM�^C(^F^S^R
^A2p^At^F^_^R^A^Pa�^F%^R^A^Pd�^F, ^F@^R^A^P`\200^FG^R^A^Pb�^FQ^R
^A^V\204^KP^FV^R
^A0\^\^C� ^Fi^R
^A^T\210\224^Fp^R^A^Pa@^Fw^R^A^Pd`^F\203^R
^A,�^C^D^F\216^Q^O^A^P`^F�^R^A^Pb ^F�^Q^M^AU�^D^F�^R^A^Pd@^F�^R^L^AU�^T^F�^R
^AR�^B\200^F�^R
^A4^\\220^F�^R^A^Pd^F�^R^A^Pc�^F�^R^A^Pc\200^F�^R^A^Pa\200^F�^Q^F�^R^A^Pc@^G^D^R^K^AU�^\^G
^Q^M^A\@^G^Q^R^A^Pd*^G^X^R
^A$^P^A�^G!^R
^A+\234^A(^G,^R
^A/�X^G=^R^A^Pd ^GE^Q^P^A^Pd�^GN^R
^AE*^B*^Gf^R
^A0x<^F�^R^A^Pc ^Gl^R
^A+$x^G}^R^A^Pd\200^G\210^Q^G\216^R^A^Pc�^G\225 ^G\055^R
^AH@^BP^G�^Q^R^A^Pg\210^G�^R^A^Pb`^G�^R
^A2^T\^G�^R^A^P`*^G�^R^A^P`�^F^P^R
^A1\204\220^G�^Q^C^N^A^P\@^H    ^Q^V^A^Pv^H^P^R
^A!�^T^H^W^R^A^Pc`^H^^^R^A^Pb@^H%^R
^A(\224^B\220^H.^R
^A!�^T^G�^R^A^Pb�^HG^R
^A%�^B�^HQ^R^A^Pc*^HW^Q^W^A^Px\200^H\^R^A^Pa`^Hd^R
^A!�^T^Hk^R^A^Pb\200/cedar/efin/v42/test/bin/cfxfrwbcrti.svalues-Xa.cBbss.bssDdata.dataDrodata.rodatacrtstuff.ccall___do_global_dtors_auxcall_frame_dummyforce_to_data__CTOR_LIST
____DTOR_LIST____EH_FRAME_BEGIN__object.2completed.1p.0__JCR_LIST__cfxfrwb.cC1377255167_cedar_hgpThisFilegbTrDetailpThisFunction.4C1377253256_cfxboot_hcfx_vers_cfxfrwb_cC1377253
264_cfxos_h.0C1377253264_cfxos_hC1377253264_cfxsv_h.2C1377253264_cfxsv_hC1377253256_cfxboot_h.3gbTrSummaryC1377255167_cedar_h.1cfxbiem.ccfx_vers_cfxbiem_ccfxtrace.c.LLC10.LLC11.
LLC12.LLC13.LLC14.LLC15.LLC16.LLC17.LLC18UserNamedFileNameelapsed.4.LLC0.LLC1.LLC2.LLC3.LLC4.LLC5.LLC6.LLC7.LLC8.LLC9new_time.5old_time.6cfx_vers_cfxtrace_ccreate_timestampunixg
en.cC1377253264_cfxos_h.1C1377253274_cfthread_h.4C1377253274_cfthread_hC1377255167_cedar_h.0cfx_vers_unixgen_ctraceswi.cGetSwitchListcfx_vers_traceswi_cSLBuffer.4envvar.ccfx_ver
s_envvar_ccdrenv.c__register_frame_infomanage_symbol.LLC19.LLC20.LLC21.LLC22.LLC23.LLC24.LLC25.LLC26.LLC27.LLC28.LLC29.LLC30.LLC31.LLC32.LLC33.LLC34.LLC35.LLC36.LLC37.LLC38.LLC3
9.LLC40.LLC41.LLC42.LLC43.LLC44read_profile_file_lineclose_profile_filecfx_vers_cdrenv_cbufferappend_profile_filesymbol_headopen_profile_file_atdo_startupcreate_profile_filesumm
ary_traceprognameoverwrite_profile_fileret_buf.4File_Handle__DTOR_END__call___do_global_ctors_aux__CTOR_END____JCR_END____FRAME_END__crtn.s_END__START_fputc_environstrlenfopenme
mcpyfgetccfxEnvVarRegisterSetTraceSwitchfseekmalloc_Jv_RegisterClassesatexitlocaltimemainGetCurrentThreadId_startstrcpystrncasecmphex_dumpMT_PROCEDURE_LINKAGE_TABLE_fclose_lib_v
ersionrewind_finicfxEnvVarfgetsstrchrpthread_selfsprintferrnovfprintf_init_etextstrcmpcfxtracecfxtraceMTTraceFileChangedstrncmp_DYNAMICGetCfacsProfileStringExSleepcfxtraceFilena
mestrcasecmp__iobgetenv__deregister_frame_infoWriteCfacsProfileStringEx__dso_handleasctimeTraceSwitchValue_exit_GLOBAL_OFFSET_TABLE__edatasqlcx2strcatremovehex_dumpcfx_fetch_inf
o_from_formcfxtrace2sleep_endstrncpycfxiemdifftime@(#)SunOS 5.10 Generic 123647-02 Feb 2008@(#)SunOS 5.10 Generic 123647-02 Feb 2008@(#)SunOS 5.10 Generic January 2005@(#)SunOS
5.10 Generic 123647-02 Feb 2008as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)as: SunOS 5.10 118683-06 Patch 07/01/2010
GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)@(#)SunOS 5.10 Generic 123647-02 Feb 2008@(#)SunOS 5.10 Generic 123647-02 Feb 2008ld: Software Generation Utilities - Solaris L
ink Editors: 5.10-1.1505.interp.eh_frame_hdr.hash.dynsym.dynstr.SUNW_version.SUNW_versym.SUNW_reloc.rela.plt.text.init.fini.rodata.got.dynamic.eh_frame.data.ctors.dtors.jcr.data
.rel.local.bss.symtab.strtab.comment.shstrtab^A^A^B^A^A\220^A\220^Y^A   ^A^B^A^A�^A�^L^H^W^E^B^A^A�^A�^BD^D^H^D^]^K^B^A^D^H^D^H^F�^E^A^H^X%^C"^A

---------- Post updated at 12:11 PM ---------- Previous update was at 12:10 PM ----------

Don, could you please show me how to obtain the stack trace from the core dump?

Many thanks

If you don't have the source file(s) that were used to create the object file /u01/efin/v42/live/bin/cfxfrwb (or don't know the difference between a source file and an object file) finding out what that object file was doing when it died probably won't help much. But, from what you showed us from your object file, it looks like it was built with gcc , so the command:

gdb /u01/efin/v42/live/bin/cfxfrwb core

where core is the name of the core file produced when you last ran that /u01/efin/v42/live/bin/cfxfrwb , will start the debugger. When gdb gives you a prompt, give it the bt command to get a stack back trace showing what it was doing when it died. If the symbol table has been stripped from /u01/efin/v42/live/bin/cfxfrwb , the trace may be cryptic. If the symbol table is present, you will at least get an idea of what it was doing when it died.

Hello Don

I managed to sort the problem with the script.
I changed the loop part to:

The script now runs as it should.

Many thanks for your help.