View previous topic :: View next topic
|
Author |
Message |
venkatraman
New User
Joined: 02 Jul 2006 Posts: 12
|
|
|
|
hi,
my requirements
i am having 60 error fields in the output file .in the output file the error field 1, 4 and 22 will be set .
i want to omit the error field 1,4,and 22.
i want to check is there is any error field is set other than the expected error field and if it is set then i need to extract that particular records .
please let me know how to proceed using Sort .
Thanks
venkat |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
you can use sort with OMIT option. |
|
Back to top |
|
|
venkatraman
New User
Joined: 02 Jul 2006 Posts: 12
|
|
|
|
thanks for your reply
for the first condition we can use omit condition i.e error field 1,2,and 22
For condition 2 i need to check the error field i.e other than error fields 1,2,and 22 and if it is is set then we need to extract that particular records.
So let me know the sort card for the condition.
Thanks
venkat |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Please post the format of the input and the output records with their field positions. |
|
Back to top |
|
|
venkatraman
New User
Joined: 02 Jul 2006 Posts: 12
|
|
|
|
The file attributes of both input and output is same i.e RECFm is vb and the record length is 2004.
The error fields starts from the position 700 to 759
700 -- error field 1
-
-
-
-
-
759 -- error field 60 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
What is the default value for no error being flagged ? |
|
Back to top |
|
|
venkatraman
New User
Joined: 02 Jul 2006 Posts: 12
|
|
|
|
The default value is spaces
if it is set then the value is '1' |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Code: |
INCLUDE COND=(705,2,CH,NE,C' ',OR,
next group of fields,OR,
last group of fields)
|
Note that I have added 4 bytes for the VB RDW to the positions you have specified for the fields. |
|
Back to top |
|
|
venkatraman
New User
Joined: 02 Jul 2006 Posts: 12
|
|
|
|
Thanks
i will check it and let you know
Could you please explain about the sort card that you have given in the prev reply ,because iam not aware of this option given in the include condition. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
venkatraman wrote: |
Thanks
i will check it and let you know
Could you please explain about the sort card that you have given in the prev reply ,because iam not aware of this option given in the include condition. |
What option are you refering to? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
my requirements
i am having 60 error fields in the output file .in the output file the error field 1, 4 and 22 will be set .
i want to omit the error field 1,4,and 22.
i want to check is there is any error field is set other than the expected error field and if it is set then i need to extract that particular records .
|
It's unclear what you want to do. Please give more details.
When you say you have "60 error fields in the output file", do you mean you have an input file that has 60 one-byte fields with error or non-values in it? If not, what do you mean?
Do the error fields start at position 704 (counting the RDW) or somewhere else (counting the RDW)?
When you say "the error field 1, 4 and 22 will be set", do you mean that each field can have an error value of 1, 4 or 22 or a non-error value? Can the non-error value be anything other than 1,4 or 22?
By 1, 4, and 22, do you mean X'01', X'04' and X'16' or something else? If something else, what exactly (in hex)?
Do you want to omit each record that has an error value somewhere in the 60 fields, and keep each record that doesn't have an error value somewhere in the 60 fields, or do you want something else?
It would help if you showed an example of your input records (relevant values only) and what you want for output.
Once you've explained exactly what you want, I'll be able to tell you how to do it with DFSORT. |
|
Back to top |
|
|
|