Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

delete 50 records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Mon Dec 20, 2010 6:18 pm    Post subject: delete 50 records
Reply with quote

Hi,

I want to delete 50 records from a file that has 100,000 records. Can I achieve it using SORT if I give same file as input and output? Or, will there be any space abends from SORT side? Does sort allow several parameters to code in SYSIN card? What is the limit?

I am trying below sample SORT card but before attempting just need clarification.

Code:

//STEP0001 EXEC PGM=SORT                                   
//SYSOUT   DD SYSOUT=*                                     
//SORTIN   DD DSN=XXXXX.INPUT.FILE.XXX.XX1.XX2.XXX3,       
//            DISP=(SHR,KEEP,KEEP)                         
//SORTOUT  DD DSN=XXXXX.OUTPU.FILE.XXX.XX1.XX2.XXX3,       
//            DISP=(SHR,KEEP,KEEP)                         
//SYSIN    DD *                                           
 SORT FIELDS=COPY                                         
 OMIT COND=(1,2,CH,EQ,C'01',AND,10,6,CH,EQ,C'ABC123',AND, 
            16,4,CH,EQ,C'1010',AND,20,5,CH,EQ,C'10002')   
//*                                                       


As given above, I want to OMIT several (approx. 50 recs) records from input. How to code multiple ones?

Please help.

Thanks.
Back to top
View user's profile Send private message

Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Mon Dec 20, 2010 6:23 pm    Post subject:
Reply with quote

Did you try executing your code and also did you search the forum and did you tell your requrement properly?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Dec 20, 2010 6:23 pm    Post subject:
Reply with quote

I would suggest that you try it out anyway.

Looking at your code above, are the omit conditions linked or unique.
That is, do you want to omit on any condition stated, or does the record need to meet all of the criteria before being omitted.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Mon Dec 20, 2010 7:06 pm    Post subject: Reply to: delete 50 records
Reply with quote

It is for only one record. There are 50 such unique records to be omitted. I could execute it on one record successfully.
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 991
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Mon Dec 20, 2010 7:40 pm    Post subject:
Reply with quote

Depending on your criteria, maybe use nested parentheses?
Code:
 SORT FIELDS=COPY                                         
 OMIT COND=((1,2,CH,EQ,C'01',AND,10,6,CH,EQ,C'ABC123',AND, 
            16,4,CH,EQ,C'1010',AND,20,5,CH,EQ,C'10002'),OR,
                (1,2,CH,EQ,C'99',AND..........))

Garry.   
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Dec 29, 2010 11:17 pm    Post subject: Re: delete 50 records
Reply with quote

ramsri wrote:
I want to delete 50 records from a file that has 100,000 records. Can I achieve it using SORT if I give same file as input and output?

For a COPY or MERGE, the output file must not be the same as any of the input files. That being said, as Garry pointed out, your data sets are not named the same in your example, so this is a moot point.

Regards,
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us