Page 1 of 1

A strange problem!

PostPosted: Mon Nov 10, 2008 3:44 pm
by j2422tw
I have an portion of VB SMF input data:

    En    XXXXJES2             O                                     
D107C90030EEEEDCEF00000B0200000D0B000000000000000000000000000008000000
EE0655181F77771522010000060100060801000000000000000000000000001E0F0100
----------------------------------------------------------------------
   '      XXXXJES2             O               O         m           
D107210030EEEEDCEF00000B0200000D0B0000080400000D0000000D09000000000000
EE0D9D181F77771522040000060100060801001E080100160801001E04010000000000
----------------------------------------------------------------------
   '      XXXXDEEAKI1   E     TWSC       En       ,   ADRDSSU DMPVSAM
1007210030EEEECCCCDCF407C00030EEEC4444007C900300006000CCDCEEE4CDDEECD4
E40D9E181F7777455129100659181F3623000010655181F000B0001494224044752140
----------------------------------------------------------------------
   '      XXXXJES2             O               O         m           
D107210030EEEEDCEF00000B0200000D0B0000080400000D0000000D0900000D000000
EE0D9E181F77771522050000060100060801001E080100160801001E0401003C0F0100
----------------------------------------------------------------------
   '      XXXXDEEAKI1   E     TWSC       En       ,   ADRDSSU DMPVSAM
1007210030EEEECCCCDCF407C00030EEEC4444007C900300006000CCDCEEE4CDDEECD4
E40D9E181F7777455129100659181F3623000010655181F000B0001494224044752140
----------------------------------------------------------------------
   '      XXXXDEEAKI1   E     TWSC       En       ,     E$         \ 
1007210030EEEECCCCDCF407C00030EEEC4444007C90030000600007C5003000033E00
E50D9E181F7777455129100659181F3623000010655181F000B000065B181F000E8000


There are 6 records, the 6th character of first record is SMF type : X'1E', X'04', or X'05'

When I run the SORT to include the type 04, and type 05, the record count is 3, output is correct.

The sort1 statement:

   SORT FIELDS=COPY                                             
    INCLUDE COND=((6,1,BI,EQ,X'04',OR,6,1,BI,EQ,X'05'),OR,     
                  19,7,CH,EQ,C'DEEAKI1')                       
   OPTION VLSHRT                                               


But when I run another SORT to include the type 04, 05, and type 30 (1E), the count is 5

The sort2 statement:

  SORT FIELDS=COPY                                                 
  INCLUDE COND=(((6,1,BI,EQ,X'04',OR,6,1,BI,EQ,X'05'),AND,         
               19,7,CH,EQ,C'DEEAKI1'),OR,                         
               (6,1,BI,EQ,X'1E',AND,                             
              215,7,CH,EQ,C'DEEAKI1'))                           
  OPTION VLSHRT                                                     


I find the 6th record, type 05 , is missing.

I don't know which statement or step is wrong.

Thanks & regards,

Jerry

Re: A strange problem!

PostPosted: Mon Nov 10, 2008 10:04 pm
by Frank Yaeger
You should use OPTION VLSCMP rather than OPTION VLSHRT.

For a discussion of the difference, see the "How can I use INCLUDE/OMIT with "short" fields?" Ask Professor Sort item at:

http://www.ibm.com/systems/support/stor ... ssor_sort/

But you will still only get the type 30 record if the conditions are satisfied which I suspect they're not. Either you don't have the constant in the record, you specified its position incorrectly (did you add 4 for the RDW?), or the record is "short".

Re: A strange problem!

PostPosted: Tue Nov 11, 2008 8:57 am
by j2422tw
Dear Frank:

I had test the VLSCMP, yes, that's the reason of record missing.

The 6 records I posted is all satisified, because using File-Aid to display and cut/paste
to web page, so the RDW is not appear.

Thanks Frank, I know I can get the answer if post in here ;)

Jerry