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!
Was just looking at this today in the Batch Reference manual
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
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.
$$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.
$$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.