z/OS DFSORT: Getting Started
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Alphanumeric Tests for INCLUDE and OMIT

z/OS DFSORT: Getting Started
SC23-6880-00

Testing for alphanumerics or non-alphanumerics is similar to testing for numerics or non-numerics. Use BI for the format. Use EQ to test for alphanumerics or NE to test for non-alphanumerics. Instead of NUM, use one of the following corresponding to the set of alphanumeric characters you need:
  • UC: Uppercase characters (A-Z)
  • LC: Lowercase characters (a-z)
  • MC: Mixed case characters (A-Z, a-z)
  • UN: Uppercase and numeric characters (A-Z, 0-9)
  • LN: Lowercase and numeric characters (a-z, 0-9)
  • MN: Mixed case and numeric characters (A-Z, a-z, 0-9)
Here is an INCLUDE statement that only includes records which have uppercase or numeric characters in positions 11 to 15:
    INCLUDE COND=(11,5,BI,EQ,UN)

If every position from 11 to 15 in a record has A-Z or 0-9, that record is included. If any position from 11 to 15 in a record does not have A-Z or 0-9, that record is not included. So a record with 'B03RS' in 11 to 15 would be included, whereas records with 'B03rS' or 'B,ABC' would not be included.

Here's an INCLUDE statement that removes any record that has only A-Z or a-z in positions 1 to 8:
   INCLUDE COND=(1,8,BI,NE,MC)

So a record with 'RsTUVxyz' in 1-8 would not be included, whereas a record with 'Rs$UVxyz' in 1-8 would be included.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014