I have problem defining alternate index for my VSAM KSDS. It says
IDC3211I KEYWORD 'DATA' IS IMPROPER
Here is my VSAM KSDS definition:
DEFINE CLUSTER -
(NAME(IBMUSER.TEST.SAMPLE.KSDS) -
VOLUMES(ZASYS1) -
TRACKS(15 15) -
INDEXED -
SHAREOPTIONS(1 3) UNIQUE -
RECORDSIZE(100 100) -
KEYS(18 0) -
DATA(NAME(IBMUSER.TEST.SAMPLE.KSDS.DATA))-
INDEX(NAME(IBMUSER.TEST.SAMPLE.KSDS.INDEX))
This is my Alternate Index definition:
DEFINE AIX (NAME(IBMUSER.TEST.SAMPLE.AIX)-
RELATE(IBMUSER.TEST.SAMPLE.KSDS) -
CISZ(4096) -
FREESPACE(20,20) -
KEYS(20,19) -
NONUNIQUEKEY -
UPGRADE -
RECORDSIZE(61,61) -
DATA(NAME(IBMUSER.TEST.SAMPLE.AIX.DATA))-
INDEX(NAME(IBMUSER.TEST.SAMPLE.AIX.INDEX))
I don't get why it says keyword DATA is improper.
There are a few issues. The first one is a syntax issue in the command.
This is because you are missing a closing parenthesis after the
KEYSclause which completes theCLUSTERsection. Adding a closing parenthesis like follows will complete theDEFINE CLUSTERsection.When that is corrected you'll get another error because you need a space and volume specification for the AIX. Use the definition below that has the needed parameters for the AIX.
Complete JOB to accomplish the creation of the CLUSTER and the ALTERNATEINDEX follows. I formatted the statements to be more readable: