MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Selecting records in fileaid - problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Fri Mar 16, 2007 6:47 pm    Post subject: Selecting records in fileaid - problem Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri Mar 16, 2007 9:21 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Sat Mar 17, 2007 1:11 am    Post subject: Reply with quote

Thanks Master. Sure I will try and will let you know.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Sun Mar 18, 2007 2:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Sun Mar 18, 2007 3:04 pm    Post subject: Reply with quote

I have to filter only the 'QW111' records with 'AS' at 949, and 'X' at 954.

QW111 is at 117.
Back to top
View user's profile Send private message
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Sun Mar 18, 2007 6:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Sun Mar 18, 2007 8:57 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
vak255
Intermediate


Joined: 10 Sep 2004
Posts: 384
Topics: 79

PostPosted: Sun Mar 18, 2007 9:14 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group