passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi,
I am trying to extract few records (based on condition) from a file using sort step. The field is packed decimal type (newly added field). This field also has value spaces in this field for the existing records. (X'4040404040' is displayed in the field when i view in fileaid).
When I use sort, the o/p also includes records with spaces.
Field name - Field-1; Field type - Packed decimal, Field length - 5. Required condition is Field-1 is greater than zero.
When i try the following condition, the o/p also includes the records with value spaces in this field.
SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(100,5,PD,GT,0)
I am able to skip the records with spaces using the below condition, but I am not sure if this is the best approach. Is there any other way I can skip the records with spaces in this field.
SYSIN DD *
SORT FIELDS=COPY
INCLUDE COND=(100,5,CH,NE,X'4040404040',AND,100,5,PD,GT,0)
Thanks in Advance for you suggestions. |
|