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: 8629
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: 1004
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 Skip records depends on count lakshmiibmmainframes DFSORT/ICETOOL 5 Sun Dec 24, 2017 9:51 pm
No new posts Compare two PS files using ICE TOOL f... SENTHIL MURUGAAN DFSORT/ICETOOL 5 Sun Dec 24, 2017 1:26 pm
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am

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