Page 1 of 1

NOT Condition.

Posted: Tue Sep 23, 2008 5:38 pm
by arrbee
Hi,

How to use the NOT condition to search entire PS using File-Aid?

Generally, we give it like........

Code: Select all

//SYSIN    DD  *                   
$$DD01 COPY IF=(1,0,C'FILEAID')
/*
I tried the below and it did not work..... :(

Code: Select all

//SYSIN    DD  *                   
$$DD01 COPY IF=(1,80,NE,C'FILEAID')
/*
Any thoughts? Please help.

Thanks.

Posted: Fri Nov 07, 2008 1:16 pm
by Natarajan
Let me know, still you have the problem with this?

Posted: Sat Nov 15, 2008 4:19 am
by Veera
Arrbee instead of COPY go with DROP

Code: Select all


//SYSIN    DD  *           
$$DD01 DROP IF=(01,0,C'FILEAID')
/*                         

Thanks,
Veera.

Posted: Wed Nov 26, 2008 1:42 pm
by Anuj Dhawan
Hi,

If you tell us what's your input & what do you expect in output with an example - some one will be around with a better suggestion.

Posted: Thu Jan 29, 2009 9:27 pm
by arrbee
Veera, thanks for the idea.

Anuj, I have a big file to search. There are only 4 to 5 records in that file I want to capture. So, I was trying it with NE.

Thanks.

Posted: Fri Jan 30, 2009 2:05 pm
by Anuj Dhawan
Hi,

What is unique about those "4 to 5 records"? Please show some sample input & expected output with the LRECL & RECFM of input/output.

Posted: Fri Jun 26, 2009 6:53 pm
by Dave E
Hi,

There is a simple way to generate your File-AID Batch JCL and control cards.

1. Take option 3.3 in File-AID - this will take you into the COPY function.

2. Enter the names of your source and target datasets - note DISP=NEW if the dataset does not already exists. On the same screen, specify you want to do this in batch. Also specify T (for temporary) in the 'selection criteria usage' field. Then press enter.

3. You are now taken to the selection criteria menu. Select option 2 or option 3, depending on whether you have a record layout available. Either way, this will be really easy. In this example let's tale option 3 (for unformatted criteria). Then press enter.

4. On the new screen, specify the position on the record, the RO (relational operator) of NC (this means not contains) - you could also use NE (for not equal to). Also speficy the data value you want to validate. For example, Position 16, RO value NC and data value of MUMBAI. You can also add further criteria on the other lines on that sceen. Then press enter and then PF3 to exit from this screen. This takes you back to the selection criteria screen.

5. PF3 from this screen, this will take you to the JCL specification screen. Just check/amend the JOBCARD information and then enter JCL on the command line. This will present you with the JCL. You can submit this to do your processing.

I find File-AID really easy to use and very powerful. Notice I did not have to code any control cards manually - File-AID did all the hard work for me!

Good luck.

Posted: Sat Jul 11, 2009 2:47 am
by Squashman
Was just looking at this today in the Batch Reference manual
Scanning Parameters
Use scanning parameters to search for a sequence of characters within a range of
locations in a record. The scan length can be any number from 0 (zero) through 255
(excluding 1) as long as it is greater than the length of the data element. If you use 0
(zero), File-AID calculates a scan length from your specified location to the end of the
record. Scanning repositions the input relative location pointer when the data value is
found.
Note: A scanning parameter can test only for an equal (EQ) condition. The data
element of a scanning parameter is limited to character or hexadecimal data.
Example 1:
$$DD01 DUMP IF=(22,10,C?CLIPS?)
Example 1 generates a hexadecimal print of any record that contains the character string
CLIPS in the scan field between locations 22 and 31.
Example 2:
$$DD01 COPYALL REPL=(6,50,C?TEST?,C?PROD?)
Example 2 copies the input dataset while locating any record that contains the character
string TEST in the scan field between locations 6 and 55. When File-AID locates the string
TEST, it replaces it with the string PROD.
So basically the EQ is assumed and you can't change it. I was looking into using this to find profanity words in a file. But I believe with the Data Element only allowed to be Character or Hexdecimal it would be CASE sensitive. I believe I would need the data element to be Text for it to be case insensitive.

I think the only way I could do it would be to do it online and use the CO(Contains) relational operator but I want to run this in batch and the reference manual for Batch doesn't list CO as a valid operator.

Sorry for HiJacking the thread. Will probably be starting my own to solve my issue. Just wanted to let you know what the manual said about Scanning Parameters.