How CA Easytrieve can read a VSAM file using only a partial key

Document ID : KB000055716
Last Modified Date : 14/02/2018
Show Technical Document Details
  1. Set up a full length key in working storage
  2. Use the partial key and fill the rest of the defined key with spaces
  3. Use the working storage field as the key in the POINT statement
  4. Check the status
  5. Do a GET using the same key

Other Relevant Information

The above workaround assumes that you understand your data and the consequences of using a partial key. CA Easytrieve does not recognize that a partial key is being used and, as with any programming language, the coding technique shown in this FAQ should be used with the understanding that partial keys are not supported with CA Easytrieve.

Example: If a VSAM file key is defined as 26 and you want to read generically using the first 13 positions, then you must use a POINT with a 26 byte field with only the first 13 bytes filled in. Then, you would do a GET to obtain the record. You must test the first 13 bytes of that record obtained with the GET in order to make sure it is a match.