sort sum fields

HI ALL,

i have a problem when i do a sort sum with many fields.
Is there a limit for fields?
Do you know a solution?

thanks in advance.

the shell is:

# SORT1
SORT1_rcode=777

if [ $GLB_code -eq 0 ]; then
   echo "USE $DARSEQ/OTPU.FTPEPREC RECORD F,1000 " > $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "GIVE $DARTMP/__TPO501$$ RECORD F,1000 " >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "SORT FIELDS=(1,5,A,52,4,A),FORMAT=BI" >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "SUM FIELDS=(306,8,PD,314,8,PD,322,8,PD,330,8,PD,338,8,PD,346,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "354,8,PD,362,8,PD,370,8,PD,378,8,PD,386,8,PD,394,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "402,8,PD,410,8,PD,418,8,PD,426,8,PD,434,8,PD,442,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "450,8,PD,458,8,PD,466,8,PD,474,8,PD,482,8,PD,490,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "498,8,PD,506,8,PD,514,8,PD,522,8,PD,530,8,PD,538,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "546,8,PD,554,8,PD,562,8,PD,570,8,PD,578,8,PD,586,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "594,8,PD,602,8,PD,610,8,PD,618,8,PD,626,8,PD,634,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "642,8,PD,650,8,PD,658,8,PD,666,8,PD,674,8,PD,682,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "690,8,PD,698,8,PD,706,8,PD,714,8,PD,722,8,PD,730,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "738,8,PD,746,8,PD,754,8,PD,762,8,PD,770,8,PD,778,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "786,8,PD,794,8,PD,802,8,PD,810,8,PD,818,8,PD,826,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "834,8,PD,842,8,PD,850,8,PD,858,8,PD,866,8,PD,874,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "882,8,PD,890,8,PD,898,8,PD,906,8,PD,914,8,PD,922,8,PD," >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   echo "930,8,PD,938,8,PD,946,8,PD,954,8,PD,962,8,PD,970,8,PD)" >> $DARPARSRT/TPEKL508.SORT1_$$.srt
   mfsort take $DARPARSRT/TPEKL508.SORT1_$$.srt
   SORT1_rcode=$?
   echo SORT1_rcode=$SORT1_rcode
   if [ $SORT1_rcode -gt $GLB_code ]; then
      GLB_code=$SORT1_rcode
   fi
   cat SYSOUT
   rm  $DARPARSRT/TPEKL508.SORT1_$$.srt
fi

the return code is:

SEQUDEL_rcode=0
SORT109E: Too many fields specified
SORT015U: Command statement error(s) detected
SORT1_rcode=16
          Micro Focus MFJSORT Utility 3.0.00

          take /workprod/darp/param/srt/TPEKL508.SORT1_35314.srt
          USE /workprod/darp/fileseq/OTPU.FTPEPREC RECORD F,1000
          GIVE /workprod/darp/tmp/__TPO50135314 RECORD F,1000
          SORT FIELDS=(1,5,A,52,4,A),FORMAT=BI
          SUM FIELDS=(306,8,PD,314,8,PD,322,8,PD,330,8,PD,338,8,PD,346,8,PD,
          354,8,PD,362,8,PD,370,8,PD,378,8,PD,386,8,PD,394,8,PD,
          402,8,PD,410,8,PD,418,8,PD,426,8,PD,434,8,PD,442,8,PD,
          450,8,PD,458,8,PD,466,8,PD,474,8,PD,482,8,PD,490,8,PD,
          498,8,PD,506,8,PD,514,8,PD,522,8,PD,530,8,PD,538,8,PD,
          546,8,PD,554,8,PD,562,8,PD,570,8,PD,578,8,PD,586,8,PD,
          594,8,PD,602,8,PD,610,8,PD,618,8,PD,626,8,PD,634,8,PD,
          642,8,PD,650,8,PD,658,8,PD,666,8,PD,674,8,PD,682,8,PD,
          690,8,PD,698,8,PD,706,8,PD,714,8,PD,722,8,PD,730,8,PD,
          738,8,PD,746,8,PD,754,8,PD,762,8,PD,770,8,PD,778,8,PD,
          786,8,PD,794,8,PD,802,8,PD,810,8,PD,818,8,PD,826,8,PD,
SORT109E: Too many fields specified
          834,8,PD,842,8,PD,850,8,PD,858,8,PD,866,8,PD,874,8,PD,
          882,8,PD,890,8,PD,898,8,PD,906,8,PD,914,8,PD,922,8,PD,
          930,8,PD,938,8,PD,946,8,PD,954,8,PD,962,8,PD,970,8,PD)
SORT015U: Command statement error(s) detected

i don't know the shells
anybody knows nothing?

mfsort is not a standard unix command. Shell programs can't fix a problem with some package just becuase it's invoked from the shell. Maybe Micro Focus can help you.

Not sure if this will be of much help since I've never used mfsort, but I was reading 404 Not Found .

You could use the following to show the length of each line in the input file:

awk '{print length}' <filename>

Is it possible that the input file has varying record legnths with some not meeting SORT FIELDS=(1,5,A,52,4,A) requirments? I'd test it, but don't have a copy of mfsort or the input file. Is mfsort a standalone binary or does it require libraries etc. that are part of a Microfocus Cobol suite?

Cheers,

Keith

hi,

no, the file is correct.

thank you

Is mfsort a standalone binary or does it require libraries etc. that are part of a Microfocus Cobol suite? If it works as a standalone and isn't too large, could I get a copy so I can try to help a little more?

Cheers,

Keith

hi,

Is a part of Microfocus Server Express suite and it requires a Licence to run.

thanks the same