Page 1 of 1

DELETE RECORDs from the DATASET

PostPosted: Wed Jan 26, 2011 5:26 am
by fornanthakumar
Hi,

I have dataset with millions of data. I just want to delete just 100 records from the dataset and i want to do it FILE-AID utility.

when was looking ahead in FILE-AID -> EDIT option and press enter it shows option for edit methods like below

Edit method ===> 2 (1 = Standard Edit; 2 = Windowed Edit)

If i choose option 1 -> Then i got error message "Insufficient storage" as Option 1 will load all the data into memory.

If i choose option 2 -> I cant delete records as options 2 does not support FILE-AID commands like INSERT,DELETE,REPEAT,SORT,COPY,MOVE,EXCLUDE

Re: DELETE RECORDs from the DATASET

PostPosted: Wed Jan 26, 2011 10:42 am
by NicC
OK. So? You cannot do it in File-aid. Use something else - a quick one-off program will probably do it faster than waiting for a debate on the forum to come up with an answer.

Re: DELETE RECORDs from the DATASET

PostPosted: Thu Feb 24, 2011 1:28 pm
by fornanthakumar
That is what i did finally.

Re: DELETE RECORDs from the DATASET

PostPosted: Tue Mar 01, 2011 9:30 pm
by ranga_subham
You would use DROP function of File-Aid batch to remove records based on selection criteria.

Note: The DROP function is not an update-in-place. The input and output files cannot be the same file.

Example-1:This example copies all of the input dataset records and drops any record that does not contain a valid 7-byte packed field beginning in location 4.
$$DD01 DROP IF=(4,7,NEP)



Example:-2This example copies the input dataset to the output dataset, and stops after dropping the first 200 records containing a valid packed field of any length, that begins in location 15, and has an arithmetic value equal to 1 or 2.
$$DD01 DROP IF=(15,EQ,P’1,2’),DROP=200


HTH.