How to get the Previous month in Korn Shell

Hi I have a requirement where i have to append the prev month (e.g Feb for current date ) to the file name before sending it for some other processing.

if input file name is
xyz.txt output for the today's run should be xyz_Feb.txt.

i tried this code
1 curmth=`date +%m`
2 mth=(Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
3 prevmth=${mth[$((curmth - 1))]}
4 echo $prevmth

but its giving a syntax error at Line 2 : `(' unexpected.

TIA.

Regards,
naren

Try this.
#!/bin/ksh

curmth=`date +%m`
set -A mth Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
prevmth=${mth[$((curmth - 1))]}
echo $prevmth

# end of file #

-Ramesh