Hi,
Assume that i have 5 fields in the file.(say name1,name2,address,telpehone,account).
i want to find whether 'e' character is present in the two fields i.e Name1,name2.
NAME1 is of 35 character.
NAME2 is of 15 character.
'e' can be at first or sec or third .. soon on till 35 postions of Name1 field.
if it is present i need the record in different output file
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Well, let me gaze into my crystal ball and look at your actual input records. Wait, my crystal ball isn't working today.
If you're not getting any records that match than you don't have an 'e' in the field or you changed something in the control statements or you don't have the correct positions for the fields or ...? Perhaps you're mismatching an uppercase E with a lowercase e? Perhaps you have VB records and you didn't account for the RDW in positions 1-4 (the first data byte starts in position 5). Perhaps ...
As a start, show us the control statements you actually used and the //SYSOUT messages.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
I assume you actually have:
Code:
INCLUDE FORMAT=SS,
COND=((98,1,EQ,C'1'),AND,(37,35,EQ,C'e',OR,72,35,EQ,C'e'))
That tells DFSORT to only include the record if there's a '1' in position 98, AND an 'e' anywhere in 37,35 OR 72,35. If the output file is empty, then none of the records meet those criteria. BTW, you should really use CH for the first condition rather than SS - that will be more efficient but it won't change the outcome:
Code:
INCLUDE FORMAT=SS,
COND=((98,1,CH,EQ,C'1'),AND,(37,35,EQ,C'e',OR,72,35,EQ,C'e'))
If you want to see what's in the 37,35 and 72,35 fields for records with a '1' in 98, use these DFSORT control statements:
Code:
OPTION COPY
INCLUDE COND=(98,1,CH,EQ,C'1')
OUTREC FIELDS=(C'<',37,35,C'<>',72,35,C'>')
I'm guessing you won't see any 'e's in there. If you do, then something else is wrong.
You didn't show me the //SYSOUT messages as I asked, so I can't tell if your input is VB or what else might be wrong.