If you read further down the thread you'll see the 13th argument can be spaces, so unfortunately that doesn't work.
Thanks CarloM, this is what I did with your gawk proposal to analyse ${0} and populate the variables V_SEVERITY and V_INFO:
V_SEVERITY=`echo ${V_MEM_PARAMETERS} | gawk --re-interval '{ matched=match($0," (.{4}) (.{50})$", myarray); if (matched) { print ( myarray[1]);}}'`
V_INFO=`echo ${V_MEM_PARAMETERS} | gawk --re-interval '{ matched=match($0," (.{4}) (.{50})$", myarray); if (matched) { print ( myarray[2]);}}'`
and these were my results:
NOTE: There should be 56 spaces after vmsdlceref in the argument string, but the forum software strips them.
Note: there should be 51 spaces after 3333 in the argument string.
I probably misadapted the command. Any suggestions?
Zagga
echo is compressing/stripping the spaces - try double-quoting the variable ( echo "${V_MEM_PARAMETERS}"
)
Heartfelt thanks CarloM. I would never have got there in a month of Sundays.