View previous topic :: View next topic |
Author |
Message |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Fri Mar 16, 2007 6:47 pm Post subject: Selecting records in fileaid - problem |
|
|
Hi,
I have a file with 500 records out of which i have to filter out the records with VALUES of 'QW111' at 117 position, 'AS' at 949, and 'X' at 954.
In fileaid, I have given that as, Code: |
--- --- -------- ------ -- -----------------
___ 117 NE T'QW111'
___ AND 949 NE T'AS'
___ AND 954 NE T'X'
|
I know ther are 10 records which should be filtered.To my surprise no record is filetered out, i got all 500 records in the output.
when I give,
Code: |
___ 117 EQ T'QW111'
___ AND 949 EQ T'AS'
___ AND 954 EQ T'X'
|
I am getting 10 records in the output.
Any help is greatly appreciated. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Fri Mar 16, 2007 9:21 pm Post subject: |
|
|
vak255,
Try this
[code:1:6f1dade9b5]
//STEP0100 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//DD01 DD DSN=your input dsn,
// DISP=SHR
//DD01O DD SYSOUT=*
//SYSIN DD *
$$DD01 DROP IF=(117,EQ,C _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Sat Mar 17, 2007 1:11 am Post subject: |
|
|
Thanks Master. Sure I will try and will let you know. |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Sun Mar 18, 2007 2:55 pm Post subject: |
|
|
Kolusu, Its not working. I am getting all the 500 records in the output file.
File Attrb:
DCB Attributes: Dsorg: PS Recfm= VB Lrecl= 2004 Blksize= 27998 |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Sun Mar 18, 2007 3:04 pm Post subject: |
|
|
I have to filter only the 'QW111' records with 'AS' at 949, and 'X' at 954.
QW111 is at 117. |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Sun Mar 18, 2007 6:17 pm Post subject: |
|
|
to make it clear,for ex...
INPUT:
-----------QW111-----------------------AS---X--------
-----------QW111-----------------------AS---T--------
-----------QW134-----------------------SA---T--------
-----------QW133-----------------------SA---T--------
OUTPUT SHOULD BE:
-----------QW111-----------------------AS---T--------
-----------QW134-----------------------SA---T--------
-----------QW133-----------------------SA---T-------- |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Sun Mar 18, 2007 8:57 pm Post subject: |
|
|
vak255,
Your input file is VB,that explains why the records are not dropped.For VB files you need to take into account the RDW. For VB files your actual data starts from 5 instead of 1. So change your control cards to the following.
[code:1:5b07c22c8c]
//SYSIN DD *
$$DD01 DROP IF=(121,EQ,C _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
vak255 Intermediate

Joined: 10 Sep 2004 Posts: 384 Topics: 79
|
Posted: Sun Mar 18, 2007 9:14 pm Post subject: |
|
|
Thanks, its working.
I tried with that before some how i missed something. so it was ot working at that time,
Ure realy great,
Thanks, |
|
Back to top |
|
 |
|
|