Posted: Tue Mar 09, 2004 2:55 pm Post subject: FileAid include , exclude question
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!
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue Mar 09, 2004 3:04 pm Post subject:
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.
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.........
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 ')
-------------------------------------------------------------
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
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Fri Mar 12, 2004 6:39 am Post subject:
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.
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Fri Mar 12, 2004 8:54 am Post subject:
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
/*
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'),
/*
Joined: 14 Nov 2003 Posts: 66 Topics: 0 Location: St Cloud, Minnesota USA
Posted: Sat Mar 13, 2004 1:42 am Post subject:
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)
Joined: 26 Nov 2002 Posts: 12382 Topics: 75 Location: San Jose
Posted: Tue Mar 16, 2004 3:51 am Post subject:
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.
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