NOT Condition.

In this Mainframe Forum - You can post your queries on FILE-AID tool

Moderators: Anuj Dhawan, Moderator Group

Post Reply
User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

NOT Condition.

Post by arrbee » Tue Sep 23, 2008 5:38 pm

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.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Fri Nov 07, 2008 1:16 pm

Let me know, still you have the problem with this?
Natarajan
Chennai

Veera
Moderator
Posts: 111
Joined: Wed Feb 22, 2006 2:59 pm

Post by Veera » Sat Nov 15, 2008 4:19 am

Arrbee instead of COPY go with DROP

Code: Select all


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

Thanks,
Veera.

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Wed Nov 26, 2008 1:42 pm

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.
Regards,
Anuj

User avatar
arrbee
Active Member
Posts: 144
Joined: Fri Feb 24, 2006 11:33 am

Post by arrbee » Thu Jan 29, 2009 9:27 pm

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.
Arr Bee
-------------
?My joy in learning is partly that it enables me to teach? - Seneca(Roman philosopher, mid-1st century AD)

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Fri Jan 30, 2009 2:05 pm

Hi,

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

Dave E
Member
Posts: 9
Joined: Thu Jun 25, 2009 6:01 pm

Post by Dave E » Fri Jun 26, 2009 6:53 pm

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.
Dave E
Software Engineer

Squashman
Member
Posts: 2
Joined: Sat Jul 11, 2009 2:36 am

Post by Squashman » Sat Jul 11, 2009 2:47 am

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.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others