[Migrated content. Thread originally posted on 13 May 2011]
Micro Focus COBOL 6.0, developed in Visual Studio 2008 and run in Micro Focus Enterprise Server.I have a program that issues a START command on a VSAM file by populating part of the key (10 bytes alphanumeric) with two to seven bytes of alphabetic characters followed by spaces, then setting the KEY IS condition to "NOT
MOVE 'AG ' TO VSAM-ALT-KEY2.
START VSAM-FILE
KEY IS NOT In a system using the EBCDIC character set, numeric values, even if only in one of the first two bytes, will satisfy this condition, as their hex values are greater than the hex values of alphabetic characters. But in ASCII, numerics have lower hex values than alphabetics. For the purpose of this program, numeric key values need to be able to start this file.
I have not seen any doc indicating that using a compound condition will work in the START command, but I am hoping this is possible. I have tried these logic schemes, none of which have worked:
START VSAM-FILE
(KEY IS >= VSAM-ALT-KEY2 OR
(KEY IS >= WS-VSAM-FILE-ALT-START-KEY-LO AND
KEY IS
START VSAM-FILE
KEY IS (>= VSAM-ALT-KEY2 OR
(>= WS-VSAM-FILE-ALT-START-KEY-LO AND
START VSAM-FILE
KEY IS >= VSAM-ALT-KEY2 OR
(>= WS-VSAM-FILE-ALT-START-KEY-LO AND
START VSAM-FILE
KEY (IS >= VSAM-ALT-KEY2 OR
(IS >= WS-VSAM-FILE-ALT-START-KEY-LO AND
IS The WS-VSAM-FILE-ALT-START-KEY-LO field is set to a zero followed by nine spaces ('0 '), and the WS-VSAM-FILE-ALT-START-KEY-HI field is set to a 9 followed by nine bytes of HIGH-VALUES.
Is there a way to make this work? Do I have to try the START with just the VSAM-ALT-KEY2 as the start key and run a second START command using the LO and HI fields only if that fails?
Any advice would be greatly appreciated.