Hi,
I would like to know how a could read my file with a partial key.
01 file-key
05 key-1
05 key-2
05 key-3
i would like to be able to read my file with key-2
I TRIED THIS
SELECT DATA-FILE ASSIGN TO SYS0000
ORGANIZATION IS INDEXED
ACCESS MODE IS RANDOM
RECORD KEY IS FILE-KEY
ALTERNATE RECORD KEY IS KEY-2
FILE STATUS IS DATA-FILE-STATUS.
i tried many combination but...
i get error 35 if i put THE ALTERNATE KEY, and my file can't be opened
if i remove the alternate key, i can open my file , but no data is read.
in case of alternate key, i read my file in this way.
move my-field to file-key.
read data-file key is key-2.
since the file is not opened, i don't get to this stage yet.
thanks
I would like to know how a could read my file with a partial key.
01 file-key
05 key-1
05 key-2
05 key-3
i would like to be able to read my file with key-2
I TRIED THIS
SELECT DATA-FILE ASSIGN TO SYS0000
ORGANIZATION IS INDEXED
ACCESS MODE IS RANDOM
RECORD KEY IS FILE-KEY
ALTERNATE RECORD KEY IS KEY-2
FILE STATUS IS DATA-FILE-STATUS.
i tried many combination but...
i get error 35 if i put THE ALTERNATE KEY, and my file can't be opened
if i remove the alternate key, i can open my file , but no data is read.
in case of alternate key, i read my file in this way.
move my-field to file-key.
read data-file key is key-2.
since the file is not opened, i don't get to this stage yet.
thanks