Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1544
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: 8657
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

Senior Member


Joined: 08 May 2006
Posts: 1005
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 Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am
No new posts add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm
No new posts how to add the amount for duplicate r... SRUTHI DRAVIDAMANI COBOL Programming 6 Wed Feb 21, 2018 7:21 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us