Hi all,
I just want to access a VSAM file through COBOL program.The problem is i am not aware of the key .
The account number(CUST-ACCT)is known but it is not unique.
A field is set as Index for the VSAM file. This value is unique (but not maintained as key but only as index). I know only the partial value of this field. Is it possible to fetch a record only by knowing the partial value of the indexed field.
How do we give the File Control section with this Index and the corresponding read statement.
This is the VSAM file layout;
01 VSAM-UHF-RECORD.
05 VSAM-KEY.
10 VSAM-CYCLE-NUM PIC 9(5).
10 VSAM-BATCH-NUM PIC 9(3).
10 VSAM-BATCH-REC-NUM PIC 9(9).
10 FILLER PIC X(10).
05 NON-VSAM-KEY.
10 LOCAL-REJECT-CODE PIC X(2).
10 TRANSACTION-STATUS PIC X(4).
10 SO-NUMBER.
15 CK-DIGIT PIC X(1).
15 ORDER-TYPE PIC X(1).
15 BO-CODE PIC X(2).
15 DIG-NUMBER PIC X(5).
10 NEW-NON-ADDRESS-LINES PIC X(1).
10 FILLER PIC X(19).
05 NON-VSAM-KEY.
10 LOCAL-REJECT-CODE PIC X(2).
10 TRANSACTION-STATUS PIC X(4).
10 SO-NUMBER.
15 CK-DIGIT PIC X(1).
15 ORDER-TYPE PIC X(1).
15 BO-CODE PIC X(2).
15 DIG-NUMBER PIC X(5).
10 NEW-NON-ADDRESS-LINES PIC X(1).
10 FILLER PIC X(19).
05 UPDT-REJ-REC-IMAG.
10 CUST-ACCT PIC X(20).
10 ADDR-TYPE PIC X(1).
10 REG-PROVD-ID PIC X(2).
10 STANDARD-DIV-CODE PIC X(1).
10 RAO PIC X(3).
10 ADDR-UPDT-CODE PIC X(1).
10 EFFECTIVE-DATE PIC X(8).
10 ADDR-CLEANSING-DATE PIC X(8).
10 OLD-MAIL-NAME1 PIC X(30).
10 OLD-MAIL-NAME1-OFL PIC X(30).
10 OLD-NAME-ADDR2 PIC X(30).
10 OLD-NAME-ADDR2-OFL PIC X(30).
10 OLD-NAME-ADDR3 PIC X(30).
10 OLD-NAME-ADDR3-OFL PIC X(30).
10 OLD-MAIL-ADDR4 PIC X(30).
10 OLD-MAIL-ADDR4-OFL PIC X(30).
10 OLD-PO PIC X(30).
10 OLD-PO-OFL PIC X(30).
10 OLD-NON-ADDR-LINES PIC X(1).
10 OLD-CITY PIC X(28).
10 OLD-CITY-OFL PIC X(23).
10 OLD-STATE PIC X(2).
10 OLD-ZIP5 PIC X(5).
10 OLD-PLUS4 PIC X(4).
10 OLD-FORGN-ADDR-IND PIC X(1).
10 OLD-COUNTRY PIC X(20).
10 NEW-MAIL-NAME1 PIC X(30).
10 NEW-MAIL-NAME1-OFL PIC X(30).
10 NEW-NAME-ADDR2 PIC X(30).
10 NEW-NAME-ADDR3 PIC X(30).
10 NEW-ADDR4 PIC X(30).
10 NEW-PO PIC X(30).
10 NEW-NON-ADDR-LINES PIC X(1).
10 NEW-CITY PIC X(28).
10 NEW-STATE PIC X(2).
10 NEW-ZIP5 PIC X(5).
10 NEW-PLUS4 PIC X(4).
10 NEW-FORGN-ADDR-IND PIC X(1).
10 NEW-COUNTRY PIC X(20).
10 BYPASS-COMP-LOGIC PIC X(1).
10 RESPONSIBLE-PARTY PIC X(6).
10 UPDATE-CATEGORY PIC X(1).
10 UPDATE-REASON PIC X(37).
10 VSAM-REJECT-REASON-CODE PIC X(1).
10 ADDRESS-CODE PIC X(2).
10 CASS-STATUS-CD PIC X(6).
10 FILLER PIC X(402).
The key field is VSAM-KEY. The index is SO-NUMBER. The value for only DIG-NUMBER is known. Finally I need to fetch the NEW-PO value. Is it possible... kindly clarify
Thanks in advance,
Marun