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: 1537
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: 995
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 Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm


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