Sort vs. ASQ command on termcode



If I sort Course for BU3023, I get 8 records, 6 of them containing "02" in ..termcode.  (2 of the 6 are "T" terms).  I can't get the ASQ command to display the six "02" terms.  It only finds 4...it doesn't capture the "T" terms.  What is wrong with the ASQ command below?

          $ sort course

          Fields to Sort (15 Maximum)

          Level 1...Field? termcode

          Level 2...Field?

          Sorting on 1 field specified.

          Select out special records <NO>? y

          Criterion  A

          Field? course

          Low ? bu3023/any

          Criterion  B

          Field?

          Selection statement? a

          Field extraction started                          11:14 AM

          Pointer file build started                        11:14 AM

          Pointers to 8 records constructed.                11:14 AM

          $

          Option? sho

          Rec 665        BU-3023 01 02/3S Prin of Management

          Rec 752        BU-3023 02 02/3S Prin of Mgmt-Honor

          Rec 781        BU-3023 01 02/4S Prin of Management

          Rec 791        BU-3023 02 02/4S Prin of Management

          Rec 427        BU-3023A02 02/5T Prin of Management

          Rec 550        BU-3023A03 02/5T Prin of Management

          Rec 417        BU-3023 01 03/2S Prin of Management

          Rec 891        BU-3023A02 03/4T Prin of Management

 

          $ asq display all courseid where course equals "bu3023" and termcode

          contains "02"

          4 records found

          Press ANY key to start listing

          COURSE ID

          ---------

          BU-3023 01 02/3S

          BU-3023 02 02/3S

          BU-3023 01 02/4S

          BU-3023 02 02/4S

 

The SORT is looking for “BU3023/ANY”, which says that if the characters appear anywhere in the field, include them in the pointer file.  The SORT is picking up records that have “BU3023A” in the .COURSE field.

The ASQ is looking for “BU3023” in the .COURSE field, so it only finds records that have exactly that.  If you want it to work like the /ANY qualifier, you can do the following:

$ MCR DMS:ASQ FIND COURSE WHERE .COURSE CONTAINS "BU3023"

8 records found