DELETE RECORDs from the DATASET

Compuware's data management products: File-AID for IMS, File-AID/MVS, File-AID for DB2 and DBA-XPERT for DB2
fornanthakumar
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Skillset: JCL,
COBOL,
REXX,
VSAM,
DB2,
VM-COBOL,
BASIC- CICS,
EASYTRIEVE
Referer: Self-Discover

DELETE RECORDs from the DATASET

Postby fornanthakumar » Wed Jan 26, 2011 5:26 am

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
Regards,
Nanthu.Y.

NicC
Global moderator
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Skillset: JCL, PL/1, Rexx, Utilities and to a lesser extent (i.e. I have programmed using them) COBOL,DB2,IMS
Referer: Google
Location: Pushing up the daisies (almost)

Re: DELETE RECORDs from the DATASET

Postby NicC » Wed Jan 26, 2011 10:42 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic

fornanthakumar
Posts: 69
Joined: Fri Oct 22, 2010 1:58 pm
Skillset: JCL,
COBOL,
REXX,
VSAM,
DB2,
VM-COBOL,
BASIC- CICS,
EASYTRIEVE
Referer: Self-Discover

Re: DELETE RECORDs from the DATASET

Postby fornanthakumar » Thu Feb 24, 2011 1:28 pm

That is what i did finally.
Regards,
Nanthu.Y.

ranga_subham
Posts: 279
Joined: Fri Jul 18, 2008 7:46 pm
Skillset: JCL,COBOL,DB2,IMS/DB,CICS,VSAM
Referer: I was banned by superk in main forum so I am here

Re: DELETE RECORDs from the DATASET

Postby ranga_subham » Tue Mar 01, 2011 9:30 pm

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.


  • Similar Topics
    Replies
    Views
    Last post