filter command question ?
Moderators: chulett, rschirm, roy
The script called in the filter stage does "things" and calls Cosort, which will consume the input and generate an output file upon input stream completion, not sending any data rows to the sequential file, this is probably triggering the sequential file error.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Thanks Ray and Arnd...
I think what Arnd says is happening in this situatuion...It looks like it's not able to write to the seqential file after the sorting. I have mentioned stdout as my output file...but it does not work.
Anyway this is my shell script which is called from filter command...
fyi...cosort_env file is just a user defined file which has some values defined for reusability...
[code]#!/usr/bin/ksh
. /home/A136650/cosort/cosort_env
INP_FILE=$1
DDF_FILE=$2
KEY_FILE=$3
OUT_FILE=`basename $INP_FILE .csv`
export PROJ_DIR
export SCR_DIR
export INP_FILE
export DDF_FILE
export KEY_FILE
sortcl /spec=$SCR_DIR/tmplsort1.scl
return=$?
if test $return -eq 0
then
# echo JOB COMPLETED SUCCESSFULLY
exit $RETURN
else
# echo JOB HAS FAILED
exit $RETURN
fi
My cosort script looks like this...
[/code]/monitor=1
#INPUT SECTION
/infile=$INP_FILE
/alias=inputf
/spec=$PROJ_DIR/$DDF_FILE
#ACTION SECTION
/SORT
/spec=$PROJ_DIR/$KEY_FILE
#OUTPUT SECTION
/outfile=stdout
Let me know if you guys find any bug in this...
Thanks again for your continous cooperation...
Kaps
I think what Arnd says is happening in this situatuion...It looks like it's not able to write to the seqential file after the sorting. I have mentioned stdout as my output file...but it does not work.
Anyway this is my shell script which is called from filter command...
fyi...cosort_env file is just a user defined file which has some values defined for reusability...
[code]#!/usr/bin/ksh
. /home/A136650/cosort/cosort_env
INP_FILE=$1
DDF_FILE=$2
KEY_FILE=$3
OUT_FILE=`basename $INP_FILE .csv`
export PROJ_DIR
export SCR_DIR
export INP_FILE
export DDF_FILE
export KEY_FILE
sortcl /spec=$SCR_DIR/tmplsort1.scl
return=$?
if test $return -eq 0
then
# echo JOB COMPLETED SUCCESSFULLY
exit $RETURN
else
# echo JOB HAS FAILED
exit $RETURN
fi
My cosort script looks like this...
[/code]/monitor=1
#INPUT SECTION
/infile=$INP_FILE
/alias=inputf
/spec=$PROJ_DIR/$DDF_FILE
#ACTION SECTION
/SORT
/spec=$PROJ_DIR/$KEY_FILE
#OUTPUT SECTION
/outfile=stdout
Let me know if you guys find any bug in this...
Thanks again for your continous cooperation...
Kaps
No direct problem, except the scripts wants a complete file but is only getting one row per call.
Create a pipe somewhere on your system with
Execute a shell command at the beginning of the job in the before-job call doing a
and declare your job's output sequential file to be the pipe "mypipe.fifo"
Create a pipe somewhere on your system with
Code: Select all
mkfifo mypipe.fifo
Code: Select all
nohup {yourscript} mypipe.fifo param2 param3 &
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>