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 

FileAid include , exclude question
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Tue Mar 09, 2004 2:55 pm    Post subject: FileAid include , exclude question Reply with quote

Hi all experts,
Please help me, I need to wite a skeleton to search the input file, and copy all records containing the following paterm: '#### W ', where # is any numeric characters. The following statement will copy record containing ' I ', ' E ' and ' W ' only, can anyone please show me how to modify it! work with '#### W '

//SYSIN DD *
$$DD01 COPY IF=(1,132,C' I '),
OR=(1,132,C' E '),
OR=(1,132,C' W ')
/*


Can I use "INCLUDE" if so could anyone please show me how to do that.
Also, I need to exlude records that containing "7094 W ", is there a way to do this. Please help!

Thank you very much!

nguyenh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Mar 09, 2004 3:04 pm    Post subject: Reply with quote

nguyenh,

Quote:

I need to wite a skeleton to search the input file, and copy all records containing the following paterm: '#### W ', where # is any numeric characters.


What is the format of the numeric characters? is it Zoned Decimal which is pic 9(4) ?.
or is it Binary which is pic s9(8 ) comp ? or is it packed decimal field which is pic s9(6) comp-3?

Please post a sample input and desired output.Also post the LRECL, RECFM , and the position of the numeric.

Thanks,

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Mar 10, 2004 1:35 pm    Post subject: Reply with quote

Hi kolusu, Thank you for your help.

I dont know what zone it is, but here is an excerpt example: you can see the "7094 W" those are the one I need to excluded. but any other number such as "5125 W" will need to be included.
Please let me know if if you need more information. thank you for looking into it.

2795 1 0010 7094 W FETCH RATE & REQUIRED RATE...........
2795 1 0010 5125 W some messages here...........
2795 1 0010 3125 U some messages here.........
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Mar 10, 2004 1:37 pm    Post subject: Reply with quote

Sorry, It's me again,
Just want to drop another note,
those numbers do not seem to appear in the same column number.
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Wed Mar 10, 2004 1:44 pm    Post subject: Reply with quote

Here is a completed job step, I dont know if it gives you any clue or not:
I need to modify the following statements:
OR=(1,132,C' I '),
OR=(1,132,C' W '),
OR=(1,132,C' E '),
OR=(1,132,C' S '),
OR=(1,132,C' U ')
-------------------------------------------------------------


Code:

//STEP01  EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST  DD SYSOUT=9
//SYSTOTAL DD SYSOUT=9
//DD01     DD DSN=&S64IP1,
//         DISP=SHR
//DD01O    DD  SYSOUT=*
//SYSIN    DD *
$$DD01 COPY IF=(1,132,C'ABEND'),
            OR=(1,132,C'COND CODE'),
            OR=(1,132,C' ENDED '),
            OR=(1,132,C'ERROR'),
            OR=(1,132,C'FAIL'),
            OR=(1,132,C'INVALID'),
            OR=(1,132,C'MESSAGE '),
            OR=(1,132,C'NOT FOUND'),
            OR=(1,132,C'STARTED'),
            OR=(1,132,C'VALIDATION'),
            OR=(1,132,C' I '),
            OR=(1,132,C' W '),
             OR=(1,132,C' E '),
             OR=(1,132,C' S '),
             OR=(1,132,C' U ')
/*
//COPY1   EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST  DD SYSOUT=9
//SYSTOTAL DD SYSOUT=9
//DD01     DD  DSNAME=&S64IP1,
//         DISP=SHR
//DD01O    DD  DISP=SHR,
//         DSN=&USERID..WRKFIL
//SYSIN    DD *
$$DD01 COPYALL
/*
//VM2VLL3 EXEC PGM=VM2VLL3,REGION=1224K
//IPFILE   DD  DSNAME=&USERID..WRKFIL,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  *
//OPFILE   DD  SYSOUT=*,
//         DCB=(RECFM=FB,LRECL=133)
//FILE80   DD  *
&S64IP1
/*
)ENDSEL
Back to top
View user's profile Send private message
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Thu Mar 11, 2004 11:18 am    Post subject: Reply with quote

Hi Ravi,
Quote:

Note: When ever you are posting and want to add something to it as you did as above (3 post) you need not press POST REPLY button and add the content. Rather you can just click EDIT button which is present in the right top corner in your post.

sorry, Yeah I figured that out after I have posted a couple more.
ok here is the contain of the input file:
Quote:

STS114 VER: 02 SUBMITTED: 04/02/05 14.00.27 BY SOC687
ID: GEN2MXRM
RAM FETCH REQUIRED
ADDR RATE RATE DIAGNOSTIC MESSAGE AND TEXT
2795 1 0010 <b> 7094 W </b>bFETCH RATE & REQUIRED RATE
MUST HAVE A COMMON DIVISOR
2795 1 0010 <b> 7094 W </b> FETCH RATE & REQUIRED RATE
WORD FRAME RATE DIAGNOSTIC MESSAGE AND TEXT
35 14 <b> 5123 W</b> UNUSED WORD COLUMN ENCOUNTERED BEF
35 73 <b> 5123 W</b> UNUSED WORD COLUMN ENCOUNTERED BEF
36 89 <b> 5123 W</b> UNUSED WORD COLUMN ENCOUNTERED BEF

If you look as my skeleton in my previous post, It searchs for records containing: <b>ABEND,COND CODE, ENDED, ERROR, FAIL,INVALID, MESSAGE, NOT FOUND,STARTED,VALIDATION, I, W, E, S or U</b> <br>
Now the problem is for the last 5 search categories:<b>I, W, E, S or U</b>, if I search for: I, W, E, S or U. It finds too many matching records which I dont want. <br>
so I want instead of search for 'I' I want to use something like '#### I'
and instead of search for 'W' I want to use something like '#### W'
and instead of search for 'E' I want to use something like '#### E'
and instead of search for 'S' I want to use something like '#### S'
and instead of search for 'U' I want to use something like '#### U'
where '####' can be any numeric value such as: 4030, 5223, 1234, 7094 and so on. <br>
BUT I dont want it to find '7094 I', '7094 W', '7094 E', '7094 S' and '7094 U'
<br>
Is there a posible way to do that in FileAid ?<br>
I hope I made it clear enough now.
Thanks for looking into it.
Hai
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Mar 12, 2004 6:39 am    Post subject: Reply with quote

nguyenh,

Please do no open more than 1 topic for the same question. We try to answer as much as we can. I am deleting the other post which discusses the same problem.

Thanks,

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Mar 12, 2004 8:54 am    Post subject: Reply with quote

nguyenh,

Try this. The first step eliminates all the records if 7094 is found anywhere in the file. Then this file is passed on to the next step and extract the desired records.

Code:

//STEP0100 EXEC PGM=FILEAID                                     
//SYSPRINT DD  SYSOUT=*                                         
//SYSLIST  DD  SYSOUT=*                                         
//DD01     DD  *                                                 
STS114 VER: 02 SUBMITTED: 04/02/05 14.00.27 BY SOC687           
ID: GEN2MXRM                                                     
RAM FETCH REQUIRED                                               
ADDR RATE RATE DIAGNOSTIC MESSAGE AND TEXT                       
2795 1 0010 7094 W BFETCH RATE & REQUIRED RATE                   
MUST HAVE A COMMON DIVISOR                                       
2795 1 0010 7094 W FETCH RATE & REQUIRED RATE                   
WORD FRAME RATE DIAGNOSTIC MESSAGE AND TEXT                     
35 14 5123 W UNUSED WORD COLUMN ENCOUNTERED BEF                 
35 73 5123 W UNUSED WORD COLUMN ENCOUNTERED BEF                 
36 89 5123 U UNUSED WORD COLUMN ENCOUNTERED BEF                 
//DD01O    DD  DSN=&T1,DISP=(,PASS),SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD  *                                                 
$$DD01 DROP IF=(1,0,C'7094'),OUT=0                               
/*                                                               
//STEP0200 EXEC PGM=FILEAID                                     
//SYSPRINT DD  SYSOUT=*                                         
//SYSLIST  DD  SYSOUT=*                                         
//DD01     DD  DSN=&T1,DISP=OLD                                 
//DD01O    DD  SYSOUT=*                                         
//SYSIN    DD  *                                                 
$$DD01 COPY IF=(1,0,C' E'),ORIF=(1,0,C' I'),ORIF=(1,0,C' S'),   
            ORIF=(1,0,C' U'),ORIF=(1,0,C' W'),OUT=0             
/*   


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Fri Mar 12, 2004 5:53 pm    Post subject: Reply with quote

Hi Kolusu,
It works great with few OR statements, but as soon as I add more OR statement to the "//SYSIN DD * " code block I have condition code of 8 ?
I wonder why that happen? is this because there is a limitation of number of lines to be placed in that block

<b> This one works:</b>

Quote:
//STEP01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST DD SYSOUT=9
//SYSTOTAL DD SYSOUT=9
//DD01 DD DSN=&S64IP1,
// DISP=SHR
//DD01O DD DSN=&&&&TEMP1,
// LIKE=&S64IP1,
// DISP=(NEW,PASS)
//SYSIN DD *
$$DD01 DROP IF=(1,132,C'7094'),
OR=(1,132,C'XX'),
OR=(1,132,C'C A T E G O R Y'),
OR=(1,132,C'C A T E G O R Y'),
OR=(1,132,C'D A T A'),
OR=(1,132,C'L E V E L'),
OR=(1,132,C'M A S T I I'),
OR=(1,132,C'M E S S A G E'),
OR=(1,132,C'U P D A T E'),
OR=(1,132,C'V A L I D A T I O N'),
/*


<b>This one would not work:</b>
Quote:
//STEP01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=9
//SYSLIST DD SYSOUT=9
//SYSTOTAL DD SYSOUT=9
//DD01 DD DSN=&S64IP1,
// DISP=SHR
//DD01O DD DSN=&&&&TEMP1,
// LIKE=&S64IP1,
// DISP=(NEW,PASS)
//SYSIN DD *
$$DD01 DROP IF=(1,132,C'7094'),
OR=(1,132,C'//'),
OR=(1,132,C'X/'),
OR=(1,132,C'**'),
OR=(1,132,C'XX'),
OR=(1,132,C'C A T E G O R Y'),
OR=(1,132,C'C A T E G O R Y'),
OR=(1,132,C'D A T A'),
OR=(1,132,C'L E V E L'),
OR=(1,132,C'M A S T I I'),
OR=(1,132,C'M A S T I I'),
OR=(1,132,C'M E S S A G E'),
OR=(1,132,C'U P D A T E'),
OR=(1,132,C'V A L I D A T I O N'),
/*


Can you please tell me why ?
Back to top
View user's profile Send private message
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Sat Mar 13, 2004 1:42 am    Post subject: Reply with quote

check the use of the MAXEXT=n parameter, that should solve the last issue.

for a scan of a " W " preceeded by 4 numeric characters try the following

Code:


if=(1,0,c" W "),                  first find a " W " string on the current record
and=(-4,4,eqn),                 then check the position 4 bytes to the left of the space
*                                       to ensure that it contains 4 numeric characters
    do what ever


i've been using File-Aid / Dumper for over 25 years and its one of my favorite tools

good luck, hopefully this will help on the quest to your solution
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Mar 15, 2004 5:28 am    Post subject: Reply with quote

nguyenh,

Ravi is spot on. Remove the extra comma at the end of the last line of sysin.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Mon Mar 15, 2004 2:15 pm    Post subject: Reply with quote

Hey guys! haatvedt, kolusu, Ravi
Thank you very much for your helps!, you guys are great !

haatvedt, This code works well.

Quote:

if=(1,0,c" W "),
and=(-4,4,eqn),


Just for my understanding, what do 1 and 0 in if=(1,0,c" W ") statement mean? why dont we use if=(1,132,c" W ") what are they differed ?

Also Kolusu used: out=0 at the end of the last ORIF, what does it do?

Thanks again!
nguyenh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Tue Mar 16, 2004 3:51 am    Post subject: Reply with quote

nguyenh,

Quote:

Just for my understanding, what do 1 and 0 in if=(1,0,c" W ") statement mean? why dont we use if=(1,132,c" W ") what are they differed ?


By coding 1,0 we do not worry about the length of the file. It implies start from pos1 and check till the end of the record for the specified characters. By coding length of zero file-aid scans the entire record. you specfied 1,132,c'w' which means you are telling file-aid to search from pos1 for a length of 132 for the characters 'w'.

Quote:

Also Kolusu used: out=0 at the end of the last ORIF, what does it do?


Out=n parameter is used to specify the no: of records you want in your output. OUT=0 means that you want all the recors. For example if you are interested in only first 100 records then you can specify OUT=100. I think the default value of out is 250 but not sure.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu


Last edited by kolusu on Wed Mar 17, 2004 6:35 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nguyenh
Beginner


Joined: 09 Mar 2004
Posts: 52
Topics: 6

PostPosted: Tue Mar 16, 2004 1:24 pm    Post subject: Reply with quote

Thanks Kuluso,

It's crital clear now.
Have a good day! Laughing
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Mar 17, 2004 6:36 am    Post subject: Reply with quote

ravi,

Thanks for pointing out the typo. I have edited my post.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
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